13 #ifndef _MpSineWaveGeneratorDeviceDriver_h_ 14 #define _MpSineWaveGeneratorDeviceDriver_h_ 17 #include <utl/UtlDefs.h> 18 #include <os/OsStatus.h> 19 #include <utl/UtlString.h> 57 unsigned int magnitude,
58 unsigned int periodInMicroseconds,
87 unsigned samplesPerSec,
111 virtual OsStatus
setTone(
unsigned int periodInMicroseconds);
125 unsigned int magnitude,
126 unsigned int periodInMicroseconds,
127 unsigned int frameSampleIndex,
128 unsigned int samplesPerFrame,
182 #endif // _MpSineWaveGeneratorDeviceDriver_h_ OsServerTask * mpReaderTask
Definition: MpSineWaveGeneratorDeviceDriver.h:171
uint32_t MpFrameTime
Definition: MpTypes.h:53
static MpAudioSample calculateSample(MpFrameTime frameStartTime, unsigned int magnitude, unsigned int periodInMicroseconds, unsigned int frameSampleIndex, unsigned int samplesPerFrame, unsigned int samplesPerSecond)
Calculate a sample value for the specified sample in a frame.
Definition: MpSineWaveGeneratorDeviceDriver.cpp:278
UtlBoolean isDeviceValid()
Inquire if the device is valid.
Definition: MpSineWaveGeneratorDeviceDriver.h:176
unsigned int mPeriodInMicroseconds
Definition: MpSineWaveGeneratorDeviceDriver.h:169
virtual OsStatus setTone(unsigned int periodInMicroseconds)
Set a new tone to be played.
Definition: MpSineWaveGeneratorDeviceDriver.cpp:260
virtual ~MpSineWaveGeneratorDeviceDriver()
Destructor.
Definition: MpSineWaveGeneratorDeviceDriver.cpp:195
int16_t MpAudioSample
Definition: MpTypes.h:44
virtual OsStatus setMagnitude(unsigned int magnitude)
Set a new magnitude to be played.
Definition: MpSineWaveGeneratorDeviceDriver.cpp:268
int mRelativeSpeed
Definition: MpSineWaveGeneratorDeviceDriver.h:170
virtual OsStatus enableDevice(unsigned samplesPerFrame, unsigned samplesPerSec, MpFrameTime currentFrameTime)
Initialize device driver and state.
Definition: MpSineWaveGeneratorDeviceDriver.cpp:208
MpSineWaveGeneratorDeviceDriver & operator=(const MpSineWaveGeneratorDeviceDriver &rhs)
Assignment operator (not implemented for this class)
unsigned int mMagnitude
Definition: MpSineWaveGeneratorDeviceDriver.h:168
MpSineWaveGeneratorDeviceDriver(const UtlString &name, MpInputDeviceManager &deviceManager, unsigned int magnitude, unsigned int periodInMicroseconds, int relativeSpeed)
Default constructor.
Definition: MpSineWaveGeneratorDeviceDriver.cpp:181
virtual OsStatus disableDevice()
Uninitialize device driver.
Definition: MpSineWaveGeneratorDeviceDriver.cpp:242
#define TRUE
Definition: PlgDefsV1.h:41
Sine wave generator Input Device Driver.
Definition: MpSineWaveGeneratorDeviceDriver.h:45