UtiLite
0.3.1
A lite utilities library
|
#include <UAudioCaptureFile.h>
Inherits UAudioCapture.
Protected Member Functions | |
virtual void | mainLoopBegin () |
virtual void | mainLoop () |
virtual void | mainLoopEnd () |
This recorder loads frames from an audio file in the samples list of the UAudioCapture. Almost all audio file types are supported (see Fmod audio types supported).
Example :
UAudioCapture* recorder = new UAudioCaptureFile("fileName.wav"); Frame frame; unsigned int frameId = 0; recorder->start(); while(recorder->getNextFrame(frame, frameId)) { ...process the frame... ... break when a condition is reached... } recorder->stop(); delete recorder;
virtual void UAudioCaptureFile::mainLoop | ( | ) | [protected, virtual] |
Pure virtual method mainLoop(). The inner loop of the thread. This method is called repetitively until the thread is killed. Note that if kill() is called in mainLoopBegin(), mainLoop() is not called, terminating immediately the thread.
Implements UThread.
virtual void UAudioCaptureFile::mainLoopBegin | ( | ) | [protected, virtual] |
Virtual method mainLoopBegin(). User can implement this function to add a behavior before the main loop is started. It is called once (before entering mainLoop()).
Reimplemented from UThread.
virtual void UAudioCaptureFile::mainLoopEnd | ( | ) | [protected, virtual] |
Virtual method mainLoopEnd(). User can implement this function to add a behavior after the thread is killed (after exiting the mainLoop(), work is still done in the thread before exiting).
Reimplemented from UAudioCapture.