drop usage of std::deque, part 2
This commit is contained in:
parent
8b565ed284
commit
9a63fdccd5
|
@ -21,7 +21,7 @@
|
||||||
#define _TAAUDIO_H
|
#define _TAAUDIO_H
|
||||||
#include "../ta-utils.h"
|
#include "../ta-utils.h"
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <queue>
|
#include "../fixedQueue.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
struct SampleRateChangeEvent {
|
struct SampleRateChangeEvent {
|
||||||
|
@ -124,7 +124,7 @@ struct TAMidiMessage {
|
||||||
|
|
||||||
class TAMidiIn {
|
class TAMidiIn {
|
||||||
public:
|
public:
|
||||||
std::queue<TAMidiMessage> queue;
|
FixedQueue<TAMidiMessage,8192> queue;
|
||||||
virtual bool gather();
|
virtual bool gather();
|
||||||
bool next(TAMidiMessage& where);
|
bool next(TAMidiMessage& where);
|
||||||
virtual bool isDeviceOpen();
|
virtual bool isDeviceOpen();
|
||||||
|
@ -139,7 +139,7 @@ class TAMidiIn {
|
||||||
};
|
};
|
||||||
|
|
||||||
class TAMidiOut {
|
class TAMidiOut {
|
||||||
std::queue<TAMidiMessage> queue;
|
FixedQueue<TAMidiMessage,8192> queue;
|
||||||
public:
|
public:
|
||||||
virtual bool send(const TAMidiMessage& what);
|
virtual bool send(const TAMidiMessage& what);
|
||||||
virtual bool isDeviceOpen();
|
virtual bool isDeviceOpen();
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include "fixedQueue.h"
|
#include "../fixedQueue.h"
|
||||||
|
|
||||||
class DivWorkPool;
|
class DivWorkPool;
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#ifndef _AY_H
|
#ifndef _AY_H
|
||||||
#define _AY_H
|
#define _AY_H
|
||||||
#include "../dispatch.h"
|
#include "../dispatch.h"
|
||||||
#include "../fixedQueue.h"
|
#include "../../fixedQueue.h"
|
||||||
#include "sound/ay8910.h"
|
#include "sound/ay8910.h"
|
||||||
|
|
||||||
class DivPlatformAY8910: public DivDispatch {
|
class DivPlatformAY8910: public DivDispatch {
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#ifndef _AY8930_H
|
#ifndef _AY8930_H
|
||||||
#define _AY8930_H
|
#define _AY8930_H
|
||||||
#include "../dispatch.h"
|
#include "../dispatch.h"
|
||||||
#include "../fixedQueue.h"
|
#include "../../fixedQueue.h"
|
||||||
#include "sound/ay8910.h"
|
#include "sound/ay8910.h"
|
||||||
|
|
||||||
class DivPlatformAY8930: public DivDispatch {
|
class DivPlatformAY8930: public DivDispatch {
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
#include "../dispatch.h"
|
#include "../dispatch.h"
|
||||||
#include "sound/c140_c219.h"
|
#include "sound/c140_c219.h"
|
||||||
#include "../fixedQueue.h"
|
#include "../../fixedQueue.h"
|
||||||
|
|
||||||
class DivPlatformC140: public DivDispatch {
|
class DivPlatformC140: public DivDispatch {
|
||||||
struct Channel: public SharedChannel<int> {
|
struct Channel: public SharedChannel<int> {
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#define _C64_H
|
#define _C64_H
|
||||||
|
|
||||||
#include "../dispatch.h"
|
#include "../dispatch.h"
|
||||||
#include "../fixedQueue.h"
|
#include "../../fixedQueue.h"
|
||||||
#include "sound/c64/sid.h"
|
#include "sound/c64/sid.h"
|
||||||
#include "sound/c64_fp/SID.h"
|
#include "sound/c64_fp/SID.h"
|
||||||
#include "sound/c64_d/dsid.h"
|
#include "sound/c64_d/dsid.h"
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
#include "../dispatch.h"
|
#include "../dispatch.h"
|
||||||
#include "../engine.h"
|
#include "../engine.h"
|
||||||
#include "../fixedQueue.h"
|
#include "../../fixedQueue.h"
|
||||||
#include "../macroInt.h"
|
#include "../macroInt.h"
|
||||||
#include "../sample.h"
|
#include "../sample.h"
|
||||||
#include "vgsound_emu/src/es550x/es5506.hpp"
|
#include "vgsound_emu/src/es550x/es5506.hpp"
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
#include "../dispatch.h"
|
#include "../dispatch.h"
|
||||||
#include "../instrument.h"
|
#include "../instrument.h"
|
||||||
#include "../fixedQueue.h"
|
#include "../../fixedQueue.h"
|
||||||
|
|
||||||
#define KVS(x,y) ((chan[x].state.op[y].kvs==2 && isOutput[chan[x].state.alg][y]) || chan[x].state.op[y].kvs==1)
|
#define KVS(x,y) ((chan[x].state.op[y].kvs==2 && isOutput[chan[x].state.alg][y]) || chan[x].state.op[y].kvs==1)
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#define _GA20_H
|
#define _GA20_H
|
||||||
|
|
||||||
#include "../dispatch.h"
|
#include "../dispatch.h"
|
||||||
#include "../fixedQueue.h"
|
#include "../../fixedQueue.h"
|
||||||
#include "../macroInt.h"
|
#include "../macroInt.h"
|
||||||
#include "sound/ga20/iremga20.h"
|
#include "sound/ga20/iremga20.h"
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#include "../dispatch.h"
|
#include "../dispatch.h"
|
||||||
#include "../waveSynth.h"
|
#include "../waveSynth.h"
|
||||||
#include "sound/gb/gb.h"
|
#include "sound/gb/gb.h"
|
||||||
#include "../fixedQueue.h"
|
#include "../../fixedQueue.h"
|
||||||
|
|
||||||
class DivPlatformGB: public DivDispatch {
|
class DivPlatformGB: public DivDispatch {
|
||||||
struct Channel: public SharedChannel<signed char> {
|
struct Channel: public SharedChannel<signed char> {
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#define _K007232_H
|
#define _K007232_H
|
||||||
|
|
||||||
#include "../dispatch.h"
|
#include "../dispatch.h"
|
||||||
#include "../fixedQueue.h"
|
#include "../../fixedQueue.h"
|
||||||
#include "../macroInt.h"
|
#include "../macroInt.h"
|
||||||
#include "vgsound_emu/src/k007232/k007232.hpp"
|
#include "vgsound_emu/src/k007232/k007232.hpp"
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#define _MSM5232_H
|
#define _MSM5232_H
|
||||||
|
|
||||||
#include "../dispatch.h"
|
#include "../dispatch.h"
|
||||||
#include "../fixedQueue.h"
|
#include "../../fixedQueue.h"
|
||||||
#include "sound/oki/msm5232.h"
|
#include "sound/oki/msm5232.h"
|
||||||
|
|
||||||
class DivPlatformMSM5232: public DivDispatch {
|
class DivPlatformMSM5232: public DivDispatch {
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#define _MSM6258_H
|
#define _MSM6258_H
|
||||||
|
|
||||||
#include "../dispatch.h"
|
#include "../dispatch.h"
|
||||||
#include "../fixedQueue.h"
|
#include "../../fixedQueue.h"
|
||||||
#include "sound/oki/okim6258.h"
|
#include "sound/oki/okim6258.h"
|
||||||
|
|
||||||
class DivPlatformMSM6258: public DivDispatch {
|
class DivPlatformMSM6258: public DivDispatch {
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#define _MSM6295_H
|
#define _MSM6295_H
|
||||||
|
|
||||||
#include "../dispatch.h"
|
#include "../dispatch.h"
|
||||||
#include "../fixedQueue.h"
|
#include "../../fixedQueue.h"
|
||||||
#include "vgsound_emu/src/msm6295/msm6295.hpp"
|
#include "vgsound_emu/src/msm6295/msm6295.hpp"
|
||||||
|
|
||||||
class DivPlatformMSM6295: public DivDispatch, public vgsound_emu_mem_intf {
|
class DivPlatformMSM6295: public DivDispatch, public vgsound_emu_mem_intf {
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#define _N163_H
|
#define _N163_H
|
||||||
|
|
||||||
#include "../dispatch.h"
|
#include "../dispatch.h"
|
||||||
#include "../fixedQueue.h"
|
#include "../../fixedQueue.h"
|
||||||
#include "../waveSynth.h"
|
#include "../waveSynth.h"
|
||||||
#include "vgsound_emu/src/n163/n163.hpp"
|
#include "vgsound_emu/src/n163/n163.hpp"
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#define _NAMCOWSG_H
|
#define _NAMCOWSG_H
|
||||||
|
|
||||||
#include "../dispatch.h"
|
#include "../dispatch.h"
|
||||||
#include "../fixedQueue.h"
|
#include "../../fixedQueue.h"
|
||||||
#include "../waveSynth.h"
|
#include "../waveSynth.h"
|
||||||
#include "sound/namco.h"
|
#include "sound/namco.h"
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#define _OPL_H
|
#define _OPL_H
|
||||||
|
|
||||||
#include "../dispatch.h"
|
#include "../dispatch.h"
|
||||||
#include "../fixedQueue.h"
|
#include "../../fixedQueue.h"
|
||||||
#include "../../../extern/opl/opl3.h"
|
#include "../../../extern/opl/opl3.h"
|
||||||
#include "sound/ymfm/ymfm_adpcm.h"
|
#include "sound/ymfm/ymfm_adpcm.h"
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#define _OPLL_H
|
#define _OPLL_H
|
||||||
|
|
||||||
#include "../dispatch.h"
|
#include "../dispatch.h"
|
||||||
#include "../fixedQueue.h"
|
#include "../../fixedQueue.h"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "../../../extern/Nuked-OPLL/opll.h"
|
#include "../../../extern/Nuked-OPLL/opll.h"
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#define _PCE_H
|
#define _PCE_H
|
||||||
|
|
||||||
#include "../dispatch.h"
|
#include "../dispatch.h"
|
||||||
#include "../fixedQueue.h"
|
#include "../../fixedQueue.h"
|
||||||
#include "../waveSynth.h"
|
#include "../waveSynth.h"
|
||||||
#include "sound/pce_psg.h"
|
#include "sound/pce_psg.h"
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#define _PCSPKR_H
|
#define _PCSPKR_H
|
||||||
|
|
||||||
#include "../dispatch.h"
|
#include "../dispatch.h"
|
||||||
#include "../fixedQueue.h"
|
#include "../../fixedQueue.h"
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
#include <condition_variable>
|
#include <condition_variable>
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#define _POKEY_H
|
#define _POKEY_H
|
||||||
|
|
||||||
#include "../dispatch.h"
|
#include "../dispatch.h"
|
||||||
#include "../fixedQueue.h"
|
#include "../../fixedQueue.h"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "sound/pokey/mzpokeysnd.h"
|
#include "sound/pokey/mzpokeysnd.h"
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#define _SAA_H
|
#define _SAA_H
|
||||||
|
|
||||||
#include "../dispatch.h"
|
#include "../dispatch.h"
|
||||||
#include "../fixedQueue.h"
|
#include "../../fixedQueue.h"
|
||||||
#include "../../../extern/SAASound/src/SAASound.h"
|
#include "../../../extern/SAASound/src/SAASound.h"
|
||||||
|
|
||||||
class DivPlatformSAA1099: public DivDispatch {
|
class DivPlatformSAA1099: public DivDispatch {
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#include "../dispatch.h"
|
#include "../dispatch.h"
|
||||||
#include "../instrument.h"
|
#include "../instrument.h"
|
||||||
#include "sound/segapcm.h"
|
#include "sound/segapcm.h"
|
||||||
#include "../fixedQueue.h"
|
#include "../../fixedQueue.h"
|
||||||
|
|
||||||
class DivPlatformSegaPCM: public DivDispatch {
|
class DivPlatformSegaPCM: public DivDispatch {
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#define _SM8521_H
|
#define _SM8521_H
|
||||||
|
|
||||||
#include "../dispatch.h"
|
#include "../dispatch.h"
|
||||||
#include "../fixedQueue.h"
|
#include "../../fixedQueue.h"
|
||||||
#include "../waveSynth.h"
|
#include "../waveSynth.h"
|
||||||
#include "sound/sm8521.h"
|
#include "sound/sm8521.h"
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "../../../extern/Nuked-PSG/ympsg.h"
|
#include "../../../extern/Nuked-PSG/ympsg.h"
|
||||||
}
|
}
|
||||||
#include "../fixedQueue.h"
|
#include "../../fixedQueue.h"
|
||||||
|
|
||||||
class DivPlatformSMS: public DivDispatch {
|
class DivPlatformSMS: public DivDispatch {
|
||||||
struct Channel: public SharedChannel<signed char> {
|
struct Channel: public SharedChannel<signed char> {
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
#include "../dispatch.h"
|
#include "../dispatch.h"
|
||||||
#include "../waveSynth.h"
|
#include "../waveSynth.h"
|
||||||
#include "../fixedQueue.h"
|
#include "../../fixedQueue.h"
|
||||||
#include "sound/snes/SPC_DSP.h"
|
#include "sound/snes/SPC_DSP.h"
|
||||||
|
|
||||||
class DivPlatformSNES: public DivDispatch {
|
class DivPlatformSNES: public DivDispatch {
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#define _SU_H
|
#define _SU_H
|
||||||
|
|
||||||
#include "../dispatch.h"
|
#include "../dispatch.h"
|
||||||
#include "../fixedQueue.h"
|
#include "../../fixedQueue.h"
|
||||||
#include "sound/su.h"
|
#include "sound/su.h"
|
||||||
|
|
||||||
class DivPlatformSoundUnit: public DivDispatch {
|
class DivPlatformSoundUnit: public DivDispatch {
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#include "../dispatch.h"
|
#include "../dispatch.h"
|
||||||
#include "../waveSynth.h"
|
#include "../waveSynth.h"
|
||||||
#include "sound/swan.h"
|
#include "sound/swan.h"
|
||||||
#include "../fixedQueue.h"
|
#include "../../fixedQueue.h"
|
||||||
|
|
||||||
class DivPlatformSwan: public DivDispatch {
|
class DivPlatformSwan: public DivDispatch {
|
||||||
struct Channel: public SharedChannel<int> {
|
struct Channel: public SharedChannel<int> {
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#define _T6W28_H
|
#define _T6W28_H
|
||||||
|
|
||||||
#include "../dispatch.h"
|
#include "../dispatch.h"
|
||||||
#include "../fixedQueue.h"
|
#include "../../fixedQueue.h"
|
||||||
#include "sound/t6w28/T6W28_Apu.h"
|
#include "sound/t6w28/T6W28_Apu.h"
|
||||||
|
|
||||||
class DivPlatformT6W28: public DivDispatch {
|
class DivPlatformT6W28: public DivDispatch {
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#define _TED_H
|
#define _TED_H
|
||||||
|
|
||||||
#include "../dispatch.h"
|
#include "../dispatch.h"
|
||||||
#include "../fixedQueue.h"
|
#include "../../fixedQueue.h"
|
||||||
#include "sound/ted-sound.h"
|
#include "sound/ted-sound.h"
|
||||||
|
|
||||||
class DivPlatformTED: public DivDispatch {
|
class DivPlatformTED: public DivDispatch {
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#define _TX81Z_H
|
#define _TX81Z_H
|
||||||
|
|
||||||
#include "fmshared_OPM.h"
|
#include "fmshared_OPM.h"
|
||||||
#include "../fixedQueue.h"
|
#include "../../fixedQueue.h"
|
||||||
#include "sound/ymfm/ymfm_opz.h"
|
#include "sound/ymfm/ymfm_opz.h"
|
||||||
|
|
||||||
class DivTXInterface: public ymfm::ymfm_interface {
|
class DivTXInterface: public ymfm::ymfm_interface {
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#define _PLATFORM_VB_H
|
#define _PLATFORM_VB_H
|
||||||
|
|
||||||
#include "../dispatch.h"
|
#include "../dispatch.h"
|
||||||
#include "../fixedQueue.h"
|
#include "../../fixedQueue.h"
|
||||||
#include "../waveSynth.h"
|
#include "../waveSynth.h"
|
||||||
#include "sound/vsu.h"
|
#include "sound/vsu.h"
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#ifndef _VRC6_H
|
#ifndef _VRC6_H
|
||||||
#define _VRC6_H
|
#define _VRC6_H
|
||||||
|
|
||||||
#include "../fixedQueue.h"
|
#include "../../fixedQueue.h"
|
||||||
#include "../dispatch.h"
|
#include "../dispatch.h"
|
||||||
#include "vgsound_emu/src/vrcvi/vrcvi.hpp"
|
#include "vgsound_emu/src/vrcvi/vrcvi.hpp"
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include "defines.h"
|
#include "defines.h"
|
||||||
#include "safeWriter.h"
|
#include "safeWriter.h"
|
||||||
#include "dataErrors.h"
|
#include "dataErrors.h"
|
||||||
#include "fixedQueue.h"
|
#include "../fixedQueue.h"
|
||||||
|
|
||||||
enum DivSampleLoopMode: unsigned char {
|
enum DivSampleLoopMode: unsigned char {
|
||||||
DIV_SAMPLE_LOOP_FORWARD=0,
|
DIV_SAMPLE_LOOP_FORWARD=0,
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <future>
|
#include <future>
|
||||||
|
|
||||||
#include "fixedQueue.h"
|
#include "../fixedQueue.h"
|
||||||
|
|
||||||
class DivWorkPool;
|
class DivWorkPool;
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#define _FIXED_QUEUE_H
|
#define _FIXED_QUEUE_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "../ta-log.h"
|
#include "ta-log.h"
|
||||||
|
|
||||||
template<typename T, size_t items> struct FixedQueue {
|
template<typename T, size_t items> struct FixedQueue {
|
||||||
size_t readPos, writePos;
|
size_t readPos, writePos;
|
Loading…
Reference in a new issue