diff options
Diffstat (limited to 'drivers/xaudio2')
-rw-r--r-- | drivers/xaudio2/audio_driver_xaudio2.cpp | 8 | ||||
-rw-r--r-- | drivers/xaudio2/audio_driver_xaudio2.h | 8 |
2 files changed, 5 insertions, 11 deletions
diff --git a/drivers/xaudio2/audio_driver_xaudio2.cpp b/drivers/xaudio2/audio_driver_xaudio2.cpp index 120bfa2b36..d12ebf8d94 100644 --- a/drivers/xaudio2/audio_driver_xaudio2.cpp +++ b/drivers/xaudio2/audio_driver_xaudio2.cpp @@ -196,15 +196,9 @@ void AudioDriverXAudio2::finish() { thread = nullptr; } -AudioDriverXAudio2::AudioDriverXAudio2() : - thread(nullptr), - current_buffer(0) { - wave_format = { 0 }; +AudioDriverXAudio2::AudioDriverXAudio2() { for (int i = 0; i < AUDIO_BUFFERS; i++) { xaudio_buffer[i] = { 0 }; samples_out[i] = 0; } } - -AudioDriverXAudio2::~AudioDriverXAudio2() { -} diff --git a/drivers/xaudio2/audio_driver_xaudio2.h b/drivers/xaudio2/audio_driver_xaudio2.h index eb4a6d6e95..9182fa4172 100644 --- a/drivers/xaudio2/audio_driver_xaudio2.h +++ b/drivers/xaudio2/audio_driver_xaudio2.h @@ -64,7 +64,7 @@ class AudioDriverXAudio2 : public AudioDriver { void STDMETHODCALLTYPE OnVoiceError(void *pBufferContext, HRESULT Error) {} }; - Thread *thread; + Thread *thread = nullptr; Mutex mutex; int32_t *samples_in; @@ -83,9 +83,9 @@ class AudioDriverXAudio2 : public AudioDriver { mutable bool exit_thread; bool pcm_open; - WAVEFORMATEX wave_format; + WAVEFORMATEX wave_format = { 0 }; Microsoft::WRL::ComPtr<IXAudio2> xaudio; - int current_buffer; + int current_buffer = 0; IXAudio2MasteringVoice *mastering_voice; XAUDIO2_BUFFER xaudio_buffer[AUDIO_BUFFERS]; IXAudio2SourceVoice *source_voice; @@ -104,7 +104,7 @@ public: virtual void finish(); AudioDriverXAudio2(); - ~AudioDriverXAudio2(); + ~AudioDriverXAudio2() {} }; #endif |