.TH "aflibDevFile" 3 "16 Jan 2007" "Open Source Audio Library Project" \" -*- nroff -*- .ad l .nh .SH NAME aflibDevFile \- Derived class to read and write to a Linux audio device. .PP .SH SYNOPSIS .br .PP \fC#include \fP .PP Inherits \fBaflibFile\fP. .PP .SS "Public Member Functions" .in +1c .ti -1c .RI "aflibStatus \fBafopen\fP (const char *file, \fBaflibConfig\fP *cfg)" .br .RI "\fIMain API for opening a file or device in read mode. \fP" .ti -1c .RI "aflibStatus \fBafcreate\fP (const char *file, const \fBaflibConfig\fP &config)" .br .RI "\fIMain API for opening a file or device in write mode. \fP" .ti -1c .RI "aflibStatus \fBafread\fP (\fBaflibData\fP &data, long long position=-1)" .br .RI "\fIMain API function to read a segment of data. \fP" .ti -1c .RI "aflibStatus \fBafwrite\fP (\fBaflibData\fP &data, long long position=-1)" .br .RI "\fIMain API function to write a segment of audio data. \fP" .ti -1c .RI "bool \fBsetItem\fP (const char *item, const void *value)" .br .RI "\fIProcesses unique information for the Linux sound device. \fP" .ti -1c .RI "void \fBprogramDevice\fP ()" .br .ti -1c .RI "bool \fBisDataSizeSupported\fP (aflib_data_size size)" .br .ti -1c .RI "bool \fBisEndianSupported\fP (aflib_data_endian end)" .br .ti -1c .RI "bool \fBisSampleRateSupported\fP (int &rate)" .br .in -1c .SH "Detailed Description" .PP Derived class to read and write to a Linux audio device. This is the class for Linux Device audio file reading and writing. It is based on the OSS API. It is as follows: .PP Controlling the format data can be done by ioctl commands as follows: SNDCTL_DSP_SETFMT - Set Format of data to and from port AFMT_U8 - Unsigned 8 bit data AFMT_S16_LE - Signed 16 bit data Little Endian SNDCTL_DSP_STEREO - Set number of channels 0 - Mono 1 - Stereo SNDCTL_DSP_SPEED - Sample Rate in samples per second SNDCTL_DSP_SETFRAGMENT - Set buffer sizes 0xMMMMSSSS - 2 to the SSSS power gives size of buffer. MMMM is num of fragments SNDCTL_DSP_GETBLKSIZE - Get fragment size in bytes .PP .SH "Member Function Documentation" .PP .SS "aflibStatus aflibDevFile::afcreate (const char * file, const \fBaflibConfig\fP & config)\fC [virtual]\fP" .PP Main API for opening a file or device in write mode. .PP This function is only used for module support. For no module support the derived classes afcreate function will be called instead. For module support this function will make a call to the derived classes function. .PP Reimplemented from \fBaflibFile\fP. .SS "aflibStatus aflibDevFile::afopen (const char * file, \fBaflibConfig\fP * cfg)\fC [virtual]\fP" .PP Main API for opening a file or device in read mode. .PP This function is only used for module support. For no modules support the derived classes afopen function will be called instead. For module support this function will make a call to the derived classes function. .PP Reimplemented from \fBaflibFile\fP. .SS "aflibStatus aflibDevFile::afread (\fBaflibData\fP & data, long long position = \fC-1\fP)\fC [virtual]\fP" .PP Main API function to read a segment of data. .PP This function is only used for module support. For no module support the derived classes afread function will be called instead. For module support this function will make a call to the derived classes function. .PP Reimplemented from \fBaflibFile\fP. .SS "aflibStatus aflibDevFile::afwrite (\fBaflibData\fP & data, long long position = \fC-1\fP)\fC [virtual]\fP" .PP Main API function to write a segment of audio data. .PP This function is only used for module support. For no module support the derived classes afwrite function will be called instead. For module support this function will make a call to the derived class. .PP Reimplemented from \fBaflibFile\fP. .SS "bool aflibDevFile::setItem (const char * item, const void * value)\fC [virtual]\fP" .PP Processes unique information for the Linux sound device. .PP This will process any unique information for the Linux audio device. It currently supports one item. It is AFLIB_DEV_ITEM_BUFFER. It will expect a value that is of type double. This will create a buffer in the hardware, if it is supported, of the length specified in seconds. .PP Reimplemented from \fBaflibFile\fP. .SH "Author" .PP Generated automatically by Doxygen for Open Source Audio Library Project from the source code.