[Fix] Fixed linked list for sound, was hanging the entire thing..

This commit is contained in:
Allanis 2013-12-31 03:28:20 +00:00
parent b26a1ca968
commit 74719f2cbd
2 changed files with 4 additions and 3 deletions

View File

@ -74,7 +74,7 @@ void input_setDefault(void) {
input_setKeybind("target_hostile", KEYBIND_KEYBOARD, SDLK_r, KMOD_NONE, 0); input_setKeybind("target_hostile", KEYBIND_KEYBOARD, SDLK_r, KMOD_NONE, 0);
/* Combat. */ /* Combat. */
input_setKeybind("primary", KEYBIND_KEYBOARD, SDLK_SPACE, KMOD_NONE, 0); input_setKeybind("primary", KEYBIND_KEYBOARD, SDLK_SPACE, KMOD_NONE, 0);
input_setKeybind("face", KEYBIND_KEYBOARD, SDLK_f, KMOD_NONE, 0); input_setKeybind("face", KEYBIND_KEYBOARD, SDLK_1, KMOD_NONE, 0);
input_setKeybind("board", KEYBIND_KEYBOARD, SDLK_b, KMOD_NONE, 0); input_setKeybind("board", KEYBIND_KEYBOARD, SDLK_b, KMOD_NONE, 0);
/* Escorts. */ /* Escorts. */
input_setKeybind("e_attack", KEYBIND_KEYBOARD, SDLK_f, KMOD_NONE, 0); input_setKeybind("e_attack", KEYBIND_KEYBOARD, SDLK_f, KMOD_NONE, 0);

View File

@ -502,7 +502,6 @@ static Mix_Chunk* sound_load(char* filename) {
/* Get the file data buffer from the packfile. */ /* Get the file data buffer from the packfile. */
wavdata = pack_readfile(DATA, filename, &size); wavdata = pack_readfile(DATA, filename, &size);
rw = SDL_RWFromMem(wavdata, size); rw = SDL_RWFromMem(wavdata, size);
/* Bind to OpenAL buffer. */ /* Bind to OpenAL buffer. */
@ -676,9 +675,11 @@ static int voice_add(alVoice* v) {
tv = v->prev; tv = v->prev;
tv->next = v->next; tv->next = v->next;
if(tv->next != NULL) if(tv->next != NULL)
voice_pool->prev = NULL; tv->next->prev = tv;
} else { /* Set pool to be the next. */ } else { /* Set pool to be the next. */
voice_pool = v->next; voice_pool = v->next;
if(voice_pool != NULL)
voice_pool->prev = NULL;
} }
/* Insert to the front of active voices. */ /* Insert to the front of active voices. */