packages: portaudio/portaudio.spec, portaudio/portaudio_asihpi_406.patch (N...
qboosh
qboosh at pld-linux.org
Fri Apr 29 20:25:54 CEST 2011
Author: qboosh Date: Fri Apr 29 18:25:54 2011 GMT
Module: packages Tag: HEAD
---- Log message:
- build and package c++ binding
- added asahpi_406 patch (from audioscience), enabled asahpi support
---- Files affected:
packages/portaudio:
portaudio.spec (1.22 -> 1.23) , portaudio_asihpi_406.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/portaudio/portaudio.spec
diff -u packages/portaudio/portaudio.spec:1.22 packages/portaudio/portaudio.spec:1.23
--- packages/portaudio/portaudio.spec:1.22 Sun Apr 10 22:55:36 2011
+++ packages/portaudio/portaudio.spec Fri Apr 29 20:25:49 2011
@@ -3,6 +3,7 @@
# Conditional build:
%bcond_without static_libs # don't build static libraries
%bcond_without apidocs # documentation generated with doxygen
+%bcond_without asahpi # ASA HPI support
#
Summary: Free, cross platform, open-source, audio I/O library
Summary(pl.UTF-8): Darmowa, międzyplatformowa i otwarta biblioteka I/O audio
@@ -10,18 +11,22 @@
Version: 19
%define snap 20110326
Release: 1.%{snap}.1
-License: LGPL-like
+License: MIT-like (see LICENSE.txt)
Group: Libraries
Source0: http://www.portaudio.com/archives/pa_stable_v%{version}_%{snap}.tgz
# Source0-md5: 8f266ce03638419ef46e4efcb0fabde6
Patch0: %{name}-ac.patch
+Patch1: http://audioscience.com/internet/download/drivers/released/v4/06/portaudio_asihpi_406.patch
URL: http://www.portaudio.com/
BuildRequires: alsa-lib-devel >= 0.9
BuildRequires: autoconf >= 2.13
BuildRequires: automake
%{?with_apidocs:BuildRequires: doxygen}
+%{?with_asahpi:BuildRequires: hpklinux-devel >= 4.06}
BuildRequires: jack-audio-connection-kit-devel
+BuildRequires: libstdc++-devel
BuildRequires: pkgconfig
+%{?with_asahpi:Requires: hpklinux-libs >= 4.06}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -42,6 +47,7 @@
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: alsa-lib-devel >= 0.9
+%{?with_asahpi:Requires: hpklinux-devel >= 4.06}
Requires: jack-audio-connection-kit-devel
%description devel
@@ -75,17 +81,62 @@
Dokumentacja API portaudio w formacie HTML generowane ze
źrodeł portaudio przez doxygen.
+%package c++
+Summary: C++ binding for PortAudio library
+Summary(pl.UTF-8): Wiązanie C++ do biblioteki PortAudio
+Group: Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description c++
+C++ binding for PortAudio library.
+
+%description c++ -l pl.UTF-8
+Wiązanie C++ do biblioteki PortAudio.
+
+%package c++-devel
+Summary: Header files for C++ binding for PortAudio library
+Summary(pl.UTF-8): Pliki nagłówkowe wiązania C++ do biblioteki PortAudio
+Group: Development/Libraries
+Requires: %{name}-c++ = %{version}-%{release}
+Requires: %{name}-devel = %{version}-%{release}
+Requires: libstdc++-devel
+
+%description c++-devel
+Header files for C++ binding for PortAudio library.
+
+%description c++-devel -l pl.UTF-8
+Pliki nagłówkowe wiązania C++ do biblioteki PortAudio.
+
+%package c++-static
+Summary: Static library of C++ binding for PortAudio library
+Summary(pl.UTF-8): Statyczna biblioteka wiązania C++ do biblioteki PortAudio
+Group: Development/Libraries
+Requires: %{name}-c++-devel = %{version}-%{release}
+
+%description c++-static
+Static library of C++ binding for PortAudio library.
+
+%description c++-static -l pl.UTF-8
+Statyczna biblioteka wiązania C++ do biblioteki PortAudio.
+
%prep
%setup -q -n %{name}
%patch0 -p1
+%patch1 -p0
%build
cp -f /usr/share/automake/config.sub .
%{__libtoolize}
+cd bindings/cpp
+%{__aclocal}
+%{__autoconf}
+%{__automake}
+cd ../..
%{__aclocal}
%{__autoconf}
%configure \
- --enable-static=%{?with_static_libs:yes}%{!?with_static_libs:no}
+ --enable-cxx \
+ --enable-static%{!?with_static_libs:=no}
%{__make}
%{?with_apidocs:/usr/bin/doxygen}
@@ -130,12 +181,32 @@
%doc doc/html/*
%endif
+%files c++
+%defattr(644,root,root,755)
+%doc bindings/cpp/{COPYING,ChangeLog}
+%attr(755,root,root) %{_libdir}/libportaudiocpp.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libportaudiocpp.so.0
+
+%files c++-devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libportaudiocpp.so
+%{_includedir}/portaudiocpp
+%{_pkgconfigdir}/portaudiocpp.pc
+
+%files c++-static
+%defattr(644,root,root,755)
+%{_libdir}/libportaudiocpp.a
+
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
* %{date} PLD Team <feedback at pld-linux.org>
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.23 2011/04/29 18:25:49 qboosh
+- build and package c++ binding
+- added asahpi_406 patch (from audioscience), enabled asahpi support
+
Revision 1.22 2011/04/10 20:55:36 megabajt
- updated to new snap (20110326)
- removed libtool file
================================================================
Index: packages/portaudio/portaudio_asihpi_406.patch
diff -u /dev/null packages/portaudio/portaudio_asihpi_406.patch:1.1
--- /dev/null Fri Apr 29 20:25:54 2011
+++ packages/portaudio/portaudio_asihpi_406.patch Fri Apr 29 20:25:49 2011
@@ -0,0 +1,906 @@
+Index: test/patest_sine.c
+===================================================================
+--- test/patest_sine.c (revision 1645)
++++ test/patest_sine.c (working copy)
+@@ -32,13 +32,13 @@
+ */
+
+ /*
+- * The text above constitutes the entire PortAudio license; however,
++ * The text above constitutes the entire PortAudio license; however,
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+- * they can be incorporated into the canonical version. It is also
+- * requested that these non-binding requests be included along with the
++ * they can be incorporated into the canonical version. It is also
++ * requested that these non-binding requests be included along with the
+ * license above.
+ */
+ #include <stdio.h>
+@@ -80,7 +80,7 @@
+ (void) timeInfo; /* Prevent unused variable warnings. */
+ (void) statusFlags;
+ (void) inputBuffer;
+-
++
+ for( i=0; i<framesPerBuffer; i++ )
+ {
+ *out++ = data->sine[data->left_phase]; /* left */
+@@ -90,7 +90,7 @@
+ data->right_phase += 3; /* higher pitch so we can distinguish left and right. */
+ if( data->right_phase >= TABLE_SIZE ) data->right_phase -= TABLE_SIZE;
+ }
+-
++
+ return paContinue;
+ }
+
+@@ -104,35 +104,42 @@
+ }
+
+ /*******************************************************************/
+-int main(void);
+-int main(void)
++int main(int argc, char **argv)
+ {
+ PaStreamParameters outputParameters;
+ PaStream *stream;
+ PaError err;
+ paTestData data;
+ int i;
++ int devindex = -1;
+
+-
++ if( argc > 1 )
++ devindex = atoi(argv[1]);
++
+ printf("PortAudio Test: output sine wave. SR = %d, BufSize = %d\n", SAMPLE_RATE, FRAMES_PER_BUFFER);
+-
++
+ /* initialise sinusoidal wavetable */
+ for( i=0; i<TABLE_SIZE; i++ )
+ {
+ data.sine[i] = (float) sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. );
+ }
+ data.left_phase = data.right_phase = 0;
+-
++
+ err = Pa_Initialize();
+ if( err != paNoError ) goto error;
+
+- outputParameters.device = Pa_GetDefaultOutputDevice(); /* default output device */
++ if (devindex < 0)
++ outputParameters.device = Pa_GetDefaultOutputDevice();
++ else
++ outputParameters.device = devindex;
++
+ if (outputParameters.device == paNoDevice) {
+ fprintf(stderr,"Error: No default output device.\n");
+ goto error;
+ }
+ outputParameters.channelCount = 2; /* stereo output */
+ outputParameters.sampleFormat = paFloat32; /* 32 bit floating point output */
++ //outputParameters.suggestedLatency = 0.25;
+ outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;
+ outputParameters.hostApiSpecificStreamInfo = NULL;
+
+@@ -165,7 +172,7 @@
+
+ Pa_Terminate();
+ printf("Test finished.\n");
+-
++
+ return err;
+ error:
+ Pa_Terminate();
+Index: src/hostapi/asihpi/pa_linux_asihpi.c
+===================================================================
+--- src/hostapi/asihpi/pa_linux_asihpi.c (revision 1645)
++++ src/hostapi/asihpi/pa_linux_asihpi.c (working copy)
+@@ -193,7 +193,7 @@
+ /** Check return value of HPI function, and map it to PaError */
+ #define PA_ASIHPI_UNLESS_(expr, paError) \
+ do { \
+- HW16 hpiError = (expr); \
++ hpi_err_t hpiError = (expr); \
+ /* If HPI error occurred */ \
+ if( UNLIKELY( hpiError ) ) \
+ { \
+@@ -265,8 +265,6 @@
+ /* implementation specific data goes here */
+
+ PaHostApiIndex hostApiIndex;
+- /** HPI subsystem pointer */
+- HPI_HSUBSYS *subSys;
+ }
+ PaAsiHpiHostApiRepresentation;
+
+@@ -280,20 +278,18 @@
+
+ /* implementation specific data goes here */
+
+- /** HPI subsystem (required for most HPI calls) */
+- HPI_HSUBSYS *subSys;
+ /** Adapter index */
+- HW16 adapterIndex;
++ uint16_t adapterIndex;
+ /** Adapter model number (hex) */
+- HW16 adapterType;
++ uint16_t adapterType;
+ /** Adapter HW/SW version */
+- HW16 adapterVersion;
++ uint16_t adapterVersion;
+ /** Adapter serial number */
+- HW32 adapterSerialNumber;
++ uint32_t adapterSerialNumber;
+ /** Stream number */
+- HW16 streamIndex;
++ uint16_t streamIndex;
+ /** 0=Input, 1=Output (HPI streams are either input or output but not both) */
+- HW16 streamIsOutput;
++ uint16_t streamIsOutput;
+ }
+ PaAsiHpiDeviceInfo;
+
+@@ -328,27 +324,25 @@
+ {
+ /** Device information (HPI handles, etc) */
+ PaAsiHpiDeviceInfo *hpiDevice;
+- /** Stream handle, as passed to HPI interface.
+- HACK: we assume types HPI_HISTREAM and HPI_HOSTREAM are the same...
+- (both are HW32 up to version 3.00 of ASIHPI, and hopefully they stay that way) */
+- HPI_HISTREAM hpiStream;
++ /** Stream handle, as passed to HPI interface. */
++ hpi_handle_t hpiStream;
+ /** Stream format, as passed to HPI interface */
+- HPI_FORMAT hpiFormat;
++ struct hpi_format hpiFormat;
+ /** Number of bytes per frame, derived from hpiFormat and saved for convenience */
+- HW32 bytesPerFrame;
++ uint32_t bytesPerFrame;
+ /** Size of hardware (on-card) buffer of stream in bytes */
+- HW32 hardwareBufferSize;
++ uint32_t hardwareBufferSize;
+ /** Size of host (BBM) buffer of stream in bytes (if used) */
+- HW32 hostBufferSize;
++ uint32_t hostBufferSize;
+ /** Upper limit on the utilization of output stream buffer (both hardware and host).
+ This prevents large latencies in an output-only stream with a potentially huge buffer
+ and a fast data generator, which would otherwise keep the hardware buffer filled to
+ capacity. See also the "Hardware Buffering=off" option in the AudioScience WAV driver. */
+- HW32 outputBufferCap;
++ uint32_t outputBufferCap;
+ /** Sample buffer (halfway station between HPI and buffer processor) */
+- HW8 *tempBuffer;
++ uint8_t *tempBuffer;
+ /** Sample buffer size, in bytes */
+- HW32 tempBufferSize;
++ uint32_t tempBufferSize;
+ }
+ PaAsiHpiStreamComponent;
+
+@@ -369,7 +363,7 @@
+ PaAsiHpiStreamComponent *input, *output;
+
+ /** Polling interval (in milliseconds) */
+- HW32 pollingInterval;
++ uint32_t pollingInterval;
+ /** Are we running in callback mode? */
+ int callbackMode;
+ /** Number of frames to transfer at a time to/from HPI */
+@@ -401,23 +395,23 @@
+ typedef struct PaAsiHpiStreamInfo
+ {
+ /** HPI stream state (HPI_STATE_STOPPED, HPI_STATE_PLAYING, etc.) */
+- HW16 state;
++ uint16_t state;
+ /** Size (in bytes) of recording/playback data buffer in HPI driver */
+- HW32 bufferSize;
++ uint32_t bufferSize;
+ /** Amount of data (in bytes) available in the buffer */
+- HW32 dataSize;
++ uint32_t dataSize;
+ /** Number of frames played/recorded since last stream reset */
+- HW32 frameCounter;
++ uint32_t frameCounter;
+ /** Amount of data (in bytes) in hardware (on-card) buffer.
+ This differs from dataSize if bus mastering (BBM) is used, which introduces another
+ driver-level buffer to which dataSize/bufferSize then refers. */
+- HW32 auxDataSize;
++ uint32_t auxDataSize;
+ /** Total number of data frames currently buffered by HPI driver (host + hw buffers) */
+- HW32 totalBufferedData;
++ uint32_t totalBufferedData;
+ /** Size of immediately available data (for input) or space (for output) in frames.
+ This only checks the first-level buffer (typically host buffer). This amount can be
+ transferred immediately. */
+- HW32 availableFrames;
++ uint32_t availableFrames;
+ /** Indicates that hardware buffer is getting too full */
+ int overflow;
+ /** Indicates that hardware buffer is getting too empty */
+@@ -479,21 +473,21 @@
+
+ /* Functions specific to this API */
+ static PaError PaAsiHpi_BuildDeviceList( PaAsiHpiHostApiRepresentation *hpiHostApi );
+-static HW16 PaAsiHpi_PaToHpiFormat( PaSampleFormat paFormat );
+-static PaSampleFormat PaAsiHpi_HpiToPaFormat( HW16 hpiFormat );
++static uint16_t PaAsiHpi_PaToHpiFormat( PaSampleFormat paFormat );
++static PaSampleFormat PaAsiHpi_HpiToPaFormat( uint16_t hpiFormat );
+ static PaError PaAsiHpi_CreateFormat( struct PaUtilHostApiRepresentation *hostApi,
+ const PaStreamParameters *parameters, double sampleRate,
+- PaAsiHpiDeviceInfo **hpiDevice, HPI_FORMAT *hpiFormat );
++ PaAsiHpiDeviceInfo **hpiDevice, struct hpi_format *hpiFormat );
+ static PaError PaAsiHpi_OpenInput( struct PaUtilHostApiRepresentation *hostApi,
+- const PaAsiHpiDeviceInfo *hpiDevice, const HPI_FORMAT *hpiFormat,
+- HPI_HISTREAM *hpiStream );
++ const PaAsiHpiDeviceInfo *hpiDevice, const struct hpi_format *hpiFormat,
++ hpi_handle_t *hpiStream );
+ static PaError PaAsiHpi_OpenOutput( struct PaUtilHostApiRepresentation *hostApi,
+- const PaAsiHpiDeviceInfo *hpiDevice, const HPI_FORMAT *hpiFormat,
+- HPI_HOSTREAM *hpiStream );
++ const PaAsiHpiDeviceInfo *hpiDevice, const struct hpi_format *hpiFormat,
++ hpi_handle_t *hpiStream );
+ static PaError PaAsiHpi_GetStreamInfo( PaAsiHpiStreamComponent *streamComp, PaAsiHpiStreamInfo *info );
+ static void PaAsiHpi_StreamComponentDump( PaAsiHpiStreamComponent *streamComp, PaAsiHpiStream *stream );
+ static void PaAsiHpi_StreamDump( PaAsiHpiStream *stream );
+-static PaError PaAsiHpi_SetupBuffers( PaAsiHpiStreamComponent *streamComp, HW32 pollingInterval,
++static PaError PaAsiHpi_SetupBuffers( PaAsiHpiStreamComponent *streamComp, uint32_t pollingInterval,
+ unsigned long framesPerPaHostBuffer, PaTime suggestedLatency );
+ static PaError PaAsiHpi_PrimeOutputWithSilence( PaAsiHpiStream *stream );
+ static PaError PaAsiHpi_StartStream( PaAsiHpiStream *stream, int outputPrimed );
+@@ -529,42 +523,40 @@
+ PaUtilHostApiRepresentation *hostApi = &hpiHostApi->baseHostApiRep;
+ PaHostApiInfo *baseApiInfo = &hostApi->info;
+ PaAsiHpiDeviceInfo *hpiDeviceList;
+- HW16 adapterList[ HPI_MAX_ADAPTERS ];
+- HW16 numAdapters;
+- HW16 hpiError = 0;
++ int numAdapters;
++ hpi_err_t hpiError = 0;
+ int i, j, deviceCount = 0, deviceIndex = 0;
+
+ assert( hpiHostApi );
+- assert( hpiHostApi->subSys );
+
+ /* Look for adapters (not strictly necessary, as AdapterOpen can do the same, but this */
+ /* way we have less errors since we do not try to open adapters we know aren't there) */
+ /* Errors not considered critical here (subsystem may report 0 devices), but report them */
+ /* in debug mode. */
+- PA_ASIHPI_UNLESS_( HPI_SubSysFindAdapters( hpiHostApi->subSys, &numAdapters,
+- adapterList, HPI_MAX_ADAPTERS ), paNoError );
++ PA_ASIHPI_UNLESS_( HPI_SubSysGetNumAdapters( NULL, &numAdapters), paNoError );
+
+ /* First open and count the number of devices (= number of streams), to ease memory allocation */
+- for( i=0; i < HPI_MAX_ADAPTERS; ++i )
++ for( i=0; i < numAdapters; ++i )
+ {
+- HW16 inStreams, outStreams;
+- HW16 version;
+- HW32 serial;
+- HW16 type;
++ uint16_t inStreams, outStreams;
++ uint16_t version;
++ uint32_t serial;
++ uint16_t type;
++ uint32_t idx;
+
+- /* If no adapter found at this index, skip it */
+- if( adapterList[i] == 0 )
++ hpiError = HPI_SubSysGetAdapter(NULL, i, &idx, &type);
++ if (hpiError)
+ continue;
+
+ /* Try to open adapter */
+- hpiError = HPI_AdapterOpen( hpiHostApi->subSys, i );
++ hpiError = HPI_AdapterOpen( NULL, idx );
+ /* Report error and skip to next device on failure */
+ if( hpiError )
+ {
+ PA_ASIHPI_REPORT_ERROR_( hpiError );
+ continue;
+ }
+- hpiError = HPI_AdapterGetInfo( hpiHostApi->subSys, i,
++ hpiError = HPI_AdapterGetInfo( NULL, idx,
+ &outStreams, &inStreams, &version, &serial, &type );
+ /* Skip to next device on failure */
+ if( hpiError )
+@@ -597,19 +589,20 @@
+ paInsufficientMemory );
+
+ /* Now query devices again for information */
+- for( i=0; i < HPI_MAX_ADAPTERS; ++i )
++ for( i=0; i < numAdapters; ++i )
+ {
+- HW16 inStreams, outStreams;
+- HW16 version;
+- HW32 serial;
+- HW16 type;
++ uint16_t inStreams, outStreams;
++ uint16_t version;
++ uint32_t serial;
++ uint16_t type;
++ uint32_t idx;
+
+- /* If no adapter found at this index, skip it */
+- if( adapterList[i] == 0 )
++ hpiError = HPI_SubSysGetAdapter(NULL, i, &idx, &type);
++ if (hpiError)
+ continue;
+
+ /* Assume adapter is still open from previous round */
+- hpiError = HPI_AdapterGetInfo( hpiHostApi->subSys, i,
++ hpiError = HPI_AdapterGetInfo( NULL, idx,
+ &outStreams, &inStreams, &version, &serial, &type );
+ /* Report error and skip to next device on failure */
+ if( hpiError )
+@@ -620,7 +613,7 @@
+ else
+ {
+ PA_DEBUG(( "Found HPI Adapter ID=%4X Idx=%d #In=%d #Out=%d S/N=%d HWver=%c%d DSPver=%03d\n",
+- type, i, inStreams, outStreams, serial,
++ type, idx, inStreams, outStreams, serial,
+ ((version>>3)&0xf)+'A', /* Hw version major */
+ version&0x7, /* Hw version minor */
+ ((version>>13)*100)+((version>>7)&0x3f) /* DSP code version */
+@@ -637,8 +630,7 @@
+
+ memset( hpiDevice, 0, sizeof(PaAsiHpiDeviceInfo) );
+ /* Set implementation-specific device details */
+- hpiDevice->subSys = hpiHostApi->subSys;
+- hpiDevice->adapterIndex = i;
++ hpiDevice->adapterIndex = idx;
+ hpiDevice->adapterType = type;
+ hpiDevice->adapterVersion = version;
+ hpiDevice->adapterSerialNumber = serial;
+@@ -680,8 +672,7 @@
+
+ memset( hpiDevice, 0, sizeof(PaAsiHpiDeviceInfo) );
+ /* Set implementation-specific device details */
+- hpiDevice->subSys = hpiHostApi->subSys;
+- hpiDevice->adapterIndex = i;
++ hpiDevice->adapterIndex = idx;
+ hpiDevice->adapterType = type;
+ hpiDevice->adapterVersion = version;
+ hpiDevice->adapterSerialNumber = serial;
+@@ -746,10 +737,9 @@
+ PA_UNLESS_( hpiHostApi->allocations = PaUtil_CreateAllocationGroup(), paInsufficientMemory );
+
+ hpiHostApi->hostApiIndex = hostApiIndex;
+- hpiHostApi->subSys = NULL;
+
+ /* Try to initialize HPI subsystem */
+- if( ( hpiHostApi->subSys = HPI_SubSysCreate() ) == NULL)
++ if(HPI_SubSysCreate() == NULL)
+ {
+ /* the V19 development docs say that if an implementation
+ * detects that it cannot be used, it should return a NULL
+@@ -761,10 +751,10 @@
+ }
+ else
+ {
+- HW32 hpiVersion;
+- PA_ASIHPI_UNLESS_( HPI_SubSysGetVersion( hpiHostApi->subSys, &hpiVersion ), paUnanticipatedHostError );
+- PA_DEBUG(( "HPI interface v%d.%02d\n",
+- hpiVersion >> 8, 10*((hpiVersion & 0xF0) >> 4) + (hpiVersion & 0x0F) ));
++ uint32_t hpiVersion;
++ PA_ASIHPI_UNLESS_( HPI_SubSysGetVersionEx( NULL, &hpiVersion ), paUnanticipatedHostError );
++ PA_DEBUG(( "HPI interface v%d.%02d.%02d\n",
++ hpiVersion >> 16, (hpiVersion >> 8) & 0x0F, (hpiVersion & 0x0F) ));
+ }
+
+ *hostApi = &hpiHostApi->baseHostApiRep;
+@@ -820,25 +810,22 @@
+ if( hpiHostApi )
+ {
+ /* Get rid of HPI-specific structures */
+- if( hpiHostApi->subSys )
++ uint16_t lastAdapterIndex = HPI_MAX_ADAPTERS;
++ /* Iterate through device list and close adapters */
++ for( i=0; i < hostApi->info.deviceCount; ++i )
+ {
+- HW16 lastAdapterIndex = HPI_MAX_ADAPTERS;
+- /* Iterate through device list and close adapters */
+- for( i=0; i < hostApi->info.deviceCount; ++i )
++ PaAsiHpiDeviceInfo *hpiDevice = (PaAsiHpiDeviceInfo *) hostApi->deviceInfos[ i ];
++ /* Close adapter only if it differs from previous one */
++ if( hpiDevice->adapterIndex != lastAdapterIndex )
+ {
+- PaAsiHpiDeviceInfo *hpiDevice = (PaAsiHpiDeviceInfo *) hostApi->deviceInfos[ i ];
+- /* Close adapter only if it differs from previous one */
+- if( hpiDevice->adapterIndex != lastAdapterIndex )
+- {
+- /* Ignore errors (report only during debugging) */
+- PA_ASIHPI_UNLESS_( HPI_AdapterClose( hpiHostApi->subSys,
+- hpiDevice->adapterIndex ), paNoError );
+- lastAdapterIndex = hpiDevice->adapterIndex;
+- }
++ /* Ignore errors (report only during debugging) */
++ PA_ASIHPI_UNLESS_( HPI_AdapterClose( NULL,
++ hpiDevice->adapterIndex ), paNoError );
++ lastAdapterIndex = hpiDevice->adapterIndex;
+ }
+- /* Finally dismantle HPI subsystem */
+- HPI_SubSysFree( hpiHostApi->subSys );
+ }
++ /* Finally dismantle HPI subsystem */
++ HPI_SubSysFree( NULL );
+
+ if( hpiHostApi->allocations )
+ {
+@@ -859,7 +846,7 @@
+
+ @return HPI sample format
+ */
+-static HW16 PaAsiHpi_PaToHpiFormat( PaSampleFormat paFormat )
++static uint16_t PaAsiHpi_PaToHpiFormat( PaSampleFormat paFormat )
+ {
+ /* Ignore interleaving flag */
+ switch( paFormat & ~paNonInterleaved )
+@@ -893,7 +880,7 @@
+
+ @return PortAudio sample format
+ */
+-static PaSampleFormat PaAsiHpi_HpiToPaFormat( HW16 hpiFormat )
++static PaSampleFormat PaAsiHpi_HpiToPaFormat( uint16_t hpiFormat )
+ {
+ switch( hpiFormat )
<<Diff was trimmed, longer than 597 lines>>
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/portaudio/portaudio.spec?r1=1.22&r2=1.23&f=u
More information about the pld-cvs-commit
mailing list