AudioBlock.h
192 static AudioBlock * CreateSine(float pitch, float roughness, uint8_t volume, float duration, int compound);
202 static AudioBlock * CreateHit(float pitch, float impact, float roughness, uint8_t volume, int compound);
void Append(AudioSample *data, uint32_t size)
Adds the specified samples to the wave form.
A generalized structure representing an audio waveform.
Definition: AudioBlock.h:64
void Define(AudioSample *data, uint32_t numSamples)
Clears the current data store of the AudioBlock and replaces it with the given data.
void InsertBlock(uint32_t beginSample, AudioBlock *block)
Inserts the collection of samples at the specified sample.
void RemoveBlock(uint32_t beginSample, uint32_t endSample)
Removes a section of samples.
Definition: AssetID.h:37
void AppendBlock(AudioBlock *block)
Appends the specified AudioBlock to the end of this one.
float GetSecondsFromSamples(uint32_t i)
Convert to seconds of the sample.
AudioBlock * GetSubBlock(uint32_t firstSample, uint32_t endSample)
Returns a subsection of the AudioBlock as an independent AudioBlock.
Assets are referred to by an AssetID. The AssetID uniquely refers to an Asset stored within memory...
Definition: AssetID.h:42
uint32_t GetSampleFromSeconds(float f)
Same as GetSecondsFromSamples, but the other way.
void EditSample(uint32_t sample, AudioSample sampleValue)
Changes the value of the specified sample.
static AudioBlock * CreateHit(float pitch, float impact, float roughness, uint8_t volume, int compound)
Creates a new AudioBlock as a basic noise distribution with the given parameters. ...
static AudioBlock * CreateSine(float pitch, float roughness, uint8_t volume, float duration, int compound)
Creates a new AudioBlock as a basic sine wave with the given parameters. Refer to PitchReference for ...
uint32_t NumSamples()
Similar to numBytes; returns the number of samples that the AudioBlock consists of.
AudioSample GetSample(uint32_t sample)
Retrieves the current value of the waveform at the given sample index.