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
00033 class SERVER_EXPORT JackAudioDriver : public JackDriver
00034 {
00035
00036 protected:
00037
00038 jack_default_audio_sample_t* GetInputBuffer(int port_index);
00039 jack_default_audio_sample_t* GetOutputBuffer(int port_index);
00040 jack_default_audio_sample_t* GetMonitorBuffer(int port_index);
00041
00042 void HandleLatencyCallback(int status);
00043 virtual void UpdateLatencies();
00044
00045 int ProcessAsync();
00046 void ProcessGraphAsync();
00047 void ProcessGraphAsyncMaster();
00048 void ProcessGraphAsyncSlave();
00049
00050 int ProcessSync();
00051 void ProcessGraphSync();
00052 void ProcessGraphSyncMaster();
00053 void ProcessGraphSyncSlave();
00054
00055 public:
00056
00057 JackAudioDriver(const char* name, const char* alias, JackLockedEngine* engine, JackSynchro* table);
00058 virtual ~JackAudioDriver();
00059
00060 virtual int Open(jack_nframes_t buffer_size,
00061 jack_nframes_t samplerate,
00062 bool capturing,
00063 bool playing,
00064 int inchannels,
00065 int outchannels,
00066 bool monitor,
00067 const char* capture_driver_name,
00068 const char* playback_driver_name,
00069 jack_nframes_t capture_latency,
00070 jack_nframes_t playback_latency);
00071
00072 virtual int Open(bool capturing,
00073 bool playing,
00074 int inchannels,
00075 int outchannels,
00076 bool monitor,
00077 const char* capture_driver_name,
00078 const char* playback_driver_name,
00079 jack_nframes_t capture_latency,
00080 jack_nframes_t playback_latency);
00081
00082 virtual int Process();
00083
00084 virtual int Attach();
00085 virtual int Detach();
00086
00087 virtual int Write();
00088
00089 virtual int SetBufferSize(jack_nframes_t buffer_size);
00090 virtual int SetSampleRate(jack_nframes_t sample_rate);
00091
00092 virtual int ClientNotify(int refnum, const char* name, int notify, int sync, const char* message, int value1, int value2);
00093
00094 };
00095
00096 }
00097
00098 #endif