[Fix] Error when loading a player after another with sound.
This commit is contained in:
parent
897bc36111
commit
5e1ac24f68
@ -430,9 +430,13 @@ void player_cleanup(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Initializes the player sound. */
|
/* Initializes the player sound. */
|
||||||
|
static int player_soundReserved = 0;
|
||||||
static void player_initSound(void) {
|
static void player_initSound(void) {
|
||||||
|
if(player_soundReserved) return;
|
||||||
|
|
||||||
sound_reserve(PLAYER_RESERVED_CHANNELS);
|
sound_reserve(PLAYER_RESERVED_CHANNELS);
|
||||||
sound_createGroup(PLAYER_CHANNEL, 0, PLAYER_RESERVED_CHANNELS);
|
sound_createGroup(PLAYER_CHANNEL, 0, PLAYER_RESERVED_CHANNELS);
|
||||||
|
player_soundReserved = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Play a sound. */
|
/* Play a sound. */
|
||||||
|
Loading…
Reference in New Issue
Block a user