#include <Voice.h>
Inherits cinder::audio::Voice.
Concrete Voice for sample playback.
Depending on the size of the specified file, playback will either be done in-memory (with BufferPlayerNode) or streaming (with FilePlayerNode). The maximum frames for in-memory playback can be specified with Voice::Options::maxFramesForBufferPlayback() Create with Voice::create( const SourceFileRef &sourceFile, const Options &options )
cinder::audio::VoiceSamplePlayerNode::VoiceSamplePlayerNode |
( |
const SourceFileRef & |
sourceFile, |
|
|
const Options & |
options |
|
) |
| |
|
protected |
NodeRef cinder::audio::VoiceSamplePlayerNode::getInputNode |
( |
| ) |
const |
|
overridevirtual |
void cinder::audio::VoiceSamplePlayerNode::start |
( |
| ) |
|
|
overridevirtual |
void cinder::audio::VoiceSamplePlayerNode::stop |
( |
| ) |
|
|
overridevirtual |
Creates a Voice that manages sample playback of an audio file pointed at with sourceFile.
Creates a Voice that continuously calls callbackFn to process a Buffer of samples.
void cinder::audio::Voice::clearBufferCache |
( |
| ) |
|
|
staticinherited |
Clears all audio file buffers that that are cached in the Mixer.
void cinder::audio::Voice::pause |
( |
| ) |
|
|
virtualinherited |
Pauses the Voice inits current state. start() will resume from here.
bool cinder::audio::Voice::isPlaying |
( |
| ) |
const |
|
virtualinherited |
Returns whether the Voice is currently playing or not.
NodeRef cinder::audio::Voice::getOutputNode |
( |
| ) |
const |
|
virtualinherited |
Returns the Node that is used for connected the Voice to the greater audio graph (by default, it is connected to Context::master()).
void cinder::audio::Voice::setVolume |
( |
float |
volume | ) |
|
|
inherited |
void cinder::audio::Voice::setPan |
( |
float |
pos | ) |
|
|
inherited |
float cinder::audio::Voice::getVolume |
( |
| ) |
const |
|
inherited |
float cinder::audio::Voice::getPan |
( |
| ) |
const |
|
inherited |
The documentation for this class was generated from the following files: