[Tuxnes-devel] PATCH: Fixes some sound I broke.
Brought to you by:
tmmm
From: Mike M. <che...@ya...> - 2003-12-01 14:35:02
|
These 2 do the same thing, but for diffrent versions. Try not to get all mixed up or suffer the same fate as me. 0.80 (CVS) Index: sound.c =================================================================== RCS file: /cvsroot/tuxnes/tuxnes/sound.c,v retrieving revision 1.44 diff -u -r1.44 sound.c --- sound.c 27 May 2002 16:04:44 -0000 1.44 +++ sound.c 1 Dec 2003 12:07:24 -0000 @@ -485,6 +485,14 @@ int InitAudioOSS(int argc, char **argv) { + /* check for the default output device */ + if ((audiofd = open (DSP, O_CREAT | O_WRONLY | O_APPEND)) < 0) + sound_config.audiofile = NULL; + else { + sound_config.audiofile = DSP; + close(audiofd); + } + /* Open an audio stream */ if ((audiofd = open (sound_config.audiofile, O_CREAT | O_WRONLY | O_APPEND, 0666 & ~mask)) < 0) @@ -1068,7 +1076,7 @@ if ( dmc_index >= MAGIC_dmc ) { dmc_shift = MAPTABLE[dmc_dta_ftch_addr >> 12][dmc_dta_ftch_add$ dmc_dta_ftch_addr++; - if ( dmc_dta_ftch_addr == 0x10000 ) { + if ( dmc_dta_ftch_addr == 0 /* x10000 */ ) { dmc_dta_ftch_addr = 0x8000; } @@ -1199,6 +1207,7 @@ int InitAudioMute(int argc, char **argv) { + return -1; } void UpdateAudioMute(void) ***** STOP ******* 0.76 --- tuxnes-0.76/emu.c 2003-12-01 04:05:43.000000000 -0600 +++ tuxnes-gggg/emu.c 2003-12-01 05:38:12.000000000 -0600 @@ -1269,15 +1267,7 @@ cmirror = 0; dolink = 0; disassemble = 0; gamegenie = 0; - - /* check for the default output device */ - if ((audiofd = open (DSP, O_CREAT | O_WRONLY | O_APPEND)) < 0) - sound_config.audiofile = NULL; - else { - sound_config.audiofile = DSP; - close(audiofd); - } /* * Parse args @@ -1662,6 +1652,14 @@ } } } + + /* check for the default output device */ + if ((audiofd = open (DSP, O_CREAT | O_WRONLY | O_APPEND)) < 0) + sound_config.audiofile = NULL; + else { + sound_config.audiofile = DSP; + close(audiofd); + } /* Select a sound sample format */ { __________________________________ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ |