Difference between revisions of "API Sound"
From Flowcode Help
Jump to navigationJump to search (XML import API auto-gen) |
(XML import) |
||
(13 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | + | <sidebar>API Contents</sidebar> | |
Audio streaming interface | Audio streaming interface | ||
− | |||
− | |||
− | ===Constants provided for this class | + | __TOC__ |
− | {| class="wikitable" |+width=" | + | |
− | |-LONG|Fmt_Unsigned8|5 | + | ==Functions provided for this class== |
− | |-LONG|Fmt_Signed16|8 | + | {| |
− | |-LONG|Fmt_Unsigned16|9 | + | |- |
− | |-LONG|Fmt_Signed32|16 | + | |width="35%"|[[API Sound.Play|Play]] |
− | |-LONG|Fmt_Unsigned32|17 | + | |Plays a formatted file sound, returns true if the sound played OK |
− | |-LONG|Fmt_Float32|18 | + | |- |
− | |-LONG|Fmt_Float64|34 | + | |width="35%"|[[API Sound.LoadWav|LoadWav]] |
− | |-LONG|Fmt_Mono|256 | + | |Loads a wave file into memory, providing the values needed to play it |
− | |-LONG|Fmt_Stereo|512 | + | |- |
+ | |width="35%"|[[API Sound.Create|Create]] | ||
+ | |Creates a sound object that data can be played through | ||
+ | |- | ||
+ | |width="35%"|[[API Sound.SetVolume|SetVolume]] | ||
+ | |Sets the volume of playbacks for this sound | ||
+ | |- | ||
+ | |width="35%"|[[API Sound.GetVolume|GetVolume]] | ||
+ | |Gets the volume of playbacks for this sound in the range 0 to 1 | ||
+ | |- | ||
+ | |width="35%"|[[API Sound.GetBits|GetBits]] | ||
+ | |Gets the number of bits per sample for the sound | ||
+ | |- | ||
+ | |width="35%"|[[API Sound.GetRate|GetRate]] | ||
+ | |Gets the current sample rate for the sound | ||
+ | |- | ||
+ | |width="35%"|[[API Sound.SetRate|SetRate]] | ||
+ | |Sets the current sample rate for the sound - this will stop the playing sound | ||
+ | |- | ||
+ | |width="35%"|[[API Sound.Queue|Queue]] | ||
+ | |Queues a sound for playing | ||
+ | |- | ||
+ | |width="35%"|[[API Sound.QueueEx|QueueEx]] | ||
+ | |Queues a sound for playing, with the format provided | ||
+ | |- | ||
+ | |width="35%"|[[API Sound.Flush|Flush]] | ||
+ | |Stops all playing and queued sounds | ||
+ | |- | ||
+ | |width="35%"|[[API Sound.GetPending|GetPending]] | ||
+ | |Gets the number of sample blocks queued or playing for the sound | ||
+ | |} | ||
+ | |||
+ | |||
+ | ==Constants provided for this class== | ||
+ | {| class="wikitable" width="85%" | ||
+ | |+ Used by [[API Sound.QueueEx|QueueEx]]() | ||
+ | |- | ||
+ | !width="10%"|Type | ||
+ | !width="20%"|Name | ||
+ | !width="20%"|Value | ||
+ | !width="60%"|Description | ||
+ | |- | ||
+ | |LONG | ||
+ | |Fmt_Signed8 | ||
+ | |4 | ||
+ | |Source data is in the range -128 to 127 | ||
+ | |- | ||
+ | |LONG | ||
+ | |Fmt_Unsigned8 | ||
+ | |5 | ||
+ | |Source data is in the range 0 to 255 | ||
+ | |- | ||
+ | |LONG | ||
+ | |Fmt_Signed16 | ||
+ | |8 | ||
+ | |Source data is in the range -32768 to 32767 | ||
+ | |- | ||
+ | |LONG | ||
+ | |Fmt_Unsigned16 | ||
+ | |9 | ||
+ | |Source data is in the range 0 to 65535 | ||
+ | |- | ||
+ | |LONG | ||
+ | |Fmt_Signed32 | ||
+ | |16 | ||
+ | |Source data is a signed 32-bit value | ||
+ | |- | ||
+ | |LONG | ||
+ | |Fmt_Unsigned32 | ||
+ | |17 | ||
+ | |Source data is an unsigned 32-bit value | ||
+ | |- | ||
+ | |LONG | ||
+ | |Fmt_Float32 | ||
+ | |18 | ||
+ | |Source data is a 32-bit float from 0 to 1 | ||
+ | |- | ||
+ | |LONG | ||
+ | |Fmt_Float64 | ||
+ | |34 | ||
+ | |Source data is a 64-bit float from 0 to 1 | ||
+ | |- | ||
+ | |LONG | ||
+ | |Fmt_Mono | ||
+ | |256 | ||
+ | |Set this flag to set a single source element per sample | ||
+ | |- | ||
+ | |LONG | ||
+ | |Fmt_Stereo | ||
+ | |512 | ||
+ | |Set this flag to two source elements per sample | ||
|} | |} | ||
− | === | + | |
+ | ==Examples== | ||
+ | ''<span style="color:red;">No additional examples</span>'' | ||
+ | |||
+ | ==See also== | ||
+ | ''<span style="color:red;">No additional information</span>'' |
Latest revision as of 15:57, 16 January 2014
<sidebar>API Contents</sidebar> Audio streaming interface
Contents
Functions provided for this class
Play | Plays a formatted file sound, returns true if the sound played OK |
LoadWav | Loads a wave file into memory, providing the values needed to play it |
Create | Creates a sound object that data can be played through |
SetVolume | Sets the volume of playbacks for this sound |
GetVolume | Gets the volume of playbacks for this sound in the range 0 to 1 |
GetBits | Gets the number of bits per sample for the sound |
GetRate | Gets the current sample rate for the sound |
SetRate | Sets the current sample rate for the sound - this will stop the playing sound |
Queue | Queues a sound for playing |
QueueEx | Queues a sound for playing, with the format provided |
Flush | Stops all playing and queued sounds |
GetPending | Gets the number of sample blocks queued or playing for the sound |
Constants provided for this class
Type | Name | Value | Description |
---|---|---|---|
LONG | Fmt_Signed8 | 4 | Source data is in the range -128 to 127 |
LONG | Fmt_Unsigned8 | 5 | Source data is in the range 0 to 255 |
LONG | Fmt_Signed16 | 8 | Source data is in the range -32768 to 32767 |
LONG | Fmt_Unsigned16 | 9 | Source data is in the range 0 to 65535 |
LONG | Fmt_Signed32 | 16 | Source data is a signed 32-bit value |
LONG | Fmt_Unsigned32 | 17 | Source data is an unsigned 32-bit value |
LONG | Fmt_Float32 | 18 | Source data is a 32-bit float from 0 to 1 |
LONG | Fmt_Float64 | 34 | Source data is a 64-bit float from 0 to 1 |
LONG | Fmt_Mono | 256 | Set this flag to set a single source element per sample |
LONG | Fmt_Stereo | 512 | Set this flag to two source elements per sample |
Examples
No additional examples
See also
No additional information