From b43ed1f458010d8ad521d4a654e2374351ec64b6 Mon Sep 17 00:00:00 2001 From: Samuli Suominen Date: Mon, 16 Jun 2008 14:46:44 +0000 Subject: Portaudio v19 patch from bug 222841, Comment #8 by Thomas Beierlein. (Portage version: 2.1.5.5) --- app-misc/lirc/ChangeLog | 6 ++- app-misc/lirc/files/lirc-0.8.3-pa19.patch | 68 +++++++++++++++++++++++++++++++ app-misc/lirc/lirc-0.8.3-r2.ebuild | 6 ++- 3 files changed, 78 insertions(+), 2 deletions(-) create mode 100644 app-misc/lirc/files/lirc-0.8.3-pa19.patch (limited to 'app-misc') diff --git a/app-misc/lirc/ChangeLog b/app-misc/lirc/ChangeLog index 51209a588d71..cf536f797f8c 100644 --- a/app-misc/lirc/ChangeLog +++ b/app-misc/lirc/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for app-misc/lirc # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-misc/lirc/ChangeLog,v 1.180 2008/06/06 20:04:01 zzam Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-misc/lirc/ChangeLog,v 1.181 2008/06/16 14:46:43 drac Exp $ + + 16 Jun 2008; Samuli Suominen + +files/lirc-0.8.3-pa19.patch, lirc-0.8.3-r2.ebuild: + Portaudio v19 patch from bug 222841, Comment #8 by Thomas Beierlein. 06 Jun 2008; Matthias Schwarzott lirc-0.8.3-r2.ebuild: Added imon_lcd to list of possible lirc_devices, thanks to Jan Paesmans diff --git a/app-misc/lirc/files/lirc-0.8.3-pa19.patch b/app-misc/lirc/files/lirc-0.8.3-pa19.patch new file mode 100644 index 000000000000..31cae2bb8e6c --- /dev/null +++ b/app-misc/lirc/files/lirc-0.8.3-pa19.patch @@ -0,0 +1,68 @@ +--- daemons/hw_audio.c.orig 2008-06-13 22:24:40.000000000 +0200 ++++ daemons/hw_audio.c 2008-06-13 22:17:31.000000000 +0200 +@@ -66,7 +66,7 @@ + } + paTestData; + +-PortAudioStream *stream; ++PaStream *stream; + + + extern struct ir_remote *repeat_remote; +@@ -90,7 +90,9 @@ + + static int recordCallback( void *inputBuffer, void *outputBuffer, + unsigned long framesPerBuffer, +- PaTimestamp outTime, void *userData ) ++ PaStreamCallbackTimeInfo outTime, ++ PaStreamCallbackFlags status, ++ void *userData ) + { + paTestData *data = (paTestData*)userData; + SAMPLE *rptr = (SAMPLE*)inputBuffer; +@@ -215,6 +217,7 @@ + int audio_init() + { + ++ PaStreamParameters inputParameters; + PaError err; + int flags; + struct termios t; +@@ -237,22 +240,27 @@ + err = Pa_Initialize(); + if( err != paNoError ) goto error; + ++ inputParameters.device = Pa_GetDefaultInputDevice(); /* default input device */ ++ if (inputParameters.device == paNoDevice) { ++ logprintf(LOG_ERR, "No default input device"); ++ goto error; ++ } ++ inputParameters.channelCount = NUM_CHANNELS; /* stereo input */ ++ inputParameters.sampleFormat = PA_SAMPLE_TYPE; ++ inputParameters.suggestedLatency = ++ Pa_GetDeviceInfo( inputParameters.device )->defaultLowInputLatency; ++ inputParameters.hostApiSpecificStreamInfo = NULL; ++ ++ + // Record some audio. -------------------------------------------- + err = Pa_OpenStream + ( + &stream, +- Pa_GetDefaultInputDeviceID(), +- NUM_CHANNELS, // stereo input +- PA_SAMPLE_TYPE, +- NULL, +- paNoDevice, +- 0, +- PA_SAMPLE_TYPE, +- NULL, ++ &inputParameters, ++ NULL, // output parameters + SAMPLE_RATE, + 512, // frames per buffer +- 0, // number of buffers, if zero then use default minimum +- 0, // flags ++ 0, // flags + recordCallback, + &data ); + diff --git a/app-misc/lirc/lirc-0.8.3-r2.ebuild b/app-misc/lirc/lirc-0.8.3-r2.ebuild index 2c77201abe08..90023f7fed3d 100644 --- a/app-misc/lirc/lirc-0.8.3-r2.ebuild +++ b/app-misc/lirc/lirc-0.8.3-r2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-misc/lirc/lirc-0.8.3-r2.ebuild,v 1.2 2008/06/06 20:04:01 zzam Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-misc/lirc/lirc-0.8.3-r2.ebuild,v 1.3 2008/06/16 14:46:43 drac Exp $ inherit eutils linux-mod flag-o-matic autotools @@ -262,6 +262,10 @@ src_unpack() { sed -i -e '/#define LIRC_DRIVER_DEVICE/d' configure.ac acconfig.h echo "#define LIRC_DRIVER_DEVICE \"${LIRC_DRIVER_DEVICE}\"" >> acconfig.h + if has_version "=media-libs/portaudio-19*"; then + epatch "${FILESDIR}"/${P}-pa19.patch + fi + eautoreconf } -- cgit v1.2.3-65-gdbad