diff options
Diffstat (limited to 'drivers/xaudio2')
-rw-r--r-- | drivers/xaudio2/audio_driver_xaudio2.cpp | 2 | ||||
-rw-r--r-- | drivers/xaudio2/audio_driver_xaudio2.h | 22 |
2 files changed, 12 insertions, 12 deletions
diff --git a/drivers/xaudio2/audio_driver_xaudio2.cpp b/drivers/xaudio2/audio_driver_xaudio2.cpp index 421cf6a8cf..c9ad054089 100644 --- a/drivers/xaudio2/audio_driver_xaudio2.cpp +++ b/drivers/xaudio2/audio_driver_xaudio2.cpp @@ -30,8 +30,8 @@ #include "audio_driver_xaudio2.h" +#include "core/config/project_settings.h" #include "core/os/os.h" -#include "core/project_settings.h" const char *AudioDriverXAudio2::get_name() const { return "XAudio2"; diff --git a/drivers/xaudio2/audio_driver_xaudio2.h b/drivers/xaudio2/audio_driver_xaudio2.h index 7fc1bb428d..0aed072ec6 100644 --- a/drivers/xaudio2/audio_driver_xaudio2.h +++ b/drivers/xaudio2/audio_driver_xaudio2.h @@ -65,28 +65,28 @@ class AudioDriverXAudio2 : public AudioDriver { Thread *thread = nullptr; Mutex mutex; - int32_t *samples_in; + int32_t *samples_in = nullptr; int16_t *samples_out[AUDIO_BUFFERS]; static void thread_func(void *p_udata); - int buffer_size; + int buffer_size = 0; - unsigned int mix_rate; - SpeakerMode speaker_mode; + unsigned int mix_rate = 0; + SpeakerMode speaker_mode = SpeakerMode::SPEAKER_MODE_STEREO; - int channels; + int channels = 0; - bool active; - bool thread_exited; - mutable bool exit_thread; - bool pcm_open; + bool active = false; + bool thread_exited = false; + mutable bool exit_thread = false; + bool pcm_open = false; WAVEFORMATEX wave_format = { 0 }; Microsoft::WRL::ComPtr<IXAudio2> xaudio; int current_buffer = 0; - IXAudio2MasteringVoice *mastering_voice; + IXAudio2MasteringVoice *mastering_voice = nullptr; XAUDIO2_BUFFER xaudio_buffer[AUDIO_BUFFERS]; - IXAudio2SourceVoice *source_voice; + IXAudio2SourceVoice *source_voice = nullptr; XAudio2DriverVoiceCallback voice_callback; public: |