From e986d5487d3aeefa97d43e5f25b2335561c32e0c Mon Sep 17 00:00:00 2001 From: Thomas Kowaliczek Date: Aug 16 2009 11:24:46 +0000 Subject: -Added an upstream patch that fix the bug 517721 --- diff --git a/openal-soft.spec b/openal-soft.spec index bc03049..cdf066b 100644 --- a/openal-soft.spec +++ b/openal-soft.spec @@ -8,14 +8,14 @@ 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 BuildRequires: pulseaudio-libs-devel BuildRequires: portaudio-devel BuildRequires: cmake -Obsoletes: openal <= 0.0.10 -Provides: openal = %{version} +Conflicts: openal-devel %description OpenAL Soft is a cross-platform software implementation of the OpenAL 3D @@ -42,6 +42,7 @@ developing applications that use %{name}. %prep %setup -q %patch1 -p0 -b .orig +%patch2 -p0 -b .orig %build %cmake . diff --git a/upstream.patch b/upstream.patch new file mode 100644 index 0000000..1424fec --- /dev/null +++ b/upstream.patch @@ -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)