Difference between revisions of "API Sound.QueueEx"
From Flowcode Help
Jump to navigationJump to search (XML import)  | 
				 (XML import)  | 
				||
| Line 21: | Line 21: | ||
[[Variable types|UINT]] ''SampleFormat''  | [[Variable types|UINT]] ''SampleFormat''  | ||
:Format of the samples  | :Format of the samples  | ||
| − | ''Typical values for this parameter:''  | + | :''Typical values for this parameter:''  | 
| − | {| class="wikitable" width="  | + | ::{| class="wikitable" width="65%"  | 
|-  | |-  | ||
| − | |||
! width="30%" |Name  | ! width="30%" |Name  | ||
| − | ! width="  | + | ! width="55%" |Description  | 
|-  | |-  | ||
| − | |||
|Fmt_Signed8  | |Fmt_Signed8  | ||
|Source data is in the range -128 to 127  | |Source data is in the range -128 to 127  | ||
|-  | |-  | ||
| − | |||
|Fmt_Unsigned8  | |Fmt_Unsigned8  | ||
|Source data is in the range 0 to 255  | |Source data is in the range 0 to 255  | ||
|-  | |-  | ||
| − | |||
|Fmt_Signed16  | |Fmt_Signed16  | ||
|Source data is in the range -32768 to 32767  | |Source data is in the range -32768 to 32767  | ||
|-  | |-  | ||
| − | |||
|Fmt_Unsigned16  | |Fmt_Unsigned16  | ||
|Source data is in the range 0 to 65535  | |Source data is in the range 0 to 65535  | ||
|-  | |-  | ||
| − | |||
|Fmt_Signed32  | |Fmt_Signed32  | ||
|Source data is a signed 32-bit value  | |Source data is a signed 32-bit value  | ||
|-  | |-  | ||
| − | |||
|Fmt_Unsigned32  | |Fmt_Unsigned32  | ||
|Source data is an unsigned 32-bit value  | |Source data is an unsigned 32-bit value  | ||
|-  | |-  | ||
| − | |||
|Fmt_Float32  | |Fmt_Float32  | ||
|Source data is a 32-bit float from 0 to 1  | |Source data is a 32-bit float from 0 to 1  | ||
|-  | |-  | ||
| − | |||
|Fmt_Float64  | |Fmt_Float64  | ||
|Source data is a 64-bit float from 0 to 1  | |Source data is a 64-bit float from 0 to 1  | ||
|-  | |-  | ||
| − | |||
|Fmt_Mono  | |Fmt_Mono  | ||
|Set this flag to set a single source element per sample  | |Set this flag to set a single source element per sample  | ||
|-  | |-  | ||
| − | |||
|Fmt_Stereo  | |Fmt_Stereo  | ||
|Set this flag to two source elements per sample  | |Set this flag to two source elements per sample  | ||
| Line 80: | Line 69: | ||
[[Variable types|BOOL]]  | [[Variable types|BOOL]]  | ||
| − | + | Returns true if the operation is a success, else false  | |
Revision as of 21:28, 12 May 2013
<sidebar>API contents</sidebar> Queues a sound for playing, with the format provided
Contents
Parameters
HANDLE Sounds
- The handle of the sound object to queue to
 
BYTE[] Data
- The array to play data from
 
ULONG ByteOffset
- The byte-offset in the array to start at
 
UINT SampleFormat
- Format of the samples
 - Typical values for this parameter:
 
Name Description Fmt_Signed8 Source data is in the range -128 to 127 Fmt_Unsigned8 Source data is in the range 0 to 255 Fmt_Signed16 Source data is in the range -32768 to 32767 Fmt_Unsigned16 Source data is in the range 0 to 65535 Fmt_Signed32 Source data is a signed 32-bit value Fmt_Unsigned32 Source data is an unsigned 32-bit value Fmt_Float32 Source data is a 32-bit float from 0 to 1 Fmt_Float64 Source data is a 64-bit float from 0 to 1 Fmt_Mono Set this flag to set a single source element per sample Fmt_Stereo Set this flag to two source elements per sample 
ULONG Elements
- The number of sample elements to play
 
FLOAT RateMul
- A multiplier to the sounds sample rate
 - The default value for this parameter is: 1
 
Return value
Returns true if the operation is a success, else false
Detailed description
No additional information
Examples
Calling in a calculation
- Declare a variable 'result' of type BOOL
 - Add to a calculation icon: 
result = ::Sound.QueueEx(sounds, _arraydata, byteoffset, ::Sound.Fmt_Signed8, elements, ratemul)
 
No additional information