OSL_SOUND Struct Reference
[Audio]
#include <audio.h>
|
Data Fields |
|
char | filename [64] |
| | Original file name, so that the file can be reopen after a resume from stand-by. Used only if the song is streamed.
|
|
void * | data |
| | User sound data (depends on the sound file format).
|
|
void * | dataplus |
| | Extended user sound data.
|
|
int | baseoffset |
| | Offset from the beginning of the file (without the header). Used to resume the sound after stand-by.
|
|
int | format |
| |
|
|
int | divider |
| |
|
|
int | size |
| |
|
|
int | mono |
| | 0x10 for Mono, 0 for Stereo output
|
|
int | isStreamed |
| | Holds whether the sound is streamed or not.
|
|
u16 | volumeLeft |
| | Volume of the left channel (set volumeLeft == volumeRight for normal operation, another value creates a panning effect).
|
|
u16 | volumeRight |
| | Volume of the right channel.
|
|
int | suspendNumber |
| |
|
|
int(* | endCallback )(struct OSL_SOUND *, int) |
| | Function called when the sound has finished to play.
|
|
u8 | userdata [32] |
| | Custom user data.
|
|
int | numSamples |
| | Number of samples per read. Default is osl_audioDefaultNumSamples, that is, 512.
|
|
void(* | playSound )(struct OSL_SOUND *) |
| | Custom function called when the sound must be played.
|
|
void(* | stopSound )(struct OSL_SOUND *) |
| | Custom function called when the sound must be stopped (not paused, completely stopped).
|
|
int(* | audioCallback )(unsigned int, void *, unsigned int) |
| | Custom function which must feed a buffer with a certain number of samples.
|
|
VIRTUAL_FILE *(* | standBySound )(struct OSL_SOUND *) |
| | Function called when the PSP enters in stand by mode.
|
|
VIRTUAL_FILE **(* | reactiveSound )(struct OSL_SOUND *, VIRTUAL_FILE *) |
| | Function called when the sound must be reactivated (after a stand by).
|
|
void(* | deleteSound )(struct OSL_SOUND *) |
| | Custom function called to destroy the sound.
|
Detailed Description
Structure of a sound in OSLib. You can make your own "drivers" for other sound types but I can't guarantee they will be forward compatible, so please release your source when creating one ;-)
The documentation for this struct was generated from the following file:
- G:/PSP/OSLib_MOD/OSLib_MOD/audio.h