OSDN Git Service

[VM][PC100] Add a seek sound.
[csp-qt/common_source_project-fm7.git] / source / src / vm / pc100 / pc100.cpp
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