Sound.h
147 static ActiveSound PlayAudio(AssetID, uint8_t effectChannel=0, float volume = 1.f, float panning = .5f);
230 void Init(); void InitAfter(); void RunBefore(); void RunAfter(); void DrawBefore(); void DrawAfter();
void SetChannel(uint32_t i)
Alters the channel that the sound plays on.
Base class that applies effects through the Sound module.
Definition: AudioEffect.h:40
A generalized structure representing an audio waveform.
Definition: AudioBlock.h:64
void SetRepeat(bool b)
Sets whether the sound should be replayed once it finishes.
Definition: AssetID.h:37
static void ChannelRemoveEffect(const AudioEffect *, uint8_t channel)
Unregisters an AudioEffect instance.
Assets are referred to by an AssetID. The AssetID uniquely refers to an Asset stored within memory...
Definition: AssetID.h:42
static void ChannelKeepAwake(uint8_t, bool doIt)
Keeps the stream active for the given channel. By default, channels will only be active if there are ...
static void ChannelSetVolume(uint8_t channel, float)
Sets the volume for the given channel 0.f denotes minimum volume and 1.f maximum. The values are clip...
static ActiveSound PlayAudio(AssetID, uint8_t effectChannel=0, float volume=1.f, float panning=.5f)
Queues audio for immediate playback.
static void ChannelReset(uint8_t channel)
Removes all effects from a channel. This does not delete the AudioEffects given to the channel...
bool Valid()
Returns whether this ActiveSound actually refers to something that is playing back.
static void ChannelSetPanning(uint8_t channel, float)
Sets the panning for the entire channel. 0.f denotes all the way to the left and 1.f all the way to the right. The values are clipped if they are beyond these bounds.
static bool IsPlaying(AssetID index)
Returns whether or not an instance of the sample is playing.
static void ChannelAddEffect(const AudioEffect *, uint8_t channel)
Registers an AudioEffect instance with an associated effect channel. All further samples that play on...