Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 44442 Details for
Bug 71993
patch to fix sound in zsnes cvs for me.
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
v1
fixsound.diff (text/plain), 1.67 KB, created by
Mikael Magnusson
on 2004-11-21 15:45:16 UTC
(
hide
)
Description:
v1
Filename:
MIME Type:
Creator:
Mikael Magnusson
Created:
2004-11-21 15:45:16 UTC
Size:
1.67 KB
patch
obsolete
>? autom4te.cache >? fixsound.diff >? zsnes-linuxsound-10052004.diff >? linux/.maybe.diff.swp >? linux/.sdllink.c.swp >? linux/maybe.diff >Index: linux/sdllink.c >=================================================================== >RCS file: /cvsroot/zsnes/zsnes/src/linux/sdllink.c,v >retrieving revision 1.146 >diff -p -u -d -r1.146 sdllink.c >--- linux/sdllink.c 21 Nov 2004 00:34:57 -0000 1.146 >+++ linux/sdllink.c 21 Nov 2004 18:49:28 -0000 >@@ -531,7 +531,7 @@ void ProcessKeyBuf(int scancode) > int InitSound(void) > { > SDL_AudioSpec wanted; >- >+ const int samptab[7] = { 1, 1, 2, 4, 2, 4, 4 }; > const int freqtab[7] = { 8000, 11025, 22050, 44100, 16000, 32000, 48000 }; > > SDL_CloseAudio(); >@@ -562,16 +562,8 @@ int InitSound(void) > wanted.channels = 1; > } > >- wanted.samples = (freqtab[SoundQuality] * wanted.channels)/32; >- >- printf("InitSound: %dhz, requesting %d sized buffer, " , freqtab[SoundQuality], wanted.samples); >- >- if (wanted.samples < 256) { wanted.samples = 256; } >- else if(wanted.samples < 512) { wanted.samples = 512; } >- else if(wanted.samples < 1024) { wanted.samples = 1024; } >- else { wanted.samples = 2048; } // never exceed this. >+ wanted.samples = samptab[SoundQuality] * 128 * wanted.channels; > >- printf("getting %d.\n",wanted.samples); > wanted.format = AUDIO_S16LSB; > wanted.userdata = NULL; > wanted.callback = UpdateSound; >@@ -586,9 +578,9 @@ int InitSound(void) > } > SDL_PauseAudio(0); > >- Buffer_len = (audiospec.size * 3); >- Buffer_len = (Buffer_len + 255) & ~255; /* Align to SPCSize */; >- Buffer = malloc(Buffer_len+1); >+ Buffer_len = (audiospec.size * 2); >+ Buffer_len = (Buffer_len + 255) & ~255; /* Align to SPCSize */ >+ Buffer = malloc(Buffer_len); > > return TRUE; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 71993
: 44442