API Sound: Difference between revisions
Appearance
XML import API auto-gen |
XML import |
||
| Line 2: | Line 2: | ||
Audio streaming interface | Audio streaming interface | ||
==Functions provided for this class== | |||
{||-|[[API Sound.Play|Play]]|Plays a formatted file sound, returns true if the sound played OK|-|[[API Sound.LoadWav|LoadWav]]|Queues a sound for playing, with the format provided|-|[[API Sound.Create|Create]]|Creates a sound object that data can be played through|-|[[API Sound.SetVolume|SetVolume]]|Sets the volume of playbacks for this sound|-|[[API Sound.GetVolume|GetVolume]]|Gets the volume of playbacks for this sound in the range 0 to 1|-|[[API Sound.GetBits|GetBits]]|Gets the number of bits per sample for the sound|-|[[API Sound.GetRate|GetRate]]|Gets the current sample rate for the sound|-|[[API Sound.SetRate|SetRate]]|Sets the current sample rate for the sound - this will stop the playing sound|-|[[API Sound.Queue|Queue]]|Queues a sound for playing|-|[[API Sound.QueueEx|QueueEx]]|Queues a sound for playing, with the format provided|-|[[API Sound.Flush|Flush]]|Stops all playing and queued sounds|-|[[API Sound.GetPending|GetPending]]|Gets the number of sample blocks queued or playing for the sound|} | {| | ||
|- | |||
|width="35%"|[[API Sound.Play|Play]] | |||
|Plays a formatted file sound, returns true if the sound played OK | |||
|- | |||
|width="35%"|[[API Sound.LoadWav|LoadWav]] | |||
|Queues a sound for playing, with the format provided | |||
|- | |||
|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 | |||
|} | |||
{| class="wikitable" |+width="20%"|Type|width="30%"|Name |width="40%"|Value|-LONG|Fmt_Signed8|4 | ==Constants provided for this class== | ||
|-LONG|Fmt_Unsigned8|5 | {| class="wikitable" |+width="20%"|Type|width="30%"|Name |width="40%"|Value|- | ||
|-LONG|Fmt_Signed16|8 | |LONG | ||
|-LONG|Fmt_Unsigned16|9 | |Fmt_Signed8|4 | ||
|-LONG|Fmt_Signed32|16 | |- | ||
|-LONG|Fmt_Unsigned32|17 | |LONG | ||
|-LONG|Fmt_Float32|18 | |Fmt_Unsigned8|5 | ||
|-LONG|Fmt_Float64|34 | |- | ||
|-LONG|Fmt_Mono|256 | |LONG | ||
|-LONG|Fmt_Stereo|512 | |Fmt_Signed16|8 | ||
|- | |||
|LONG | |||
|Fmt_Unsigned16|9 | |||
|- | |||
|LONG | |||
|Fmt_Signed32|16 | |||
|- | |||
|LONG | |||
|Fmt_Unsigned32|17 | |||
|- | |||
|LONG | |||
|Fmt_Float32|18 | |||
|- | |||
|LONG | |||
|Fmt_Float64|34 | |||
|- | |||
|LONG | |||
|Fmt_Mono|256 | |||
|- | |||
|LONG | |||
|Fmt_Stereo|512 | |||
|} | |} | ||
==Examples== | |||
''No examples available'' | |||
Revision as of 16:46, 11 May 2013
<sidebar>API contents</sidebar> Audio streaming interface
Functions provided for this class
| Play | Plays a formatted file sound, returns true if the sound played OK |
| LoadWav | Queues a sound for playing, with the format provided |
| 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
| LONG | 4 |
| LONG | 5 |
| LONG | 8 |
| LONG | 9 |
| LONG | 16 |
| LONG | 17 |
| LONG | 18 |
| LONG | 34 |
| LONG | 256 |
| LONG | 512 |
Examples
No examples available