svcore
1.9
|
Simple interface for audio playback. More...
#include <AudioPlaySource.h>
Public Member Functions | |
virtual | ~AudioPlaySource () |
virtual void | play (int startFrame)=0 |
Start playing from the given frame. | |
virtual void | stop ()=0 |
Stop playback. | |
virtual bool | isPlaying () const =0 |
Return whether playback is currently supposed to be happening. | |
virtual int | getCurrentPlayingFrame ()=0 |
Return the frame number that is currently expected to be coming out of the speakers. | |
virtual bool | getOutputLevels (float &left, float &right)=0 |
Return the current (or thereabouts) output levels in the range 0.0 -> 1.0, for metering purposes. | |
virtual int | getSourceSampleRate () const =0 |
Return the sample rate of the source material -- any material that wants to play at a different rate will sound wrong. | |
virtual int | getTargetSampleRate () const =0 |
Return the sample rate set by the target audio device (or the source sample rate if the target hasn't set one). | |
virtual int | getTargetBlockSize () const =0 |
Get the block size of the target audio device. | |
virtual int | getTargetChannelCount () const =0 |
Get the number of channels of audio that will be provided to the play target. | |
virtual void | setAuditioningEffect (Auditionable *)=0 |
Set a plugin or other subclass of Auditionable as an auditioning effect. |
Simple interface for audio playback.
This should be all that the ViewManager needs to know about to synchronise with playback by sample frame, but it doesn't provide enough to determine what is actually being played or how. See the audioio directory for a concrete subclass.
Definition at line 31 of file AudioPlaySource.h.
virtual AudioPlaySource::~AudioPlaySource | ( | ) | [inline, virtual] |
Definition at line 34 of file AudioPlaySource.h.
virtual void AudioPlaySource::play | ( | int | startFrame | ) | [pure virtual] |
Start playing from the given frame.
If playback is already under way, reseek to the given frame and continue.
virtual void AudioPlaySource::stop | ( | ) | [pure virtual] |
Stop playback.
virtual bool AudioPlaySource::isPlaying | ( | ) | const [pure virtual] |
Return whether playback is currently supposed to be happening.
virtual int AudioPlaySource::getCurrentPlayingFrame | ( | ) | [pure virtual] |
Return the frame number that is currently expected to be coming out of the speakers.
(i.e. compensating for playback latency.)
virtual bool AudioPlaySource::getOutputLevels | ( | float & | left, |
float & | right | ||
) | [pure virtual] |
Return the current (or thereabouts) output levels in the range 0.0 -> 1.0, for metering purposes.
virtual int AudioPlaySource::getSourceSampleRate | ( | ) | const [pure virtual] |
Return the sample rate of the source material -- any material that wants to play at a different rate will sound wrong.
virtual int AudioPlaySource::getTargetSampleRate | ( | ) | const [pure virtual] |
Return the sample rate set by the target audio device (or the source sample rate if the target hasn't set one).
If the source and target sample rates differ, resampling will occur.
Referenced by ModelTransformerFactory::getConfigurationForTransform().
virtual int AudioPlaySource::getTargetBlockSize | ( | ) | const [pure virtual] |
Get the block size of the target audio device.
This may be an estimate or upper bound, if the target has a variable block size; the source should behave itself even if this value turns out to be inaccurate.
Referenced by ModelTransformerFactory::getConfigurationForTransform().
virtual int AudioPlaySource::getTargetChannelCount | ( | ) | const [pure virtual] |
Get the number of channels of audio that will be provided to the play target.
This may be more than the source channel count: for example, a mono source will provide 2 channels after pan.
Referenced by ModelTransformerFactory::getConfigurationForTransform().
virtual void AudioPlaySource::setAuditioningEffect | ( | Auditionable * | ) | [pure virtual] |
Set a plugin or other subclass of Auditionable as an auditioning effect.