AudioCommon: get rid of Update(), it never does anything
This commit is contained in:
parent
c2d396526b
commit
d14b9a73b2
|
@ -41,11 +41,6 @@ bool AlsaSound::Init()
|
|||
return true;
|
||||
}
|
||||
|
||||
void AlsaSound::Update()
|
||||
{
|
||||
// don't need to do anything here.
|
||||
}
|
||||
|
||||
// Called on audio thread.
|
||||
void AlsaSound::SoundLoop()
|
||||
{
|
||||
|
|
|
@ -24,7 +24,6 @@ public:
|
|||
|
||||
bool Init() override;
|
||||
void SoundLoop() override;
|
||||
void Update() override;
|
||||
bool SetRunning(bool running) override;
|
||||
|
||||
static bool isValid() { return true; }
|
||||
|
|
|
@ -197,8 +197,6 @@ void SendAIBuffer(const short* samples, unsigned int num_samples)
|
|||
{
|
||||
pMixer->PushSamples(samples, num_samples);
|
||||
}
|
||||
|
||||
g_sound_stream->Update();
|
||||
}
|
||||
|
||||
void StartAudioDump()
|
||||
|
|
|
@ -20,7 +20,3 @@ bool NullSound::SetRunning(bool running)
|
|||
void NullSound::SetVolume(int volume)
|
||||
{
|
||||
}
|
||||
|
||||
void NullSound::Update()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -12,7 +12,6 @@ public:
|
|||
void SoundLoop() override;
|
||||
bool SetRunning(bool running) override;
|
||||
void SetVolume(int volume) override;
|
||||
void Update() override;
|
||||
|
||||
static bool isValid() { return true; }
|
||||
};
|
||||
|
|
|
@ -126,9 +126,6 @@ bool OpenALStream::Init()
|
|||
OpenALStream::~OpenALStream()
|
||||
{
|
||||
m_run_thread.Clear();
|
||||
// kick the thread if it's waiting
|
||||
m_sound_sync_event.Set();
|
||||
|
||||
m_thread.join();
|
||||
|
||||
palSourceStop(m_source);
|
||||
|
@ -155,11 +152,6 @@ void OpenALStream::SetVolume(int volume)
|
|||
palSourcef(m_source, AL_GAIN, m_volume);
|
||||
}
|
||||
|
||||
void OpenALStream::Update()
|
||||
{
|
||||
m_sound_sync_event.Set();
|
||||
}
|
||||
|
||||
bool OpenALStream::SetRunning(bool running)
|
||||
{
|
||||
if (running)
|
||||
|
|
|
@ -59,7 +59,6 @@ public:
|
|||
void SoundLoop() override;
|
||||
void SetVolume(int volume) override;
|
||||
bool SetRunning(bool running) override;
|
||||
void Update() override;
|
||||
|
||||
static bool isValid();
|
||||
|
||||
|
@ -67,8 +66,6 @@ private:
|
|||
std::thread m_thread;
|
||||
Common::Flag m_run_thread;
|
||||
|
||||
Common::Event m_sound_sync_event;
|
||||
|
||||
std::vector<short> m_realtime_buffer;
|
||||
std::array<ALuint, OAL_BUFFERS> m_buffers;
|
||||
ALuint m_source;
|
||||
|
|
|
@ -21,7 +21,6 @@ public:
|
|||
virtual bool Init() { return false; }
|
||||
virtual void SetVolume(int) {}
|
||||
virtual void SoundLoop() {}
|
||||
virtual void Update() {}
|
||||
// Returns true if successful.
|
||||
virtual bool SetRunning(bool running) { return false; }
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue