An audio asset, using any supported compression codec. More...
#include <sifteo/asset/audio.h>
Public Member Functions | |
unsigned | speed () const |
Return the default speed for this audio asset, in samples per second. More... | |
Static Public Member Functions | |
static AssetAudio | fromPCM (const int16_t *samples, unsigned numSamples) |
Create an AssetAudio object programmatically, from uncompressed PCM data. More... | |
template<typename T > | |
static AssetAudio | fromPCM (const T &samples) |
Templatized version of fromPCM(), for fixed-size sample arrays. | |
An audio asset, using any supported compression codec.
stir
generates an AssetAudio for each sound
element in your assets.lua configuration file, most often from a WAV source file.
See the Audio and Asset Workflow guides for details.
|
inlinestatic |
Create an AssetAudio object programmatically, from uncompressed PCM data.
This creates an AssetAudio instance which references the specified buffer of 16-bit uncompressed PCM samples. You can use this to wrap dynamically synthesized audio data for playback on an AudioChannel.
This is intended mostly for creating software "instruments" for real-time audio synthesis, so we default to looping mode, and there is no default sample rate or volume. These parameters can all be set via AudioChannel at runtime.
|
inline |
Return the default speed for this audio asset, in samples per second.
This can be used to calculate a new speed for AudioChannel::setSpeed().
Sifteo SDK v1.1.0 (see all versions)
Last updated Tue Dec 23 2014, by Doxygen