From be565c8106e61a1190e0b6c889bbc65af1545f82 Mon Sep 17 00:00:00 2001 From: probonopd Date: Fri, 23 Aug 2024 16:16:44 +0000 Subject: [PATCH 1/2] Add USB audio support --- src/minidexed.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/minidexed.cpp b/src/minidexed.cpp index 2e45f46b..77481567 100644 --- a/src/minidexed.cpp +++ b/src/minidexed.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -200,6 +201,16 @@ CMiniDexed::CMiniDexed (CConfig *pConfig, CInterruptSystem *pInterrupt, // The channels are swapped by default in the HDMI sound driver. // TODO: Remove this line, when this has been fixed in the driver. m_bChannelsSwapped = !m_bChannelsSwapped; +#endif + } + else if (strcmp (pDeviceName, "usb") == 0) + { +#if RASPPI<=3 + LOGNOTE ("USB mode NOT supported on RPI 1-3."); +#else + LOGNOTE ("USB mode"); + + m_pSoundDevice = new CUSBSoundBaseDevice (pConfig->GetSampleRate ()); #endif } else From a4d082607a368e84ad1a016bf4aa17e728abdb78 Mon Sep 17 00:00:00 2001 From: probonopd Date: Sat, 31 Aug 2024 10:19:38 +0200 Subject: [PATCH 2/2] #ChunkSize=384 https://github.com/probonopd/MiniDexed/pull/708#issuecomment-2322824030 --- src/minidexed.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/minidexed.ini b/src/minidexed.ini index de9f1500..caebd1f2 100644 --- a/src/minidexed.ini +++ b/src/minidexed.ini @@ -7,7 +7,7 @@ SoundDevice=pwm #SoundDevice=hdmi SampleRate=48000 -#ChunkSize=256 +#ChunkSize=384 DACI2CAddress=0 ChannelsSwapped=0 # Engine Type ( 1=Modern ; 2=Mark I ; 3=OPL )