mirror of
https://github.com/polpo/picogus.git
synced 2026-10-25 21:40:16 +00:00
Fix MIDI output in SB and USB modes
This commit is contained in:
1 parent
d128a4fa2d
commit
10745eda21
2 files changed
+16
-1
No files matched your search
+1
-1
@@ -292,7 +292,7 @@ void play_adlib() {
|
||||
uartemu_core1_task();
|
||||
#endif
|
||||
#ifdef SOUND_MPU
|
||||
send_midi_bytes(1);
|
||||
send_midi_bytes(8);
|
||||
#endif
|
||||
#ifdef CDROM
|
||||
cdrom_tasks(&cdrom);
|
||||
|
||||
@@ -28,6 +28,12 @@
|
||||
#include "pico/audio_i2s.h"
|
||||
#endif
|
||||
|
||||
#ifdef SOUND_MPU
|
||||
#include "flash_settings.h"
|
||||
extern Settings settings;
|
||||
#include "mpu401/export.h"
|
||||
#endif
|
||||
|
||||
#include "pico_pic.h"
|
||||
|
||||
#ifdef CDROM
|
||||
@@ -83,6 +89,10 @@ void play_usb() {
|
||||
// init host stack on configured roothub port
|
||||
tuh_init(BOARD_TUH_RHPORT);
|
||||
|
||||
#ifdef SOUND_MPU
|
||||
MPU401_Init(settings.MPU.delaySysex, settings.MPU.fakeAllNotesOff);
|
||||
#endif
|
||||
|
||||
#ifdef CDROM
|
||||
struct audio_buffer_pool *ap = init_audio();
|
||||
#endif
|
||||
@@ -99,6 +109,11 @@ void play_usb() {
|
||||
buffer->sample_count = 1;
|
||||
}
|
||||
give_audio_buffer(ap, buffer);
|
||||
#ifdef SOUND_MPU
|
||||
send_midi_bytes(8);
|
||||
#endif
|
||||
} else {
|
||||
send_midi_bytes(2);
|
||||
}
|
||||
cdrom_tasks(&cdrom);
|
||||
#endif // CDROM
|
||||
|
||||
Reference in new issue
Block a user