summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/sound/pulse_sound.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/osd/modules/sound/pulse_sound.cpp')
-rw-r--r--src/osd/modules/sound/pulse_sound.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/osd/modules/sound/pulse_sound.cpp b/src/osd/modules/sound/pulse_sound.cpp
index 7bb3f8c2a02..e9e6ea4d428 100644
--- a/src/osd/modules/sound/pulse_sound.cpp
+++ b/src/osd/modules/sound/pulse_sound.cpp
@@ -20,11 +20,15 @@
#include <stdlib.h>
#include <poll.h>
+#include <mutex>
#include <thread>
#include <pulse/pulseaudio.h>
#include "modules/lib/osdobj_common.h"
+using osd::s16;
+using osd::u32;
+
class sound_pulse : public osd_module, public sound_module
{
public:
@@ -293,7 +297,11 @@ int sound_pulse::init(osd_options const &options)
return 1;
pa_sample_spec ss;
- ss.format = ENDIANNESS_NATIVE == ENDIANNESS_BIG ? PA_SAMPLE_S16BE : PA_SAMPLE_S16LE;
+#ifdef LSB_FIRST
+ ss.format = PA_SAMPLE_S16LE;
+#else
+ ss.format = PA_SAMPLE_S16BE;
+#endif
ss.rate = sample_rate();
ss.channels = 2;
m_stream = pa_stream_new(m_context, "main output", &ss, nullptr);