diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2017-01-16 19:19:45 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2017-01-16 19:19:45 +0100 |
commit | 7b059965e8df745c5b45b4ec6bfbdfe1a7397642 (patch) | |
tree | bdba6b41f51fcb4c8aa5178aebd378bdf97b93a8 /drivers/xaudio2 | |
parent | 6a3dae5be944d9e226cca7bf0bd80fb0036e8324 (diff) |
Adapt platforms to AudioServer refactoring
Fixes compilation on Windows and likely other platforms (at least
as far as AudioServer changes were concerned), though they were
not tested.
Diffstat (limited to 'drivers/xaudio2')
-rw-r--r-- | drivers/xaudio2/audio_driver_xaudio2.cpp | 7 | ||||
-rw-r--r-- | drivers/xaudio2/audio_driver_xaudio2.h | 7 |
2 files changed, 7 insertions, 7 deletions
diff --git a/drivers/xaudio2/audio_driver_xaudio2.cpp b/drivers/xaudio2/audio_driver_xaudio2.cpp index fd0e64b3dd..fa55c97325 100644 --- a/drivers/xaudio2/audio_driver_xaudio2.cpp +++ b/drivers/xaudio2/audio_driver_xaudio2.cpp @@ -46,7 +46,8 @@ Error AudioDriverXAudio2::init() { mix_rate = 48000; - output_format = OUTPUT_STEREO; + // FIXME: speaker_mode seems unused in the Xaudio2 driver so far + speaker_mode = SPEAKER_MODE_STEREO; channels = 2; int latency = GLOBAL_DEF("audio/output_latency", 25); @@ -156,9 +157,9 @@ int AudioDriverXAudio2::get_mix_rate() const { return mix_rate; }; -AudioDriver::OutputFormat AudioDriverXAudio2::get_output_format() const { +AudioDriver::SpeakerMode AudioDriverXAudio2::get_speaker_mode() const { - return output_format; + return speaker_mode; }; float AudioDriverXAudio2::get_latency() { diff --git a/drivers/xaudio2/audio_driver_xaudio2.h b/drivers/xaudio2/audio_driver_xaudio2.h index b6425602ca..afafb84c23 100644 --- a/drivers/xaudio2/audio_driver_xaudio2.h +++ b/drivers/xaudio2/audio_driver_xaudio2.h @@ -29,8 +29,7 @@ #ifndef AUDIO_DRIVER_XAUDIO2_H #define AUDIO_DRIVER_XAUDIO2_H -#include "servers/audio/audio_server_sw.h" - +#include "servers/audio_server.h" #include "core/os/thread.h" #include "core/os/mutex.h" @@ -72,7 +71,7 @@ class AudioDriverXAudio2 : public AudioDriver { int buffer_size; unsigned int mix_rate; - OutputFormat output_format; + SpeakerMode speaker_mode; int channels; @@ -96,7 +95,7 @@ public: virtual Error init(); virtual void start(); virtual int get_mix_rate() const; - virtual OutputFormat get_output_format() const; + virtual SpeakerMode get_speaker_mode() const; virtual float get_latency(); virtual void lock(); virtual void unlock(); |