RioEngine
0.1
My first attempt to create a 3D WYSIWYG Game Engine
|
Interface to an audio recorder. Create it using the createIrrKlangAudioRecorder() function. More...
#include <ik_IAudioRecorder.h>
Public Member Functions | |
virtual bool | startRecordingBufferedAudio (ik_s32 sampleRate=22000, ESampleFormat sampleFormat=ESF_S16, ik_s32 channelCount=1)=0 |
Starts recording audio. More... | |
virtual bool | startRecordingCustomHandledAudio (ICapturedAudioDataReceiver *receiver, ik_s32 sampleRate=22000, ESampleFormat sampleFormat=ESF_S16, ik_s32 channelCount=1)=0 |
Starts recording audio. More... | |
virtual void | stopRecordingAudio ()=0 |
Stops recording audio. More... | |
virtual ISoundSource * | addSoundSourceFromRecordedAudio (const char *soundName)=0 |
Creates a sound source for the recorded audio data. More... | |
virtual void | clearRecordedAudioDataBuffer ()=0 |
Clears recorded audio data buffer, freeing memory. More... | |
virtual bool | isRecording ()=0 |
Returns if the recorder is currently recording audio. More... | |
virtual SAudioStreamFormat | getAudioFormat ()=0 |
Returns the audio format of the recorded audio data. More... | |
virtual void * | getRecordedAudioData ()=0 |
Returns a pointer to the recorded audio data. More... | |
virtual const char * | getDriverName ()=0 |
returns the name of the sound driver, like 'ALSA' for the alsa device. More... | |
![]() | |
IRefCounted () | |
Constructor. More... | |
virtual | ~IRefCounted () |
Destructor. More... | |
void | grab () |
bool | drop () |
Interface to an audio recorder. Create it using the createIrrKlangAudioRecorder() function.
It creates sound sources into an ISoundEngine which then can be played there. See Recording Audio for an example on how to use this.
Definition at line 19 of file ik_IAudioRecorder.h.
|
pure virtual |
Creates a sound source for the recorded audio data.
The returned sound source pointer then can be used to play back the recorded audio data using ISoundEngine::play2D(). This method only will succeed if the audio was recorded using startRecordingBufferedAudio() and audio recording is currently stopped.
soundName | Name of the virtual sound file (e.g. "someRecordedAudio"). You can also use this name when calling play3D() or play2D(). |
|
pure virtual |
Clears recorded audio data buffer, freeing memory.
This method will only succeed if audio recording is currently stopped.
|
pure virtual |
Returns the audio format of the recorded audio data.
Also contains informations about the length of the recorded audio stream.
|
pure virtual |
returns the name of the sound driver, like 'ALSA' for the alsa device.
Possible returned strings are "NULL", "ALSA", "CoreAudio", "winMM", "DirectSound" and "DirectSound8".
|
pure virtual |
Returns a pointer to the recorded audio data.
This method will only succeed if audio recording is currently stopped and something was recorded previously using startRecordingBufferedAudio(). The lenght of the buffer can be retrieved using getAudioFormat().getSampleDataSize(). Note that the pointer is only valid as long as not clearRecordedAudioDataBuffer() is called or another sample is recorded.
|
pure virtual |
Returns if the recorder is currently recording audio.
|
pure virtual |
Starts recording audio.
Clears all possibly previously recorded buffered audio data and starts to record. When finished recording audio data, call stopRecordingAudio(). All recorded audio data gets stored into an internal audio buffer, which can then be accessed for example using addSoundSourceFromRecordedAudio() or getRecordedAudioData(). For recording audio data not into an internal audio buffer, use startRecordingCustomHandledAudio().
sampleRate | Sample rate of the recorded audio. |
sampleFormat | Sample format of the recorded audio. |
channelCount | Amount of audio channels. |
|
pure virtual |
Starts recording audio.
Clears all possibly previously recorded buffered audio data and starts to record audio data, which is delivered to a custom user callback interface. When finished recording audio data, call stopRecordingAudio(). If instead of recording the data to the receiver interface recording into a managed buffer is wished, use startRecordingBufferedAudio() instead.
receiver | Interface to be implemented by the user, gets called once for each captured audio data chunk. |
sampleRate | Sample rate of the recorded audio. |
sampleFormat | Sample format of the recorded audio. |
channelCount | Amount of audio channels. |
|
pure virtual |
Stops recording audio.