Browse Source

fix SDL for new ALSA

git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@2183 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc
rocklinux
Rene Rebe 21 years ago
parent
commit
ebca9fb6c0
1 changed files with 19 additions and 0 deletions
  1. +19
    -0
      package/blindcoder/libsdl/alsa-fix.patch

+ 19
- 0
package/blindcoder/libsdl/alsa-fix.patch

@ -0,0 +1,19 @@
Fix broken snd_pcm_hw_params_get_channels useage ...
- Rene Rebe <rene@rocklinux.org>
--- SDL-1.2.6/src/audio/alsa/SDL_alsa_audio.c.orig 2004-01-11 20:16:20.000000000 +0100
+++ SDL-1.2.6/src/audio/alsa/SDL_alsa_audio.c 2004-01-11 20:17:30.000000000 +0100
@@ -269,8 +269,9 @@
/* Set the number of channels */
status = snd_pcm_hw_params_set_channels(pcm_handle, params, spec->channels);
if ( status < 0 ) {
- status = snd_pcm_hw_params_get_channels(params);
- if ( (status <= 0) || (status > 2) ) {
+ int ch;
+ status = snd_pcm_hw_params_get_channels(params, &ch);
+ if ( (status < 0) || (ch != spec->channels) ) {
SDL_SetError("Couldn't set audio channels");
ALSA_CloseAudio(this);
return(-1);

Loading…
Cancel
Save