00001
00018 #ifndef JezabelOSSDriver_included
00019 #define JezabelOSSDriver_included
00020
00021 #include <jezabeldriver.h>
00022
00023
00031 class JezabelOSSDriver : public JezabelDriver {
00032 public:
00033
00037 JezabelOSSDriver(const char *device);
00038
00039 virtual ~JezabelOSSDriver(){}
00040
00041 virtual void setTool(JezabelTool *tool);
00042
00043 virtual void start(JezabelPosition max = JezabelLengthMax);
00044
00045 virtual void stop();
00046
00047 virtual void doit();
00048
00050 static char *deviceName(int N);
00051
00052 protected:
00053
00054 char *device;
00055 int playback_ports, capture_ports;
00056 int *oss_handles;
00057 unsigned int playback_voices;
00058 unsigned int capture_voices;
00059 unsigned int bytes_per_sample;
00060 unsigned int samples_per_frame;
00061 unsigned int playback_bytes_per_frame;
00062 unsigned int capture_bytes_per_frame;
00063 bool device_is_open;
00064 char *playback_frame, *capture_frame;
00065 int frame_count;
00066
00067 void start_audio();
00068
00069
00070 };
00071
00072 #endif
00073
00074