OSDN Git Service

[VM][PC100] Add a seek sound.
authorK.Ohta <whatisthis.sowhat@gmail.com>
Tue, 4 Oct 2016 08:19:52 +0000 (17:19 +0900)
committerK.Ohta <whatisthis.sowhat@gmail.com>
Tue, 4 Oct 2016 08:19:52 +0000 (17:19 +0900)
source/src/vm/pc100/pc100.cpp
source/src/vm/pc100/pc100.h

index f1eafcc..fdbc7a8 100644 (file)
@@ -79,6 +79,11 @@ VM::VM(EMU* parent_emu) : emu(parent_emu)
        event->set_context_cpu(cpu);
        event->set_context_sound(beep);
        event->set_context_sound(pcm);
+#if defined(USE_SOUND_FILES)
+       if(fdc->load_sound_data(UPD765A_SND_TYPE_SEEK, _T("FDDSEEK.WAV"))) {
+               event->set_context_sound(fdc);
+       }
+#endif         
        
        and_drq->set_context_out(cpu, SIG_CPU_NMI, 1);
        and_drq->set_mask(SIG_AND_BIT_0 | SIG_AND_BIT_1);
@@ -263,6 +268,11 @@ void VM::set_sound_device_volume(int ch, int decibel_l, int decibel_r)
        } else if(ch == 1) {
                pcm->set_volume(0, decibel_l, decibel_r);
        }
+#if defined(USE_SOUND_FILES)
+       else if(ch == 2) {
+               fdc->set_volume(0, decibel_l, decibel_r);
+       }
+#endif
 }
 #endif
 
index dcad673..a3b930f 100644 (file)
 #define USE_CRT_FILTER
 #define USE_SCREEN_ROTATE
 #define USE_ACCESS_LAMP
+#define USE_SOUND_FILES 2
+#if defined(USE_SOUND_FILES)
+#define USE_SOUND_VOLUME       3
+#else
 #define USE_SOUND_VOLUME       2
+#endif
 #define USE_MOUSE
 #define USE_DEBUGGER
 #define USE_STATE
@@ -54,6 +59,9 @@
 #ifdef USE_SOUND_VOLUME
 static const _TCHAR *sound_device_caption[] = {
        _T("Beep #1"), _T("Beep #2"),
+#if defined(USE_SOUND_FILES)
+       _T("FDD SEEK"),
+#endif
 };
 #endif