From 6f14b09f1ad02984e15dd5deee0b0249ca47e814 Mon Sep 17 00:00:00 2001 From: Paul Dino Jones Date: Fri, 17 Jan 2025 18:22:51 -0500 Subject: [PATCH] use more standard channel map --- src/monocoque/devices/sound/usb_generic_shaker_pulse.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/monocoque/devices/sound/usb_generic_shaker_pulse.c b/src/monocoque/devices/sound/usb_generic_shaker_pulse.c index 636955a..72c3cd8 100644 --- a/src/monocoque/devices/sound/usb_generic_shaker_pulse.c +++ b/src/monocoque/devices/sound/usb_generic_shaker_pulse.c @@ -134,11 +134,11 @@ int usb_generic_shaker_init(SoundDevice* sounddevice, pa_threaded_mainloop* main } if(channels == 6) { - pa_channel_map_parse(&channel_map, "front-left,front-right,rear-left,rear-right,front-center,lfe"); + pa_channel_map_parse(&channel_map, "front-left,front-right,front-center,lfe,rear-left,rear-right"); } if(channels == 8) { - pa_channel_map_parse(&channel_map, "front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right"); + pa_channel_map_parse(&channel_map, "front-left,front-right,front-center,lfe,rear-left,rear-right,side-left,side-right"); } stream = pa_stream_new(context, streamname, &sample_specifications, &channel_map); @@ -182,11 +182,13 @@ int usb_generic_shaker_init(SoundDevice* sounddevice, pa_threaded_mainloop* main pa_threaded_mainloop_wait(mainloop); } + + // Uncork the stream so it will start playing pa_stream_cork(stream, 0, stream_success_cb, mainloop); - pa_threaded_mainloop_unlock(mainloop); sounddevice->stream = stream; + pa_threaded_mainloop_unlock(mainloop); return 0; }