packages: audacity/audacity.spec, audacity/portaudio_asihpi_406.patch (NEW)...
qboosh
qboosh at pld-linux.org
Mon May 9 19:01:40 CEST 2011
Author: qboosh Date: Mon May 9 17:01:40 2011 GMT
Module: packages Tag: HEAD
---- Log message:
- updated to 1.3.13
- use system vamp sdk
- force local libsbsms (build fails with unmodified system version)
- patch internal (modified) portaudio for hpklinux 4.x
---- Files affected:
packages/audacity:
audacity.spec (1.93 -> 1.94) , portaudio_asihpi_406.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/audacity/audacity.spec
diff -u packages/audacity/audacity.spec:1.93 packages/audacity/audacity.spec:1.94
--- packages/audacity/audacity.spec:1.93 Sat Mar 26 09:13:19 2011
+++ packages/audacity/audacity.spec Mon May 9 19:01:34 2011
@@ -1,9 +1,10 @@
# $Revision$, $Date$
# TODO:
# - internal portaudio crashes when only OSS is available on startup
-# - use system vamp (vamp-hostsdk >= 2.0)
+# - use system portaudio (>= 19, but relies on local changes)
+# - use system portSMF?
# - use system ffmpeg (libavcodec >= 51.53, libavformat >= 52.12)
-# - use system sbsms (>= 1.6.0)
+# - use system sbsms (>= 1.6.0, but relies on local changes)
#
# Conditional build:
%bcond_with libresample # using libresample (default libsamplerate)
@@ -12,13 +13,13 @@
Summary(pl.UTF-8): Audacity - narzędzie do obróbki plików dźwiękowych
Summary(ru.UTF-8): Кроссплатформенный звуковой редактор
Name: audacity
-Version: 1.3.12
+Version: 1.3.13
Release: 1
License: GPL v2
Group: X11/Applications/Sound
#Source0Download: http://code.google.com/p/audacity/downloads/list
Source0: http://audacity.googlecode.com/files/%{name}-minsrc-%{version}-beta.tar.bz2
-# Source0-md5: 76996fec67181ca82ba191e012518b57
+# Source0-md5: 57be7fadb8c8dd17b8462c7ac1561d03
# Link from http://manual.audacityteam.org/index.php?title=Main_Page
Source1: http://manual.audacityteam.org/help.zip
# Source1-md5: 2043778cfd3c7df9b3774526e123d6d8
@@ -27,25 +28,31 @@
Patch0: %{name}-system-libs.patch
Patch1: %{name}-opt.patch
Patch2: %{name}-no-macos.patch
+# modified from http://audioscience.com/internet/download/drivers/released/v4/06/portaudio_asihpi_406.patch
+Patch3: portaudio_asihpi_406.patch
URL: http://audacity.sourceforge.net/
BuildRequires: autoconf >= 2.59
BuildRequires: automake
BuildRequires: expat-devel >= 1.95
BuildRequires: flac-c++-devel >= 1.2.0
BuildRequires: gettext-devel
+BuildRequires: hpklinux-devel >= 4.06
BuildRequires: libid3tag-devel >= 0.15.0b-2
BuildRequires: libjpeg-devel
BuildRequires: libmad-devel >= 0.14.2b-4
%{?with_libresample:BuildRequires: libresample-devel >= 0.1.3}
%{!?with_libresample:BuildRequires: libsamplerate-devel >= 0.1.2}
+#BuildRequires: libsbsms-devel >= 1.6.0
BuildRequires: libsndfile-devel >= 1.0.0
BuildRequires: libstdc++-devel
BuildRequires: libvorbis-devel >= 1:1.0
+#BuildRequires: portaudio-devel >= 19
BuildRequires: pkgconfig
BuildRequires: soundtouch-devel >= 1.3.0
BuildRequires: speex-devel
BuildRequires: twolame-devel >= 0.3.9
BuildRequires: unzip
+BuildRequires: vamp-devel >= 2.0
BuildRequires: which
BuildRequires: wxGTK2-unicode-devel >= 2.8.0
Requires(post,postun): shared-mime-info
@@ -86,6 +93,9 @@
%patch0 -p1
%patch1 -p1
%patch2 -p1
+cd lib-src/portaudio-v19
+%patch3 -p0
+cd ../..
sed -i 's/libmp3lame.so/libmp3lame.so.0/g' locale/*.po
@@ -112,6 +122,7 @@
--with-libmad=system \
--with-libsndfile=system \
--with-libflac=system \
+ --with-sbsms=local \
--with-vorbis=system
%{__make}
@@ -154,6 +165,7 @@
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/nyquist
%{_datadir}/%{name}/plug-ins
+%{_datadir}/%{name}/EQDefaultCurves.xml
%doc %{_datadir}/%{name}/help
%{_mandir}/man1/audacity.1*
%{_desktopdir}/audacity.desktop
@@ -168,6 +180,12 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.94 2011/05/09 17:01:34 qboosh
+- updated to 1.3.13
+- use system vamp sdk
+- force local libsbsms (build fails with unmodified system version)
+- patch internal (modified) portaudio for hpklinux 4.x
+
Revision 1.93 2011/03/26 08:13:19 qboosh
- download URL
================================================================
Index: packages/audacity/portaudio_asihpi_406.patch
diff -u /dev/null packages/audacity/portaudio_asihpi_406.patch:1.1
--- /dev/null Mon May 9 19:01:40 2011
+++ packages/audacity/portaudio_asihpi_406.patch Mon May 9 19:01:35 2011
@@ -0,0 +1,809 @@
+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 )
+ {
+@@ -938,11 +925,11 @@
+ */
+ static PaError PaAsiHpi_CreateFormat( struct PaUtilHostApiRepresentation *hostApi,
+ const PaStreamParameters *parameters, double sampleRate,
+- PaAsiHpiDeviceInfo **hpiDevice, HPI_FORMAT *hpiFormat )
++ PaAsiHpiDeviceInfo **hpiDevice, struct hpi_format *hpiFormat )
+ {
+ int maxChannelCount = 0;
+ PaSampleFormat hostSampleFormat = 0;
+- HW16 hpiError = 0;
++ hpi_err_t hpiError = 0;
+
+ /* Unless alternate device specification is supported, reject the use of
+ paUseHostApiSpecificDeviceSpecification */
+@@ -979,9 +966,9 @@
+ hostSampleFormat = PaUtil_SelectClosestAvailableFormat(PA_ASIHPI_AVAILABLE_FORMATS_,
+ parameters->sampleFormat );
+ /* Setup format + info objects */
+- hpiError = HPI_FormatCreate( hpiFormat, (HW16)parameters->channelCount,
++ hpiError = HPI_FormatCreate( hpiFormat, (uint16_t)parameters->channelCount,
+ PaAsiHpi_PaToHpiFormat( hostSampleFormat ),
+- (HW32)sampleRate, 0, 0 );
++ (uint32_t)sampleRate, 0, 0 );
+ if( hpiError )
+ {
+ PA_ASIHPI_REPORT_ERROR_( hpiError );
+@@ -1016,25 +1003,25 @@
+ @return PortAudio error code (typically indicating a problem with stream format or device)
+ */
+ 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 )
+ {
+ PaAsiHpiHostApiRepresentation *hpiHostApi = (PaAsiHpiHostApiRepresentation*)hostApi;
+ PaError result = paNoError;
+- HW16 hpiError = 0;
++ hpi_err_t hpiError = 0;
+
+ /* Catch misplaced output devices, as they typically have 0 input channels */
+ PA_UNLESS_( !hpiDevice->streamIsOutput, paInvalidChannelCount );
+ /* Try to open input stream */
+- PA_ASIHPI_UNLESS_( HPI_InStreamOpen( hpiHostApi->subSys, hpiDevice->adapterIndex,
++ PA_ASIHPI_UNLESS_( HPI_InStreamOpen( NULL, hpiDevice->adapterIndex,
+ hpiDevice->streamIndex, hpiStream ), paDeviceUnavailable );
+ /* Set input format (checking it in the process) */
+ /* Could also use HPI_InStreamQueryFormat, but this economizes the process */
+- hpiError = HPI_InStreamSetFormat( hpiHostApi->subSys, *hpiStream, (HPI_FORMAT*)hpiFormat );
++ hpiError = HPI_InStreamSetFormat( NULL, *hpiStream, (struct hpi_format*)hpiFormat );
+ if( hpiError )
+ {
+ PA_ASIHPI_REPORT_ERROR_( hpiError );
+- PA_ASIHPI_UNLESS_( HPI_InStreamClose( hpiHostApi->subSys, *hpiStream ), paNoError );
++ PA_ASIHPI_UNLESS_( HPI_InStreamClose( NULL, *hpiStream ), paNoError );
+ switch( hpiError )
+ {
+ case HPI_ERROR_INVALID_FORMAT:
+@@ -1071,25 +1058,25 @@
+ @return PortAudio error code (typically indicating a problem with stream format or device)
+ */
+ 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 )
+ {
+ PaAsiHpiHostApiRepresentation *hpiHostApi = (PaAsiHpiHostApiRepresentation*)hostApi;
+ PaError result = paNoError;
+- HW16 hpiError = 0;
++ hpi_err_t hpiError = 0;
+
+ /* Catch misplaced input devices, as they typically have 0 output channels */
+ PA_UNLESS_( hpiDevice->streamIsOutput, paInvalidChannelCount );
+ /* Try to open output stream */
+- PA_ASIHPI_UNLESS_( HPI_OutStreamOpen( hpiHostApi->subSys, hpiDevice->adapterIndex,
++ PA_ASIHPI_UNLESS_( HPI_OutStreamOpen( NULL, hpiDevice->adapterIndex,
+ hpiDevice->streamIndex, hpiStream ), paDeviceUnavailable );
+
+ /* Check output format (format is set on first write to output stream) */
+- hpiError = HPI_OutStreamQueryFormat( hpiHostApi->subSys, *hpiStream, (HPI_FORMAT*)hpiFormat );
++ hpiError = HPI_OutStreamQueryFormat( NULL, *hpiStream, (struct hpi_format*)hpiFormat );
+ if( hpiError )
+ {
+ PA_ASIHPI_REPORT_ERROR_( hpiError );
+- PA_ASIHPI_UNLESS_( HPI_OutStreamClose( hpiHostApi->subSys, *hpiStream ), paNoError );
++ PA_ASIHPI_UNLESS_( HPI_OutStreamClose( NULL, *hpiStream ), paNoError );
+ switch( hpiError )
+ {
+ case HPI_ERROR_INVALID_FORMAT:
+@@ -1135,12 +1122,12 @@
+ PaError result = paFormatIsSupported;
+ PaAsiHpiHostApiRepresentation *hpiHostApi = (PaAsiHpiHostApiRepresentation*)hostApi;
+ PaAsiHpiDeviceInfo *hpiDevice = NULL;
+- HPI_FORMAT hpiFormat;
++ struct hpi_format hpiFormat;
+
+ /* Input stream */
+ if( inputParameters )
+ {
+- HPI_HISTREAM hpiStream;
++ hpi_handle_t hpiStream;
+ PA_DEBUG(( "%s: Checking input params: dev=%d, sr=%d, chans=%d, fmt=%d\n",
+ __FUNCTION__, inputParameters->device, (int)sampleRate,
+ inputParameters->channelCount, inputParameters->sampleFormat ));
+@@ -1150,13 +1137,13 @@
+ /* Open stream to further check format */
+ PA_ENSURE_( PaAsiHpi_OpenInput( hostApi, hpiDevice, &hpiFormat, &hpiStream ) );
+ /* Close stream again */
+- PA_ASIHPI_UNLESS_( HPI_InStreamClose( hpiHostApi->subSys, hpiStream ), paNoError );
++ PA_ASIHPI_UNLESS_( HPI_InStreamClose( NULL, hpiStream ), paNoError );
+ }
+
+ /* Output stream */
+ if( outputParameters )
+ {
+- HPI_HOSTREAM hpiStream;
++ hpi_handle_t hpiStream;
+ PA_DEBUG(( "%s: Checking output params: dev=%d, sr=%d, chans=%d, fmt=%d\n",
+ __FUNCTION__, outputParameters->device, (int)sampleRate,
+ outputParameters->channelCount, outputParameters->sampleFormat ));
+@@ -1166,7 +1153,7 @@
+ /* Open stream to further check format */
+ PA_ENSURE_( PaAsiHpi_OpenOutput( hostApi, hpiDevice, &hpiFormat, &hpiStream ) );
+ /* Close stream again */
+- PA_ASIHPI_UNLESS_( HPI_OutStreamClose( hpiHostApi->subSys, hpiStream ), paNoError );
++ PA_ASIHPI_UNLESS_( HPI_OutStreamClose( NULL, hpiStream ), paNoError );
+ }
+
+ error:
+@@ -1188,9 +1175,9 @@
+ static PaError PaAsiHpi_GetStreamInfo( PaAsiHpiStreamComponent *streamComp, PaAsiHpiStreamInfo *info )
+ {
<<Diff was trimmed, longer than 597 lines>>
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/audacity/audacity.spec?r1=1.93&r2=1.94&f=u
More information about the pld-cvs-commit
mailing list