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.
This commit is contained in:
@ -30,11 +30,9 @@
|
||||
|
||||
#ifdef ALSA_ENABLED
|
||||
|
||||
#include <errno.h>
|
||||
#include "globals.h"
|
||||
|
||||
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
Error AudioDriverALSA::init() {
|
||||
|
||||
@ -46,7 +44,7 @@ Error AudioDriverALSA::init() {
|
||||
samples_out = NULL;
|
||||
|
||||
mix_rate = GLOBAL_DEF("audio/mix_rate",44100);
|
||||
output_format = SPEAKER_MODE_STEREO;
|
||||
speaker_mode = SPEAKER_MODE_STEREO;
|
||||
channels = 2;
|
||||
|
||||
|
||||
@ -207,14 +205,16 @@ int AudioDriverALSA::get_mix_rate() const {
|
||||
|
||||
AudioDriver::SpeakerMode AudioDriverALSA::get_speaker_mode() const {
|
||||
|
||||
return output_format;
|
||||
return speaker_mode;
|
||||
};
|
||||
|
||||
void AudioDriverALSA::lock() {
|
||||
|
||||
if (!thread || !mutex)
|
||||
return;
|
||||
mutex->lock();
|
||||
};
|
||||
|
||||
void AudioDriverALSA::unlock() {
|
||||
|
||||
if (!thread || !mutex)
|
||||
|
||||
@ -48,7 +48,7 @@ class AudioDriverALSA : public AudioDriver {
|
||||
static void thread_func(void* p_udata);
|
||||
|
||||
unsigned int mix_rate;
|
||||
SpeakerMode output_format;
|
||||
SpeakerMode speaker_mode;
|
||||
|
||||
snd_pcm_uframes_t buffer_size;
|
||||
snd_pcm_uframes_t period_size;
|
||||
|
||||
Reference in New Issue
Block a user