#include <aibosound.h>
Collaboration diagram for AiboSound:
Public Member Functions | |
AiboSound () | |
virtual | ~AiboSound () |
Sound Playing | |
The followign methods are usefull for soundplayback with teh AIBO. | |
void | OpenSpeaker () |
OPrimitiveID | GetSpeakerID () |
bool | IsAllRegionFree () |
void | NewSoundVectorData () |
RCRegion * | GetCommandVector (int index=0) |
WAVError | CopyWAVToRegion (RCRegion *region, int index) |
WAVError | CopyWAVToRegion (RCRegion *region, WAV wave) |
WAVError | CopyWAVToRegion (int regionIndex=0, int waveIndex=0) |
RCRegion * | FindFreeRegion () const |
int | FindFreeRegionIndex () const |
RCRegion * | GetRegion (int index) |
void | LoadWAV (char *sound) |
void | RewindWAV (int index) |
void | SetVolume (OSpeakerVolume vol) |
void | SetMute (bool mute) |
void | SetWaveType (int index=0) |
void | SetWaveType (WAVE_TYPE typ) |
int | GetValidRegions () |
int | GetValidWaves () |
WAV | GetWAV (int index) |
void | DeleteWaves () |
Sound recording | |
The following functions allow you to the set options for sound recording with the AIBO | |
void | OpenMic (MIC_MODE mode=OMNI) |
void | NewSoundBuffer (int numSeconds) |
void | NewSoundBufferFrames (int numFrames) |
void | ResetSoundBuffer () |
void | DeleteSoundBuffer () |
void | CopyToSoundBuffer (OSoundVectorData *vec) |
void | SaveBuffer (char *file) |
void | SetMicMode (MIC_MODE mode) |
void | SetMicMode (OPrimitiveRequest req) |
void | SetMicALC (bool alc) |
size_t | GetBufferSize () |
size_t | GetNumberOfFrames () |
Protected Attributes | |
OPrimitiveID | SpeakerID |
RCRegion * | Region [MaxSoundRegions] |
WAV | Waves [MaxWaves] |
ODesignDataID | WavID [MaxWaves] |
int | ValidWaves |
OPrimitiveID | MicID |
byte * | SoundBuf |
byte * | SoundBufPtr |
size_t | SoundBufSize |
size_t | NumberOfFrames |
Static Protected Attributes | |
static const int | MaxSoundRegions = 2 |
static const int | MaxWaves = 10 |
static const size_t | SOUND_UNIT_SIZE_8 = 256 |
static const size_t | SOUND_UNIT_SIZE_16 = 1024 |
static const size_t | SOUND_REC_SIZE16 = 2048 |
static const size_t | SOUND_REC_SIZE16_1SEC = 65536 |
static const size_t | WAVE_HEADER_SIZE = 4 + 8 + 16 + 8 |
static const size_t | FMTSIZE_WITHOUT_EXTINFO = 16 |
|
Default constructor |
|
Default destructor |
|
Opens the Speaker (sets OPrimitiveID SpeakerID) |
|
Returns the primitive id of the speaker
|
|
Methods looks if all sound regions in Region[] are free
|
|
Generates an new sound data vector an RCRegion |
|
Returns the CommandVectorData obtained by the region corresponding to the index
|
|
Copys the wave file corresponding to index into the given RCRegion (makes it playable)
Here is the call graph for this function: |
|
Copys the wave file into the given RCRegion (makes it playable)
Here is the call graph for this function: |
|
Copy's the wave file corresponding to waveIndex into the given RCRegion corresponding to regionIndex (makes it playable)
Here is the call graph for this function: |
|
Locates an free region to which the wave data can be copied
|
|
Locates an free region to which the wave data can be copied
|
|
Returns the RCRegion with the index
|
|
Loads the wave file corresponding to entry in DESINGDB.CFG on memstick
Here is the call graph for this function: |
|
Rewinds the wave file corresponding to index
Here is the call graph for this function: |
|
Sets the speaker volume to a given level
|
|
Enables or disables muting for speaker
|
|
Detects the Type of the loaded wave file
Here is the call graph for this function: |
|
Sets the type of the loaded wave file
|
|
Returns the number of valid sound regions
|
|
Returns var "ValidWaves"
|
|
Returns the WAV file from var. "WaveFiles" corresponding to index
|
|
Deletes the WavID's from array "WavID" |
|
Opens the Mic (sets OPrimitiveID MicID)
Here is the call graph for this function: |
|
Creates an new Buffer for sound recording
|
|
Creates an new Buffer for sound recording
|
|
Resets the sound buffer (empty's it for new recordings) |
|
Deletes the sound buffer |
|
Copys the sound data of one frame from the vector into the Buffer
|
|
Saves the sound buffer as wave file on the memorystick
|
|
Sets the mode of the mic
|
|
Sets the mode of the mic
|
|
Enables or disables the automatic limit control (ALC for the mic)
|
|
Returns the size of the sound buffer "SoundBuf"
|
|
Returns the number of frames, needed to fill the sound buffer
|
|
The primitve ID of the speaker |
|
Maximal allowed number of sound buffers |
|
Maximal allowed number of wave files |
|
RCRegions which contain the SoundVectortData |
|
The wave files |
|
The ID of the wave files |
|
Number of valid wave files for playing |
|
bytes needed per one frame playback 8KHz 8bits MONO (8 * 1 * 1 * 32 = 256) |
|
bytes needed per one frame playback 16KHz 16bits MONO (16 * 2 * 1 * 32 = 256) |
|
The primitive ID of the mic |
|
The sound buffer |
|
A pointer to the sound buffer |
|
The size of the sound buffer |
|
Number of frames (32ms) needed to fill buffer |
|
Size of 16kHz 16bit Stereo for one frame (32 ms) (16 * 2 * 2 * 32 = 2048) |
|
Size of 16kHz 16bit Stereo for one second (1024ms) (16 * 2 * 2 * 32 * 32 = 65536) |
|
Constant introduced by SONY |
|
Constant introduced by SONY |
Tim Baier
AiboLib v0.2.4 |
Generated Thu Jan 19 11:56:07 2006 by 1.4.3 |