9 #define PLSR_PLAYER_MAX_CHANNELS 2 10 #define PLSR_PLAYER_INVALID_SOUND NULL 14 PLSR_PlayerCategoryType_Init = 0,
15 PLSR_PlayerCategoryType_Load,
16 PLSR_PlayerCategoryType_LoadFormats,
17 PLSR_PlayerCategoryType_LoadLookup,
27 const u8 sinkChannels[PLSR_PLAYER_MAX_CHANNELS];
33 AudioDriverWaveBuf wavebufs[2];
40 unsigned int wavebufCount;
41 unsigned int channelCount;
PLSR_RC plsrPlayerStop(PLSR_PlayerSoundId id)
Stop a sound if it is currently playing.
const PLSR_PlayerConfig * plsrPlayerGetDefaultConfig(void)
Get default player configuration.
int voiceId
Audio driver assigned voice index.
Definition: player.h:35
NX_INLINE void plsrPlayerWaitNextFrame(void)
Convenience shortcut to wait until next audio renderer frame.
Definition: player.h:69
PLSR_RC plsrPlayerInitEx(const PLSR_PlayerConfig *config)
Initialize player with a custom configuration.
Archive container interface.
void plsrPlayerFree(PLSR_PlayerSoundId id)
Free ressources used by a loaded sound.
int endVoiceId
Last renderer voice index to be used by the player (should be >= 0 && <= startVoiceId) ...
Definition: player.h:26
PLSR_PlayerConfig config
Effective player configuration.
Definition: player.h:51
PLSR_RC plsrPlayerPlay(PLSR_PlayerSoundId id)
Play a loaded sound from the beginning.
PLSR_Player * plsrPlayerGetInstance(void)
Get player instance (NULL if not initialized)
NX_INLINE PLSR_RC plsrPlayerInit(void)
Initialize player with the default configuration.
Definition: player.h:64
PLSR_PlayerCategoryType
Player method categories.
Definition: player.h:13
int startVoiceId
First renderer voice index to be used by the player (should be >= 0 && < audrenConfig.num_voices)
Definition: player.h:25
int mempoolId
Audio driver assigned mempool index.
Definition: player.h:34
Player config.
Definition: player.h:21
PLSR_RC plsrPlayerSetVolume(PLSR_PlayerSoundId id, float volume)
Set sound volume factor (effective next time it's played)
Player sound channel.
Definition: player.h:31
AudioDriver driver
Audio driver internal state.
Definition: player.h:50
void * mempool
Pointer to the aligned memory containing audio samples (and ADPCM parameters when applicable) ...
Definition: player.h:32
PLSR_RC plsrPlayerSetPitch(PLSR_PlayerSoundId id, float pitch)
Set sound pitch factor (effective next time it's played)
Player.
Definition: player.h:49
const PLSR_PlayerSound * PLSR_PlayerSoundId
Player sound ID.
Definition: player.h:46
bool initRenderer
true if audren service init should be handled by the player
Definition: player.h:22
u32 PLSR_RC
Result code returned by Pulsar functions.
Definition: types.h:73
void plsrPlayerExit(void)
De-initialize player.
Player sound.
Definition: player.h:39
AudioRendererConfig audrenConfig
Audio renderer config (output rate, voices count, ...)
Definition: player.h:24