00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __JackAudioDriver__
00022 #define __JackAudioDriver__
00023
00024 #include "JackDriver.h"
00025
00026 namespace Jack
00027 {
00028
00042 class SERVER_EXPORT JackAudioDriver : public JackDriver
00043 {
00044
00045 protected:
00046
00047 jack_default_audio_sample_t* GetInputBuffer(int port_index);
00048 jack_default_audio_sample_t* GetOutputBuffer(int port_index);
00049 jack_default_audio_sample_t* GetMonitorBuffer(int port_index);
00050
00051 void HandleLatencyCallback(int status);
00052 virtual void UpdateLatencies();
00053
00054 int ProcessAsync();
00055 void ProcessGraphAsync();
00056 void ProcessGraphAsyncMaster();
00057 void ProcessGraphAsyncSlave();
00058
00059 int ProcessSync();
00060 void ProcessGraphSync();
00061 void ProcessGraphSyncMaster();
00062 void ProcessGraphSyncSlave();
00063
00064 public:
00065
00066 JackAudioDriver(const char* name, const char* alias, JackLockedEngine* engine, JackSynchro* table);
00067 virtual ~JackAudioDriver();
00068
00069 virtual int Open(jack_nframes_t buffer_size,
00070 jack_nframes_t samplerate,
00071 bool capturing,
00072 bool playing,
00073 int inchannels,
00074 int outchannels,
00075 bool monitor,
00076 const char* capture_driver_name,
00077 const char* playback_driver_name,
00078 jack_nframes_t capture_latency,
00079 jack_nframes_t playback_latency);
00080
00081
00082
00083
00084
00085 virtual int Process();
00086
00087 virtual int Attach();
00088 virtual int Detach();
00089
00090 virtual int Write();
00091
00092 virtual int SetBufferSize(jack_nframes_t buffer_size);
00093 virtual int SetSampleRate(jack_nframes_t sample_rate);
00094
00095 virtual int ClientNotify(int refnum, const char* name, int notify, int sync, const char* message, int value1, int value2);
00096
00097 };
00098
00099 }
00100
00101 #endif