All Bundles
MixChunk
Format for an audio chunk
Operations
New
Load file for use as a sample
New(file:String)
Parameters
Name | Type | Description |
---|
file | String | file name to load sample from |
FadeInChannel
Fade in sample
method : public : FadeInChannel(channel:Int, loops:Int, ms:Int) ~ Int
Parameters
Name | Type | Description |
---|
channel | Int | channel to play on, or -1 for the first free unreserved channel. |
loops | Int | number of loops, -1 is infinite loops. Passing one here plays the sample twice (1 loop). |
ms | Int | milliseconds of time that the fade-in effect should take to go from silence to full volume. |
Return
Type | Description |
---|
Int | channel the sample is played on |
FadeInChannelTimed
Fade in sample
method : public : FadeInChannelTimed(channel:Int, loops:Int, ms:Int, ticks:Int) ~ Int
Parameters
Name | Type | Description |
---|
channel | Int | channel to play on, or -1 for the first free unreserved channel. |
loops | Int | number of loops, -1 is infinite loops. Passing one here plays the sample twice (1 loop). |
ms | Int | milliseconds of time that the fade-in effect should take to go from silence to full volume. |
ticks | Int | millisecond limit to play sample, at most |
Return
Type | Description |
---|
Int | channel the sample is played on |
Free
Free the memory used in chunk, and free chunk itself as well.
method : public : Free() ~ Nil
IsNull
Determines if the underlying SDL C-struct is NULL
method : public : IsNull() ~ Bool
Return
Type | Description |
---|
Bool | true if NULL, false otherwise |
PlayChannel
Play chunk on channel
method : public : PlayChannel(channel:Int, loops:Int) ~ Int
Parameters
Name | Type | Description |
---|
channel | Int | to play on, or -1 for the first free unreserved channel. |
loops | Int | number of loops, -1 is infinite loops. Passing one here plays the sample twice |
Return
Type | Description |
---|
Int | the channel the sample is played on |
PlayChannelTimed
Play chunk on channel
method : public : PlayChannelTimed(channel:Int, loops:Int, ticks:Int) ~ Int
Parameters
Name | Type | Description |
---|
channel | Int | to play on, or -1 for the first free unreserved channel. |
loops | Int | Number of loops, -1 is infinite loops |
ticks | Int | millisecond limit to play sample, at most |
Return
Type | Description |
---|
Int | the channel the sample is played on |