Browse Source

an even cleaner fix for libsdl and the 1.0 ALSA API ...

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

+ 14
- 14
package/blindcoder/libsdl/alsa-fix.patch

@ -1,19 +1,19 @@
Fix broken snd_pcm_hw_params_get_channels useage ...
Fix outdated ALSA API 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);
+++ SDL-1.2.6/src/audio/alsa/SDL_alsa_audio.c 2004-01-11 20:39:32.000000000 +0100
@@ -34,6 +34,11 @@
#include <sys/types.h>
#include <sys/time.h>
+/* until convertion to the new ALSA API ... */
+
+#define ALSA_PCM_OLD_HW_PARAMS_API
+#define ALSA_PCM_OLD_SW_PARAMS_API
+
#include "SDL_audio.h"
#include "SDL_error.h"
#include "SDL_audiomem.h"

Loading…
Cancel
Save