#include <audio/component/playbackcomponent.h>
Public Member Functions | |
PlaybackComponent () | |
bool | isStereo () const |
![]() | |
AudioComponentBase () | |
![]() | |
virtual void | getDependentComponents (std::vector< rtti::TypeInfo > &components) const |
virtual const rtti::TypeInfo | getInstanceType () const =0 |
![]() | |
Resource () | |
![]() | |
Object () | |
virtual | ~Object () |
virtual bool | init (utility::ErrorState &errorState) |
virtual void | onDestroy () |
Object (Object &)=delete | |
Object & | operator= (const Object &)=delete |
Object (Object &&)=delete | |
Object & | operator= (Object &&)=delete |
Public Attributes | |
ResourcePtr< AudioBufferResource > | mBuffer = nullptr |
property: 'Buffer' The buffer containing the audio to be played back More... | |
std::vector< int > | mChannelRouting = { } |
property: 'ChannelRouting' The size of this array indicates the number of channels to be played back. Each element indicates a channel number of the buffer to be played. If left empty it will be filled with the channels in the buffer in ascending order. More... | |
bool | mAutoPlay = true |
property: 'AutoPlay' If set to true, the component will start playing on initialization. More... | |
TimeValue | mStartPosition = 0 |
property: 'StartPosition' Start position of playback in milliseconds. More... | |
TimeValue | mDuration = 0 |
property: 'Duration' Duration of playback in milliseconds. More... | |
TimeValue | mFadeInTime = 0 |
property: 'FadeInTime' Fade in time of playback in milliseconds, to prevent clicks. More... | |
TimeValue | mFadeOutTime = 0 |
property: 'FadeOutTime' Fade out time of playback in milliseconds, to prevent clicks More... | |
ControllerValue | mPitch = 1.0 |
property: 'Pitch' Pitch as a fraction of the original: 2.0 means double speed, 0.5 means halve speed. More... | |
ControllerValue | mGain = 1.0 |
property: 'Gain' Overall gain More... | |
ControllerValue | mStereoPanning = 0.5 |
property: 'StereoPanning' Panning in the stereo field: 0 means far left, 0.5 means center, 1.0 means far right. This property only applies when two channels are being played back. More... | |
![]() | |
std::string | mID |
Property: 'mID' unique name of the object. Used as an identifier by the system. More... | |
Additional Inherited Members | |
![]() | |
static bool | isIDProperty (rtti::Instance &object, const rtti::Property &property) |
Plays-back audio from a nap::audio::AudioBufferResource. Playback can be started on initialization using the AutoPlay property or using the start() method, and is stopped using the stop() method or by specifying the "Duration" property. The component has to be used in combination with an nap::audio::OutputComponent to send the playback to DAC.
bool isStereo | ( | ) | const |
Returns if the playback consists of 2 audio channels
bool mAutoPlay = true |
property: 'AutoPlay' If set to true, the component will start playing on initialization.
ResourcePtr<AudioBufferResource> mBuffer = nullptr |
property: 'Buffer' The buffer containing the audio to be played back
std::vector<int> mChannelRouting = { } |
property: 'ChannelRouting' The size of this array indicates the number of channels to be played back. Each element indicates a channel number of the buffer to be played. If left empty it will be filled with the channels in the buffer in ascending order.
TimeValue mDuration = 0 |
property: 'Duration' Duration of playback in milliseconds.
TimeValue mFadeInTime = 0 |
property: 'FadeInTime' Fade in time of playback in milliseconds, to prevent clicks.
TimeValue mFadeOutTime = 0 |
property: 'FadeOutTime' Fade out time of playback in milliseconds, to prevent clicks
ControllerValue mGain = 1.0 |
property: 'Gain' Overall gain
ControllerValue mPitch = 1.0 |
property: 'Pitch' Pitch as a fraction of the original: 2.0 means double speed, 0.5 means halve speed.
TimeValue mStartPosition = 0 |
property: 'StartPosition' Start position of playback in milliseconds.
ControllerValue mStereoPanning = 0.5 |
property: 'StereoPanning' Panning in the stereo field: 0 means far left, 0.5 means center, 1.0 means far right. This property only applies when two channels are being played back.