sipxmedialib
Version 3.3
|
Wrapper for OSS device that use file descriptor to communicate. More...
#include <MpOss.h>
Public Member Functions | |
Creators | |
MpOss () | |
Constructor. More... | |
~MpOss () | |
Destructor. More... | |
Manipulators | |
OsStatus | setInputDevice (MpidOss *pIDD) |
Connect MpidOss class driver. More... | |
OsStatus | setOutputDevice (MpodOss *pODD) |
Connect MpodOss class driver. More... | |
OsStatus | freeInputDevice () |
Disconnect Input driver. More... | |
OsStatus | freeOutputDevice () |
Disconnect Output driver. More... | |
OsStatus | attachReader () |
Enable input device. More... | |
OsStatus | attachWriter () |
Enable output device. More... | |
OsStatus | detachReader () |
Disable input device. More... | |
OsStatus | detachWriter () |
Disable output device. More... | |
Inquiry | |
UtlBoolean | isDeviceValid () |
Inquire if the device is valid. More... | |
UtlBoolean | isReaderAttached () |
Inquire if the input device is connected. More... | |
UtlBoolean | isWriterAttached () |
Inquire if the output device is connected. More... | |
UtlBoolean | isDevCapBatch () |
UtlBoolean | isDevCapDuplex () |
UtlBoolean | isDevCapMmap () |
UtlBoolean | isDevCapTrigger () |
UtlBoolean | isNotUsed () |
Inquire if OSS device is free, i.e. neither input nor output is connected. More... | |
Protected Member Functions | |
OsStatus | initDevice (const char *devname) |
Pre initializations for OSS device. More... | |
OsStatus | initDeviceFinal (unsigned samplesPerSec, unsigned samplerPerFrame) |
Final initializations for OSS device. More... | |
OsStatus | freeDevice () |
Free OSS device. More... | |
OsStatus | setSampleRate (unsigned samplesPerSec, unsigned samplerPerFrame) |
Because OSS device works in duplex mode we must ensure that input and output driver use one sample rate and perfrom final init. More... | |
OsStatus | doInput (char *buffer, int size) |
Perform input operation of OSS device. More... | |
OsStatus | doOutput (const char *buffer, int size) |
Perform output operation of OSS device. More... | |
OsStatus | doInputRs (MpAudioSample *buffer, unsigned size) |
Perform input operation of OSS device with siutable resampler. More... | |
OsStatus | doOutputRs (const MpAudioSample *buffer, unsigned size) |
Perform output operation of OSS device with siutable resampler. More... | |
void | noMoreNeeded () |
Deinitialization and freeing sequences. More... | |
void | soundIoThread () |
Thread subroutine. More... | |
Protected Attributes | |
int | mfdDevice |
The fd of the POSIX device (e.g. /dev/dsp) More... | |
UtlBoolean | mbReadCap |
Device is able to play audio. More... | |
UtlBoolean | mbWriteCap |
Device is able to capture audio. More... | |
MpidOss * | mReader |
Input driver. More... | |
MpodOss * | mWriter |
Output driver. More... | |
int | mDeviceCap |
Device capabilities. More... | |
volatile UtlBoolean | mStReader |
Input device is enabled. More... | |
volatile UtlBoolean | mStWriter |
Output device is enabled. More... | |
volatile UtlBoolean | mStShutdown |
Thread exit flag. More... | |
volatile UtlBoolean | mModeChanged |
IO settings has changed. More... | |
unsigned | mUsedSamplesPerSec |
Used samples rate either for IO. More... | |
unsigned | mUsedSamplesPerFrame |
Used frame size for IO. More... | |
MpAudioSample * | mResamplerBuffer |
Buffer for conversions. More... | |
UtlBoolean | mStereoOps |
Use stereo output. More... | |
pthread_t | mIoThread |
Internal IO thread. More... | |
sem_t | mSleepSem |
Control IO thread sleeping. More... | |
sem_t | mSignalSem |
Use for parameters synchronization. More... | |
Private Member Functions | |
void | threadIoStatusChanged () |
void | threadWakeUp () |
void | threadKill () |
UtlBoolean | ossSetTrigger (bool turnOn) |
UtlBoolean | ossReset () |
Static Private Member Functions | |
static void * | soundCardIoWrapper (void *arg) |
Thread subroutine. More... | |
Friends | |
class | MpidOss |
class | MpodOss |
Wrapper for OSS device that use file descriptor to communicate.
MpOss | ( | ) |
Constructor.
~MpOss | ( | ) |
Destructor.
OsStatus freeInputDevice | ( | ) |
Disconnect Input driver.
OsStatus freeOutputDevice | ( | ) |
Disconnect Output driver.
OsStatus attachReader | ( | ) |
Enable input device.
OsStatus attachWriter | ( | ) |
Enable output device.
OsStatus detachReader | ( | ) |
Disable input device.
OsStatus detachWriter | ( | ) |
Disable output device.
|
inline |
Inquire if the device is valid.
|
inline |
Inquire if the input device is connected.
|
inline |
Inquire if the output device is connected.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Inquire if OSS device is free, i.e. neither input nor output is connected.
|
protected |
Pre initializations for OSS device.
|
protected |
Final initializations for OSS device.
|
protected |
Free OSS device.
|
protected |
Because OSS device works in duplex mode we must ensure that input and output driver use one sample rate and perfrom final init.
|
protected |
Perform input operation of OSS device.
|
protected |
Perform output operation of OSS device.
|
protected |
Perform input operation of OSS device with siutable resampler.
|
protected |
Perform output operation of OSS device with siutable resampler.
|
protected |
Deinitialization and freeing sequences.
|
protected |
Thread subroutine.
|
private |
|
private |
|
private |
|
private |
|
private |
|
staticprivate |
Thread subroutine.
|
friend |
|
friend |
|
protected |
The fd of the POSIX device (e.g. /dev/dsp)
|
protected |
Device is able to play audio.
|
protected |
Device is able to capture audio.
|
protected |
Input driver.
|
protected |
Output driver.
|
protected |
Device capabilities.
|
protected |
Input device is enabled.
|
protected |
Output device is enabled.
|
protected |
Thread exit flag.
|
protected |
IO settings has changed.
|
protected |
Used samples rate either for IO.
|
protected |
Used frame size for IO.
|
protected |
Buffer for conversions.
|
protected |
Use stereo output.
|
protected |
Internal IO thread.
|
protected |
Control IO thread sleeping.
|
protected |
Use for parameters synchronization.