[Fix] Error when loading a player after another with sound.

This commit is contained in:
Allanis 2013-08-23 20:25:30 +01:00
parent 897bc36111
commit 5e1ac24f68

View File

@ -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. */