OSDN Git Service

[VM][General] Merge Upstream 2017-12-15.
[csp-qt/common_source_project-fm7.git] / source / src / vm / pcm1bit.h
index 814118d..141125a 100644 (file)
 #ifndef _PCM1BIT_H_
 #define _PCM1BIT_H_
 
-#include "vm.h"
-#include "../emu.h"
+//#include "vm.h"
+//#include "../emu.h"
 #include "device.h"
 
 #define SIG_PCM1BIT_SIGNAL     0
 #define SIG_PCM1BIT_ON         1
 #define SIG_PCM1BIT_MUTE       2
 
+class VM;
+class EMU;
 class PCM1BIT : public DEVICE
 {
 private:
@@ -27,11 +29,13 @@ private:
        int positive_clocks, negative_clocks;
        int max_vol, last_vol_l, last_vol_r;
        int volume_l, volume_r;
+       bool realtime;
        
 public:
        PCM1BIT(VM* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu)
        {
                volume_l = volume_r = 1024;
+               set_device_name(_T("1BIT PCM SOUND"));
        }
        ~PCM1BIT() {}
        
@@ -44,11 +48,6 @@ public:
        void set_volume(int ch, int decibel_l, int decibel_r);
        void save_state(FILEIO* state_fio);
        bool load_state(FILEIO* state_fio);
-       const _TCHAR *get_device_name()
-       {
-               return _T("1-Bit PCM");
-       }
-       
        // unique function
        void initialize_sound(int rate, int volume);
 };