User manual

Copyright © Dr Robot Inc. 2005
60
IV. WiRobot SDK API Reference for PMB5010
WiRobot SDK APIs for PMB5010 supports advanced Multimedia Control features.
IV.1 Multimedia Control
This section contains the APIs for the operations of audio input and output, image capturing and LCD
display.
IV.1.1 Audio Input and Output
115 void PlayAudioFile(LPCTSTR fileName);
Description:
PlayAudioFile sends an audio file (.wav format) to the Multimedia Controller (PMB5010).
The file will be played back on the speaker.
Syntax: PlayAudioFile (FileName);
Parameter: LPCTSTR FileName; //the file name with full path
Return value: void
Remarks:
The .wav audio file should contain 16-bit sound wave data sampled at 8 kHz with PCM raw
data format using mono channel. Other supplied wave file format will still be played by the
robot but may have undesired result.
116 void StopAudioPlay ();
Description:
StopAudioPlay stops a playing audio on the Multimedia Controller (PMB5010).
Syntax: StopAudioPlay ();
Return value: void
Remarks:
There will be no effect if no audio is playing.
117 long GetVoiceSegment();
Description:
GetVoiceSegment returns the pointer to current voice data (recorded from robot
microphone) in memory.