00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __JackNetAdapter__
00021 #define __JackNetAdapter__
00022
00023 #include "JackAudioAdapterInterface.h"
00024 #include "JackNetInterface.h"
00025
00026 namespace Jack
00027 {
00028
00033 class JackNetAdapter : public JackAudioAdapterInterface, public JackNetSlaveInterface, public JackRunnableInterface
00034 {
00035 private:
00036
00037 jack_client_t* fJackClient;
00038
00039
00040 int fLastTransportState;
00041 int fLastTimebaseMaster;
00042
00043
00044 sample_t** fSoftCaptureBuffer;
00045 sample_t** fSoftPlaybackBuffer;
00046
00047
00048 JackThread fThread;
00049
00050
00051 void EncodeTransportData();
00052 void DecodeTransportData();
00053
00054 public:
00055
00056 JackNetAdapter ( jack_client_t* jack_client, jack_nframes_t buffer_size, jack_nframes_t sample_rate, const JSList* params );
00057 ~JackNetAdapter();
00058
00059 int Open();
00060 int Close();
00061
00062 int SetBufferSize ( jack_nframes_t buffer_size );
00063
00064 bool Init();
00065 bool Execute();
00066
00067 int Read();
00068 int Write();
00069
00070 int Process();
00071 };
00072 }
00073
00074 #endif