// // Programmer: Craig Stuart Sapp // Creation Date: Wed Jun 27 12:23:25 PDT 2001 // Last Modified: Wed Jun 27 12:23:27 PDT 2001 // Filename: ...sig/maint/code/audio/AudioIO/oss/DspIO_oss.h // Web Address: http://sig.sapp.org/include/sig/DspIO_oss.h // Syntax: C++ // // Description: Basic Audio input/output functionality for the // Linux OSS audio device /dev/dsp. This class // is inherited by the classes AudioIn_oss and // AudioOut_oss. Only one device is allowed // at this time. // #ifdef LINUX #ifndef _DSPIO_OSS_H_INCLUDED #define _DSPIO_OSS_H_INCLUDED #ifndef OLDCPP #include using namespace std; #else #include #endif typedef unsigned char uchar; class DspIO_oss { public: DspIO_oss (void); ~DspIO_oss (); void close (void); int open (void); int open16LSB (int channels = 1, double samplingrate = 44100.0); int is_open (void); void read (uchar* buf, int count); int getFd (void); protected: static int openQ; // 1 = open, 0 = closed static const char* dsp; // name of dsp device static int dsp_fd; // dsp file descriptor static int numchans; // number of channels static int srate; // sampling rate static int format; // sample format static int class_count; // number of active class objects }; #endif /* _DSPIO_OSS_H_INCLUDED */ #endif /* LINUX */ // md5sum: 75c193a9291677da2acf3556d54acaf1 DspIO_oss.h [20050403]