1
//=========================================================
4
// $Id: audio.h,v 1.1.1.1 2003/10/29 10:05:15 wschweer Exp $
6
// (C) Copyright 2001 Werner Schweer (ws@seh.de)
7
//=========================================================
13
#include "driver/jackaudio.h"
27
AUDIO_SET_MIXDOWN, AUDIO_RECORD,
28
AUDIO_ROUTEADD, AUDIO_ROUTESET, AUDIO_ROUTEREMOVE,
31
AUDIO_REMOVE_SYNTHI, AUDIO_ADD_SYNTHI,
33
AUDIO_SET_PREFADER, AUDIO_SET_CHANNELS,
34
AUDIO_SEEK, AUDIO_PLAY,
35
AUDIO_ADD_PART, AUDIO_CHANGE_PART, AUDIO_REMOVE_PART,
37
AUDIO_UNDO, AUDIO_REDO,
40
//---------------------------------------------------------
42
//---------------------------------------------------------
44
struct AudioMsg { // this should be an union
62
//---------------------------------------------------------
64
//---------------------------------------------------------
69
void processMsg(const volatile AudioMsg* msg);
70
volatile bool playState;
73
volatile AudioMsg* msg;
80
pthread_mutex_t msgMutex;
82
pthread_mutex_t mutex; // protect sampleTime
90
void process(unsigned long samples);
91
int pos() { return curSamplePos; }
98
void setRunning(bool val) { _running = val; }
99
bool isPlaying() const { return playState; }
100
void sendMsg(AudioMsg*);
101
void msgRemoveRoute(AudioNode*, AudioNode*);
102
void msgAddRoute(AudioNode*, AudioNode*);
103
void msgSetRoute(AudioNode*, AudioNode*);
104
void msgAddPlugin(AudioNode*, int idx, PluginI* plugin);
105
void msgSetMute(AudioNode*, bool val);
106
void msgSetVolume(AudioNode*, double val);
107
void msgSetPan(AudioNode*, double val);
108
void msgAddSynthI(SynthI* synth);
109
void msgRemoveSynthI(SynthI* synth);
110
void msgSetSegSize(int, int);
111
void msgSetPrefader(AudioNode*, int);
112
void msgSetChannels(AudioNode*, int);
114
// void msgSetRecFile(AudioNode*, SndFile* sf);
115
void msgSetOff(AudioNode*, bool);
116
void msgSetRecord(AudioNode*, bool);
118
void msgPlay(bool flag);
120
void msgAddPart(WavePart*);
121
void msgRemovePart(WavePart*);
122
void msgChangePart(WavePart* s, WavePart* d);
123
void msgRemoveTrack(WaveTrack*);
134
void seek(int tickpos);
137
extern int processAudio(jack_nframes_t, void*);
138
extern void processAudio1(void*, void*);
141
extern AudioDevice* audioDevice; // current audio device in use