record AL_SAMPLE
Unit
Allegro
Declaration
type AL_SAMPLE = record
Description
A sample structure, which holds sound data, used by the digital sample routines. You can consider all of these fields as read only except priority , loop_start and loop_end , which you can change them for example after loading a sample from disk.
The variables loop_start and loop_end specify the loop position in sample units, and are set by default to the start and end of the sample.
If you are creating your own samples on the fly, you might also want to modify the raw data of the sample pointed by the data field. The sample data are always in unsigned format. This means that if you are loading a PCM encoded sound file with signed 16-bit samples, you would have to XOR every two bytes (i.e. every sample value) with 0x8000 to change the signedness.
See also
- al_load_sample
- Loads a sample from a file, supporting both mono and stereo WAV and mono VOC files, in 8 or 16-bit formats, as well as formats handled by functions registered using al_register_sample_file_type.
- al_create_sample
- Constructs a new sample structure of the specified type.
Overview
Fields
Description
Fields
stereo: AL_INT; |
sample type flag
|
freq: AL_INT; |
sample frequency
|
priority: AL_INT; |
It is a value from 0 to 255 (by default set to 128) and controls how hardware voices on the sound card are allocated if you attempt to play more than the driver can handle. This may be used to ensure that the less important sounds are cut off while the important ones are preserved.
|
loop_start: AL_ULONG; |
loop start position
|
loop_end: AL_ULONG; |
loop finish position
|
Generated by PasDoc 0.13.0 on 2016-07-20 12:01:36
|