-Added an upstream patch that fix the bug 517721

epel10
Thomas Kowaliczek 16 years ago
parent 1c638a3325
commit a351d5a550

@ -8,6 +8,7 @@ License: LGPLv2+
URL: http://kcat.strangesoft.net/openal.html
Source0: http://kcat.strangesoft.net/openal-releases/openal-soft-%{version}.tar.bz2
Patch1: openal-soft.patch
Patch2: upstream.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: alsa-lib-devel
@ -42,6 +43,7 @@ developing applications that use %{name}.
%prep
%setup -q
%patch1 -p0 -b .orig
%patch2 -p0 -b .orig
%build
%cmake .

@ -0,0 +1,36 @@
--- openal-soft-1.8.466/Alc/alsa.c 2009-05-26 23:54:15.000000000 +0200
+++ openal-soft-1.8.466/Alc/alsa.c 2009-08-16 11:09:57.000000000 +0200
@@ -537,7 +537,6 @@ static void alsa_close_playback(ALCdevic
static ALCboolean alsa_open_capture(ALCdevice *pDevice, const ALCchar *deviceName, ALCuint frequency, ALCenum format, ALCsizei SampleSize)
{
- snd_pcm_format_t alsaFormat;
snd_pcm_hw_params_t *p;
snd_pcm_uframes_t bufferSizeInFrames;
snd_pcm_access_t access;
@@ -598,13 +597,13 @@ open_alsa:
switch(aluBytesFromFormat(format))
{
case 1:
- alsaFormat = SND_PCM_FORMAT_U8;
+ data->format = SND_PCM_FORMAT_U8;
break;
case 2:
- alsaFormat = SND_PCM_FORMAT_S16;
+ data->format = SND_PCM_FORMAT_S16;
break;
default:
- alsaFormat = SND_PCM_FORMAT_UNKNOWN;
+ data->format = SND_PCM_FORMAT_UNKNOWN;
AL_PRINT("Unknown format?! %x\n", format);
}
@@ -652,7 +652,7 @@ open_alsa:
if((i=psnd_pcm_hw_params_any(data->pcmHandle, p)) < 0)
err = "any";
/* set interleaved access */
- if(err == NULL && (i=psnd_pcm_hw_params_set_access(data->pcmHandle, p, SND_PCM_ACCESS_MMAP_INTERLEAVED)) < 0)
+ if(err == NULL && (i=psnd_pcm_hw_params_set_access(data->pcmHandle, p, SND_PCM_ACCESS_RW_INTERLEAVED)) < 0)
err = "set access";
/* set format (implicitly sets sample bits) */
if(err == NULL && (i=psnd_pcm_hw_params_set_format(data->pcmHandle, p, data->format)) < 0)
Loading…
Cancel
Save