Your Holy savior has come to save the day. Also fixed compiling in Linux, a memory leak, and checks if a glxcontext was created

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@419 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Sonicadvance1
2008-09-01 08:32:33 +00:00
parent ead647d422
commit 454cee4d1e
3 changed files with 9 additions and 1 deletions

View File

@ -55,6 +55,7 @@ namespace AOSound
return(false);*/
//if(soundData[0] != 0)
if(!device)
ao_play(device, soundData, numSoundBytes);
return true;
@ -112,7 +113,7 @@ namespace AOSound
device = ao_open_live(default_driver, &format, NULL /* no options */);
if (device == NULL) {
fprintf(stderr, "Error opening device.\n");
return 1;
return false;
}
buf_size = format.bits/8 * format.channels * format.rate;
buffer = (char*)calloc(buf_size, sizeof(char));
@ -121,6 +122,7 @@ namespace AOSound
}
void AOSound_StopSound()
{
free(buffer);
ao_close(device);
ao_shutdown();
}