2012-11-06 05:21:00 +00:00
|
|
|
#ifndef OPL_H
|
|
|
|
#define OPL_H
|
|
|
|
|
|
|
|
#include "zstring.h"
|
|
|
|
|
|
|
|
// Abstract base class for OPL emulators
|
|
|
|
|
|
|
|
class OPLEmul
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
OPLEmul() {}
|
|
|
|
virtual ~OPLEmul() {}
|
|
|
|
|
|
|
|
virtual void Reset() = 0;
|
2012-11-08 05:45:58 +00:00
|
|
|
virtual void WriteReg(int reg, int v) = 0;
|
2012-11-06 05:21:00 +00:00
|
|
|
virtual void Update(float *buffer, int length) = 0;
|
2012-11-09 04:53:31 +00:00
|
|
|
virtual void SetPanning(int c, float left, float right) = 0;
|
2012-11-06 05:21:00 +00:00
|
|
|
};
|
|
|
|
|
2012-11-08 05:45:58 +00:00
|
|
|
OPLEmul *YM3812Create(bool stereo);
|
|
|
|
OPLEmul *DBOPLCreate(bool stereo);
|
2012-11-15 05:23:24 +00:00
|
|
|
OPLEmul *JavaOPLCreate(bool stereo);
|
2014-11-22 15:36:22 +00:00
|
|
|
OPLEmul *NukedOPL3Create(bool stereo);
|
2012-11-08 05:45:58 +00:00
|
|
|
|
2012-11-16 06:27:03 +00:00
|
|
|
#define OPL_SAMPLE_RATE 49716.0
|
2012-11-17 05:26:03 +00:00
|
|
|
#define CENTER_PANNING_POWER 0.70710678118 /* [RH] volume at center for EQP */
|
|
|
|
|
2012-11-16 06:27:03 +00:00
|
|
|
|
2012-11-06 05:21:00 +00:00
|
|
|
#endif
|