rpms/audacity-freeworld/devel audacity-1.3.6-flac-import.patch, NONE, 1.1 audacity-1.3.7-audiodevdefaults.patch, NONE, 1.1 audacity-1.3.7-libdir.patch, NONE, 1.1 audacity-1.3.7-libmp3lame-default.patch, NONE, 1.1 audacity-1.3.7-portaudio-non-mmap-alsa.patch, NONE, 1.1 audacity-1.3.7-repeat.patch, NONE, 1.1 audacity-1.3.7-vamp-1.3.patch, NONE, 1.1 .cvsignore, 1.4, 1.5 audacity-freeworld.spec, 1.9, 1.10 sources, 1.4, 1.5 audacity-1.3.2-allegro-cflags.patch, 1.1, NONE audacity-1.3.4-gcc43.patch, 1.1, NONE audacity-1.3.4-libdir.patch, 1.1, NONE audacity-1.3.4-libmp3lame-default.patch, 1.1, NONE audacity-1.3.5-fr.patch, 1.1, NONE audacity-1.3.5-gcc43.patch, 1.1, NONE audacity-1.3.6-ffmpeg-lib-search-path.patch, 1.1, NONE audacity-1.3.6-portaudio-pulseaudio-rev4-pathfix.patch, 1.1, NONE

David Timms dtimms at rpmfusion.org
Tue May 26 15:38:58 CEST 2009


Author: dtimms

Update of /cvs/free/rpms/audacity-freeworld/devel
In directory se02.es.rpmfusion.net:/tmp/cvs-serv25722

Modified Files:
	.cvsignore audacity-freeworld.spec sources 
Added Files:
	audacity-1.3.6-flac-import.patch 
	audacity-1.3.7-audiodevdefaults.patch 
	audacity-1.3.7-libdir.patch 
	audacity-1.3.7-libmp3lame-default.patch 
	audacity-1.3.7-portaudio-non-mmap-alsa.patch 
	audacity-1.3.7-repeat.patch audacity-1.3.7-vamp-1.3.patch 
Removed Files:
	audacity-1.3.2-allegro-cflags.patch audacity-1.3.4-gcc43.patch 
	audacity-1.3.4-libdir.patch 
	audacity-1.3.4-libmp3lame-default.patch 
	audacity-1.3.5-fr.patch audacity-1.3.5-gcc43.patch 
	audacity-1.3.6-ffmpeg-lib-search-path.patch 
	audacity-1.3.6-portaudio-pulseaudio-rev4-pathfix.patch 
Log Message:
update to 1.3.7 beta
include fedora audacity patches
remove old patches
remove dual build of the stable release


audacity-1.3.6-flac-import.patch:

--- NEW FILE audacity-1.3.6-flac-import.patch ---
diff -Nur audacity-src-1.3.6-orig/src/import/ImportFLAC.cpp audacity-src-1.3.6/src/import/ImportFLAC.cpp
--- audacity-src-1.3.6-orig/src/import/ImportFLAC.cpp	2008-10-25 14:14:27.000000000 +0200
+++ audacity-src-1.3.6/src/import/ImportFLAC.cpp	2008-11-05 00:15:33.000000000 +0100
@@ -361,6 +361,8 @@
               Tags *tags)
 {
    wxASSERT(mStreamInfoDone);
+   if (!mStreamInfoDone)
+      return eImportFailed;
 
    CreateProgress();
 

audacity-1.3.7-audiodevdefaults.patch:

--- NEW FILE audacity-1.3.7-audiodevdefaults.patch ---
diff -Nur audacity-src-1.3.7-orig/src/prefs/AudioIOPrefs.cpp audacity-src-1.3.7/src/prefs/AudioIOPrefs.cpp
--- audacity-src-1.3.7-orig/src/prefs/AudioIOPrefs.cpp	2009-01-27 21:50:58.000000000 +0100
+++ audacity-src-1.3.7/src/prefs/AudioIOPrefs.cpp	2009-03-02 17:25:17.000000000 +0100
@@ -71,6 +71,25 @@
    wxString Name;
    wxString Label;
 
+   mDefaultPlayDeviceName = gPrefs->Read(wxT("/AudioIO/PlaybackDevice"), wxT(""));
+   int playDeviceNum = -1;  // use device name from gPrefs
+   if ( mDefaultPlayDeviceName == wxT("") ) {
+#if USE_PORTAUDIO_V19
+      playDeviceNum = Pa_GetDefaultOutputDevice();
+#else
+      playDeviceNum = Pa_GetDefaultOutputDeviceID();
+#endif
+   }
+   mDefaultRecDeviceName = gPrefs->Read(wxT("/AudioIO/RecordingDevice"), wxT(""));
+   int recDeviceNum = -1;  // use device name from gPrefs
+   if ( mDefaultRecDeviceName == wxT("") ) {
+#if USE_PORTAUDIO_V19
+      recDeviceNum = Pa_GetDefaultInputDevice();
+#else
+      recDeviceNum = Pa_GetDefaultInputDeviceID();
+#endif
+   }
+
 #if USE_PORTAUDIO_V19
    int nDevices = Pa_GetDeviceCount();
 #else
@@ -85,10 +104,16 @@
       if (info->maxOutputChannels > 0) {
          mmPlayNames.Add( Name );
          mmPlayLabels.Add( Label );
+         if ( playDeviceNum == j ) {
+            mDefaultPlayDeviceName = Name;
+         }
       }
       if (info->maxInputChannels > 0) {
          mmRecordNames.Add( Name );
          mmRecordLabels.Add( Label );
+         if ( recDeviceNum == j ) {
+            mDefaultRecDeviceName = Name;
+         }
 //         if (info->maxInputChannels > numChannels)
 //            numChannels = info->maxInputChannels;
       }
@@ -121,7 +146,7 @@
       S.StartMultiColumn(2, wxEXPAND);
       S.SetStretchyCol(1);
       mPlay = S.TieChoice( _("Device") + wxString(wxT(":")), wxT("PlaybackDevice"), 
-         wxT(""), mmPlayNames, mmPlayLabels );
+         mDefaultPlayDeviceName, mmPlayNames, mmPlayLabels );
 
       S.AddPrompt( _("Using:") );
       wxString ver = _("Portaudio v");
@@ -139,7 +164,7 @@
       S.StartMultiColumn(2, wxEXPAND);
       S.SetStretchyCol(1);
       mRec = S.TieChoice( _("Device") + wxString(wxT(":")), wxT("RecordingDevice"), 
-         wxT(""), mmRecordNames, mmRecordLabels );
+         mDefaultRecDeviceName, mmRecordNames, mmRecordLabels );
       S.TieChoice( _("Channels") + wxString(wxT(":")), wxT("RecordChannels"), 
          2, mmChannelNames, mmChannelLabels );
       S.EndMultiColumn();
diff -Nur audacity-src-1.3.7-orig/src/prefs/AudioIOPrefs.h audacity-src-1.3.7/src/prefs/AudioIOPrefs.h
--- audacity-src-1.3.7-orig/src/prefs/AudioIOPrefs.h	2009-01-27 21:50:58.000000000 +0100
+++ audacity-src-1.3.7/src/prefs/AudioIOPrefs.h	2009-03-02 17:25:16.000000000 +0100
@@ -48,6 +48,9 @@
 
    wxChoice *mPlay;
    wxChoice *mRec;
+
+   wxString mDefaultPlayDeviceName;
+   wxString mDefaultRecDeviceName;
 };
 
 #endif

audacity-1.3.7-libdir.patch:

--- NEW FILE audacity-1.3.7-libdir.patch ---
diff -Nur audacity-src-1.3.6-orig/src/effects/ladspa/LoadLadspa.cpp audacity-src-1.3.6/src/effects/ladspa/LoadLadspa.cpp
--- audacity-src-1.3.6-orig/src/effects/ladspa/LoadLadspa.cpp	2008-10-24 08:56:32.000000000 +0200
+++ audacity-src-1.3.6/src/effects/ladspa/LoadLadspa.cpp	2008-10-24 13:01:10.000000000 +0200
@@ -279,7 +279,7 @@
 
    #ifdef __WXGTK__
    wxGetApp().AddUniquePathToPathList(wxT(INSTALL_PREFIX) wxT("/ladspa"), pathList);
-   wxGetApp().AddUniquePathToPathList(wxT("/usr/local/lib/ladspa"), pathList);
+   wxGetApp().AddUniquePathToPathList(wxT("/usr/local/__RPM_LIB__/ladspa"), pathList);
    wxGetApp().AddUniquePathToPathList(wxT(LIBDIR) wxT("/ladspa"), pathList);
    #endif
 

audacity-1.3.7-libmp3lame-default.patch:

--- NEW FILE audacity-1.3.7-libmp3lame-default.patch ---
diff -Nur audacity-src-1.3.7-orig/src/AudacityApp.cpp audacity-src-1.3.7/src/AudacityApp.cpp
--- audacity-src-1.3.7-orig/src/AudacityApp.cpp	2009-01-27 21:50:58.000000000 +0100
+++ audacity-src-1.3.7/src/AudacityApp.cpp	2009-02-02 19:02:32.000000000 +0100
@@ -766,6 +766,8 @@
       return false;
    }
 
+   gPrefs->Write(wxT("/MP3/MP3LibPath"),wxT("__RPM_LIBDIR__/libmp3lame.so.0"));
+
    // More initialization
    InitCleanSpeech();
 

audacity-1.3.7-portaudio-non-mmap-alsa.patch:

--- NEW FILE audacity-1.3.7-portaudio-non-mmap-alsa.patch ---
diff -Nur audacity-src-1.3.7-orig/lib-src/portaudio-v19/src/hostapi/alsa/pa_linux_alsa.c audacity-src-1.3.7/lib-src/portaudio-v19/src/hostapi/alsa/pa_linux_alsa.c
--- audacity-src-1.3.7-orig/lib-src/portaudio-v19/src/hostapi/alsa/pa_linux_alsa.c	2009-01-27 21:51:40.000000000 +0100
+++ audacity-src-1.3.7/lib-src/portaudio-v19/src/hostapi/alsa/pa_linux_alsa.c	2009-02-02 19:08:22.000000000 +0100
@@ -6,6 +6,7 @@
  *
  * Copyright (c) 2002 Joshua Haberman <joshua at haberman.com>
  * Copyright (c) 2005-2007 Arve Knudsen <aknuds-1 at broadpark.no>
+ * Copyright (c) 2008 Kevin Kofler <kevin.kofler at chello.at>
  *
  * Based on the Open Source API proposed by Ross Bencina
  * Copyright (c) 1999-2002 Ross Bencina, Phil Burk
@@ -118,6 +119,8 @@
     unsigned long framesPerBuffer;
     int numUserChannels, numHostChannels;
     int userInterleaved, hostInterleaved;
+    int canMmap;
+    void *nonMmapBuffer;
     PaDeviceIndex device;     /* Keep the device index */
 
     snd_pcm_t *pcm;
@@ -321,7 +324,7 @@
  * and a suitable result returned. The device is closed before returning.
  */
 static PaError GropeDevice( snd_pcm_t* pcm, int isPlug, StreamDirection mode, int openBlocking,
-        PaAlsaDeviceInfo* devInfo, int* canMmap )
+        PaAlsaDeviceInfo* devInfo )
 {
     PaError result = paNoError;
     snd_pcm_hw_params_t *hwParams;
@@ -354,9 +357,6 @@
     snd_pcm_hw_params_alloca( &hwParams );
     snd_pcm_hw_params_any( pcm, hwParams );
 
-    *canMmap = snd_pcm_hw_params_test_access( pcm, hwParams, SND_PCM_ACCESS_MMAP_INTERLEAVED ) >= 0 ||
-            snd_pcm_hw_params_test_access( pcm, hwParams, SND_PCM_ACCESS_MMAP_NONINTERLEAVED ) >= 0;
-
     if( defaultSr >= 0 )
     {
         /* Could be that the device opened in one mode supports samplerates that the other mode wont have,
@@ -566,7 +566,6 @@
     PaError result = 0;
     PaDeviceInfo *baseDeviceInfo = &devInfo->baseDeviceInfo;
     snd_pcm_t *pcm;
-    int canMmap = -1;
     PaUtilHostApiRepresentation *baseApi = &alsaApi->baseHostApiRep;
 
     /* Zero fields */
@@ -580,8 +579,7 @@
             OpenPcm( &pcm, deviceName->alsaName, SND_PCM_STREAM_CAPTURE, blocking, 0 )
             >= 0 )
     {
-        if( GropeDevice( pcm, deviceName->isPlug, StreamDirection_In, blocking, devInfo,
-                    &canMmap ) != paNoError )
+        if( GropeDevice( pcm, deviceName->isPlug, StreamDirection_In, blocking, devInfo ) != paNoError )
         {
             /* Error */
             PA_DEBUG(("%s: Failed groping %s for capture\n", __FUNCTION__, deviceName->alsaName));
@@ -594,8 +592,7 @@
             OpenPcm( &pcm, deviceName->alsaName, SND_PCM_STREAM_PLAYBACK, blocking, 0 )
             >= 0 )
     {
-        if( GropeDevice( pcm, deviceName->isPlug, StreamDirection_Out, blocking, devInfo,
-                    &canMmap ) != paNoError )
+        if( GropeDevice( pcm, deviceName->isPlug, StreamDirection_Out, blocking, devInfo ) != paNoError )
         {
             /* Error */
             PA_DEBUG(("%s: Failed groping %s for playback\n", __FUNCTION__, deviceName->alsaName));
@@ -603,12 +600,6 @@
         }
     }
 
-    if( 0 == canMmap )
-    {
-        PA_DEBUG(("%s: Device %s doesn't support mmap\n", __FUNCTION__, deviceName->alsaName));
-        goto end;
-    }
-
     baseDeviceInfo->structVersion = 2;
     baseDeviceInfo->hostApi = alsaApi->hostApiIndex;
     baseDeviceInfo->name = deviceName->name;
@@ -1197,6 +1188,8 @@
     self->hostInterleaved = self->userInterleaved = !(userSampleFormat & paNonInterleaved);
     self->numUserChannels = params->channelCount;
     self->streamDir = streamDir;
+    self->canMmap = 0;
+    self->nonMmapBuffer = NULL;
 
     if( !callbackMode && !self->userInterleaved )
     {
@@ -1239,6 +1232,7 @@
 
     PaError result = paNoError;
     snd_pcm_access_t accessMode, alternateAccessMode;
+    snd_pcm_access_t rwAccessMode, alternateRwAccessMode;
     int dir = 0;
     snd_pcm_t *pcm = self->pcm;
     double sr = *sampleRate;
@@ -1258,32 +1252,40 @@
     if( self->userInterleaved )
     {
         accessMode = SND_PCM_ACCESS_MMAP_INTERLEAVED;
+        rwAccessMode = SND_PCM_ACCESS_RW_INTERLEAVED;
         alternateAccessMode = SND_PCM_ACCESS_MMAP_NONINTERLEAVED;
+        alternateRwAccessMode = SND_PCM_ACCESS_RW_NONINTERLEAVED;
     }
     else
     {
         accessMode = SND_PCM_ACCESS_MMAP_NONINTERLEAVED;
+        rwAccessMode = SND_PCM_ACCESS_RW_NONINTERLEAVED;
         alternateAccessMode = SND_PCM_ACCESS_MMAP_INTERLEAVED;
+        alternateRwAccessMode = SND_PCM_ACCESS_RW_INTERLEAVED;
     }
     /* If requested access mode fails, try alternate mode */
+    self->canMmap = 1;
     if( snd_pcm_hw_params_set_access( pcm, hwParams, accessMode ) < 0 )
     {
-        int err = 0;
-        if( (err = snd_pcm_hw_params_set_access( pcm, hwParams, alternateAccessMode )) < 0)
+        if( snd_pcm_hw_params_set_access( pcm, hwParams, rwAccessMode ) >= 0 )
+            self->canMmap = 0;
+        else
         {
-            result = paUnanticipatedHostError;
-            if( -EINVAL == err )
+            if( snd_pcm_hw_params_set_access( pcm, hwParams, alternateAccessMode ) < 0 )
             {
-                PaUtil_SetLastHostErrorInfo( paALSA, err, "PA ALSA requires that a device supports mmap access" );
-            }
-            else
-            {
-                PaUtil_SetLastHostErrorInfo( paALSA, err, snd_strerror( err ) );
+                int err = 0;
+                if( (err = snd_pcm_hw_params_set_access( pcm, hwParams, alternateRwAccessMode )) >= 0)
+                    self->canMmap = 0;
+                else
+                {
+                    result = paUnanticipatedHostError;
+                    PaUtil_SetLastHostErrorInfo( paALSA, err, snd_strerror( err ) );
+                    goto error;
+                }
             }
-            goto error;
+            /* Flip mode */
+            self->hostInterleaved = !self->userInterleaved;
         }
-        /* Flip mode */
-        self->hostInterleaved = !self->userInterleaved;
     }
 
     ENSURE_( snd_pcm_hw_params_set_format( pcm, hwParams, self->nativeFormat ), paUnanticipatedHostError );
@@ -1361,7 +1363,7 @@
         
     ENSURE_( snd_pcm_sw_params_set_avail_min( self->pcm, swParams, self->framesPerBuffer ), paUnanticipatedHostError );
     ENSURE_( snd_pcm_sw_params_set_xfer_align( self->pcm, swParams, 1 ), paUnanticipatedHostError );
-    ENSURE_( snd_pcm_sw_params_set_tstamp_mode( self->pcm, swParams, SND_PCM_TSTAMP_MMAP ), paUnanticipatedHostError );
+    ENSURE_( snd_pcm_sw_params_set_tstamp_mode( self->pcm, swParams, SND_PCM_TSTAMP_ENABLE ), paUnanticipatedHostError );
 
     /* Set the parameters! */
     ENSURE_( snd_pcm_sw_params( self->pcm, swParams ), paUnanticipatedHostError );
@@ -1589,6 +1591,10 @@
         }
     }
 
+    /* non-mmap mode needs a reasonably-sized buffer or it'll stutter */
+    if( !self->canMmap && framesPerHostBuffer < 2048 )
+        framesPerHostBuffer = 2048;
+
     assert( framesPerHostBuffer > 0 );
     {
         snd_pcm_uframes_t min = 0, max = 0;
@@ -1831,12 +1837,13 @@
     PA_UNLESS( framesPerHostBuffer != 0, paInternalError );
     self->maxFramesPerHostBuffer = framesPerHostBuffer;
 
-    if( !accurate )
+    if( !self->playback.canMmap || !accurate )
     {
         /* Don't know the exact size per host buffer */
         *hostBufferSizeMode = paUtilBoundedHostBufferSize;
         /* Raise upper bound */
-        ++self->maxFramesPerHostBuffer;
+        if( !accurate )
+            ++self->maxFramesPerHostBuffer;
     }
 
 error:
@@ -2059,9 +2066,11 @@
             {
                 /* Buffer isn't primed, so prepare and silence */
                 ENSURE_( snd_pcm_prepare( stream->playback.pcm ), paUnanticipatedHostError );
-                SilenceBuffer( stream );
+                if( stream->playback.canMmap )
+                    SilenceBuffer( stream );
             }
-            ENSURE_( snd_pcm_start( stream->playback.pcm ), paUnanticipatedHostError );
+            if( stream->playback.canMmap )
+                ENSURE_( snd_pcm_start( stream->playback.pcm ), paUnanticipatedHostError );
         }
         else
             ENSURE_( snd_pcm_prepare( stream->playback.pcm ), paUnanticipatedHostError );
@@ -2390,6 +2399,7 @@
     snd_pcm_status_t *st;
     PaTime now = PaUtil_GetTime();
     snd_timestamp_t t;
+    int errplayback = 0, errcapture = 0;
 
     snd_pcm_status_alloca( &st );
 
@@ -2400,6 +2410,7 @@
         {
             snd_pcm_status_get_trigger_tstamp( st, &t );
             self->underrun = now * 1000 - ((PaTime) t.tv_sec * 1000 + (PaTime) t.tv_usec / 1000);
+            errplayback = snd_pcm_recover( self->playback.pcm, -EPIPE, 0 );
         }
     }
     if( self->capture.pcm )
@@ -2409,10 +2420,12 @@
         {
             snd_pcm_status_get_trigger_tstamp( st, &t );
             self->overrun = now * 1000 - ((PaTime) t.tv_sec * 1000 + (PaTime) t.tv_usec / 1000);
+            errcapture = snd_pcm_recover( self->capture.pcm, -EPIPE, 0 );
         }
     }
 
-    PA_ENSURE( AlsaRestart( self ) );
+    if( errplayback || errcapture )
+        PA_ENSURE( AlsaRestart( self ) );
 
 end:
     return result;
@@ -2563,7 +2576,7 @@
 static PaError PaAlsaStreamComponent_EndProcessing( PaAlsaStreamComponent *self, unsigned long numFrames, int *xrun )
 {
     PaError result = paNoError;
-    int res;
+    int res = 0;
 
     /* @concern FullDuplex It is possible that only one direction is marked ready after polling, and processed
      * afterwards
@@ -2571,7 +2584,34 @@
     if( !self->ready )
         goto end;
 
-    res = snd_pcm_mmap_commit( self->pcm, self->offset, numFrames );
+    if( !self->canMmap && StreamDirection_Out == self->streamDir )
+    {
+        /* Play sound */
+        if( self->hostInterleaved )
+            res = snd_pcm_writei( self->pcm, self->nonMmapBuffer, numFrames );
+        else
+        {
+            void *bufs[self->numHostChannels];
+            int bufsize = snd_pcm_format_size( self->nativeFormat, self->framesPerBuffer + 1 );
+            unsigned char *buffer = self->nonMmapBuffer;
+            int i;
+            for( i = 0; i < self->numHostChannels; ++i )
+            {
+                bufs[i] = buffer;
+                buffer += bufsize;
+            }
+            res = snd_pcm_writen( self->pcm, bufs, numFrames );
+        }
+    }
+
+    if( self->canMmap )
+        res = snd_pcm_mmap_commit( self->pcm, self->offset, numFrames );
+    else
+    {
+        free( self->nonMmapBuffer );
+        self->nonMmapBuffer = NULL;
+    }
+
     if( res == -EPIPE || res == -ESTRPIPE )
     {
         *xrun = 1;
@@ -2611,7 +2651,7 @@
     if( self->hostInterleaved )
     {
         int swidth = snd_pcm_format_size( self->nativeFormat, 1 );
-        unsigned char *buffer = ExtractAddress( self->channelAreas, self->offset );
+        unsigned char *buffer = self->canMmap ? ExtractAddress( self->channelAreas, self->offset ) : self->nonMmapBuffer;
 
         /* Start after the last user channel */
         p = buffer + self->numUserChannels * swidth;
@@ -2991,13 +3031,23 @@
         goto end;
     }
 
-    ENSURE_( snd_pcm_mmap_begin( self->pcm, &areas, &self->offset, numFrames ), paUnanticipatedHostError );
+    if( self->canMmap )
+    {
+        ENSURE_( snd_pcm_mmap_begin( self->pcm, &areas, &self->offset, numFrames ), paUnanticipatedHostError );
+        /* @concern ChannelAdaption Buffer address is recorded so we can do some channel adaption later */
+        self->channelAreas = (snd_pcm_channel_area_t *)areas;
+    }
+    else
+    {
+        free( self->nonMmapBuffer );
+        self->nonMmapBuffer = calloc( self->numHostChannels, snd_pcm_format_size( self->nativeFormat, self->framesPerBuffer + 1 ) );
+    }
 
     if( self->hostInterleaved )
     {
         int swidth = snd_pcm_format_size( self->nativeFormat, 1 );
 
-        p = buffer = ExtractAddress( areas, self->offset );
+        p = buffer = self->canMmap ? ExtractAddress( areas, self->offset ) : self->nonMmapBuffer;
         for( i = 0; i < self->numUserChannels; ++i )
         {
             /* We're setting the channels up to userChannels, but the stride will be hostChannels samples */
@@ -3007,16 +3057,52 @@
     }
     else
     {
-        for( i = 0; i < self->numUserChannels; ++i )
+        if( self->canMmap )
+            for( i = 0; i < self->numUserChannels; ++i )
+            {
+                area = areas + i;
+                buffer = ExtractAddress( area, self->offset );
+                setChannel( bp, i, buffer, 1 );
+            }
+        else
         {
-            area = areas + i;
-            buffer = ExtractAddress( area, self->offset );
-            setChannel( bp, i, buffer, 1 );
+            int bufsize = snd_pcm_format_size( self->nativeFormat, self->framesPerBuffer + 1 );
+            buffer = self->nonMmapBuffer;
+            for( i = 0; i < self->numUserChannels; ++i )
+            {
+                setChannel( bp, i, buffer, 1 );
+                buffer += bufsize;
+            }
         }
     }
 
-    /* @concern ChannelAdaption Buffer address is recorded so we can do some channel adaption later */
-    self->channelAreas = (snd_pcm_channel_area_t *)areas;
+    if( !self->canMmap && StreamDirection_In == self->streamDir )
+    {
+        /* Read sound */
+        int res;
+        if( self->hostInterleaved )
+            res = snd_pcm_readi( self->pcm, self->nonMmapBuffer, *numFrames );
+        else
+        {
+            void *bufs[self->numHostChannels];
+            int bufsize = snd_pcm_format_size( self->nativeFormat, self->framesPerBuffer + 1 );
+            unsigned char *buffer = self->nonMmapBuffer;
+            int i;
+            for( i = 0; i < self->numHostChannels; ++i )
+            {
+                bufs[i] = buffer;
+                buffer += bufsize;
+            }
+            res = snd_pcm_readn( self->pcm, bufs, *numFrames );
+        }
+        if( res == -EPIPE || res == -ESTRPIPE )
+        {
+            *xrun = 1;
+            *numFrames = 0;
+            free( self->nonMmapBuffer );
+            self->nonMmapBuffer = NULL;
+        }
+    }
 
 end:
 error:

audacity-1.3.7-repeat.patch:

--- NEW FILE audacity-1.3.7-repeat.patch ---
diff -Nur audacity-src-1.3.7-orig/src/effects/Repeat.cpp audacity-src-1.3.7/src/effects/Repeat.cpp
--- audacity-src-1.3.7-orig/src/effects/Repeat.cpp	2009-01-27 21:50:58.000000000 +0100
+++ audacity-src-1.3.7/src/effects/Repeat.cpp	2009-02-19 15:18:42.000000000 +0100
@@ -192,7 +192,7 @@
 void RepeatDialog::PopulateOrExchange(ShuttleGui & S)
 {
    wxTextValidator vld(wxFILTER_INCLUDE_CHAR_LIST);
-   vld.SetIncludes(wxArrayString(12, numbers));
+   vld.SetIncludes(wxArrayString(10, numbers));
 
    S.StartHorizontalLay(wxCENTER, false);
    {

audacity-1.3.7-vamp-1.3.patch:

--- NEW FILE audacity-1.3.7-vamp-1.3.patch ---
diff -Nur audacity-src-1.3.7-orig/configure audacity-src-1.3.7/configure
--- audacity-src-1.3.7-orig/configure	2009-01-27 21:50:59.000000000 +0100
+++ audacity-src-1.3.7/configure	2009-02-28 16:06:02.000000000 +0100
@@ -7774,12 +7774,12 @@
     pkg_cv_VAMP_CFLAGS="$VAMP_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"vamp-hostsdk >= 2.0\"") >&5
-  ($PKG_CONFIG --exists --print-errors "vamp-hostsdk >= 2.0") 2>&5
+    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"vamp-hostsdk >= 1.1.0\"") >&5
+  ($PKG_CONFIG --exists --print-errors "vamp-hostsdk >= 1.1.0") 2>&5
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; then
-  pkg_cv_VAMP_CFLAGS=`$PKG_CONFIG --cflags "vamp-hostsdk >= 2.0" 2>/dev/null`
+  pkg_cv_VAMP_CFLAGS=`$PKG_CONFIG --cflags "vamp-hostsdk >= 1.1.0" 2>/dev/null`
 else
   pkg_failed=yes
 fi
@@ -7790,12 +7790,12 @@
     pkg_cv_VAMP_LIBS="$VAMP_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"vamp-hostsdk >= 2.0\"") >&5
-  ($PKG_CONFIG --exists --print-errors "vamp-hostsdk >= 2.0") 2>&5
+    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"vamp-hostsdk >= 1.1.0\"") >&5
+  ($PKG_CONFIG --exists --print-errors "vamp-hostsdk >= 1.1.0") 2>&5
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; then
-  pkg_cv_VAMP_LIBS=`$PKG_CONFIG --libs "vamp-hostsdk >= 2.0" 2>/dev/null`
+  pkg_cv_VAMP_LIBS=`$PKG_CONFIG --libs "vamp-hostsdk >= 1.1.0" 2>/dev/null`
 else
   pkg_failed=yes
 fi
@@ -7813,9 +7813,9 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        VAMP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "vamp-hostsdk >= 2.0" 2>&1`
+	        VAMP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "vamp-hostsdk >= 1.1.0" 2>&1`
         else
-	        VAMP_PKG_ERRORS=`$PKG_CONFIG --print-errors "vamp-hostsdk >= 2.0" 2>&1`
+	        VAMP_PKG_ERRORS=`$PKG_CONFIG --print-errors "vamp-hostsdk >= 1.1.0" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$VAMP_PKG_ERRORS" >&5
diff -Nur audacity-src-1.3.7-orig/src/effects/vamp/VampEffect.cpp audacity-src-1.3.7/src/effects/vamp/VampEffect.cpp
--- audacity-src-1.3.7-orig/src/effects/vamp/VampEffect.cpp	2009-01-27 21:50:58.000000000 +0100
+++ audacity-src-1.3.7/src/effects/vamp/VampEffect.cpp	2009-02-28 15:45:52.000000000 +0100
@@ -13,9 +13,9 @@
 
 #include "VampEffect.h"
 
-#include <vamp-hostsdk/Plugin.h>
-#include <vamp-hostsdk/PluginChannelAdapter.h>
-#include <vamp-hostsdk/PluginInputDomainAdapter.h>
+#include <vamp-sdk/Plugin.h>
+#include <vamp-sdk/hostext/PluginChannelAdapter.h>
+#include <vamp-sdk/hostext/PluginInputDomainAdapter.h>
 
 #include <wx/wxprec.h>
 #include <wx/button.h>
@@ -311,20 +311,12 @@
       Vamp::RealTime ftime0 = fli->timestamp;
       double ltime0 = ftime0.sec + (double(ftime0.nsec) / 1000000000.0);
 
-      Vamp::RealTime ftime1 = ftime0;
-      if (fli->hasDuration) ftime1 = ftime0 + fli->duration;
-      double ltime1 = ftime1.sec + (double(ftime1.nsec) / 1000000000.0);
-
       wxString label = LAT1CTOWX(fli->label.c_str());
       if (label == wxString()) {
-         if (fli->values.empty()) {
             label = wxString::Format(LAT1CTOWX("%.3f"), ltime0);
-         } else {
-            label = wxString::Format(LAT1CTOWX("%.3f"), *fli->values.begin());
-         }
       }
       
-      ltrack->AddLabel(ltime0, ltime1, label);
+      ltrack->AddLabel(ltime0, ltime0, label);
    }
 }
 
diff -Nur audacity-src-1.3.7-orig/src/effects/vamp/VampEffect.h audacity-src-1.3.7/src/effects/vamp/VampEffect.h
--- audacity-src-1.3.7-orig/src/effects/vamp/VampEffect.h	2009-01-27 21:50:58.000000000 +0100
+++ audacity-src-1.3.7/src/effects/vamp/VampEffect.h	2009-02-28 15:45:52.000000000 +0100
@@ -22,7 +22,7 @@
 
 #include <wx/dialog.h>
 
-#include <vamp-hostsdk/PluginLoader.h>
+#include <vamp-sdk/hostext/PluginLoader.h>
 
 void LoadVampPlugins();
 


Index: .cvsignore
===================================================================
RCS file: /cvs/free/rpms/audacity-freeworld/devel/.cvsignore,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- .cvsignore	27 Nov 2008 02:33:43 -0000	1.4
+++ .cvsignore	26 May 2009 13:38:58 -0000	1.5
@@ -1,2 +1 @@
-audacity-src-1.3.6.tar.bz2
-audacity-src-1.3.2.tar.gz
+audacity-minsrc-1.3.7.tar.bz2


Index: audacity-freeworld.spec
===================================================================
RCS file: /cvs/free/rpms/audacity-freeworld/devel/audacity-freeworld.spec,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- audacity-freeworld.spec	29 Mar 2009 19:40:34 -0000	1.9
+++ audacity-freeworld.spec	26 May 2009 13:38:58 -0000	1.10
@@ -2,41 +2,30 @@
 Conflicts: %{realname}
 
 Name: audacity-freeworld
-Version: 1.3.6
-Release: 0.4.beta%{?dist}
+Version: 1.3.7
+Release: 0.6.1.beta%{?dist}
 Summary: Multitrack audio editor
 Group: Applications/Multimedia
 License: GPLv2
 URL: http://audacity.sourceforge.net
 
-Source0: http://downloads.sf.net/sourceforge/audacity/audacity-src-1.3.6.tar.bz2
+Source0: http://downloads.sf.net/sourceforge/audacity/audacity-minsrc-1.3.7.tar.bz2
 Source1: audacity.png
 Source2: audacity.desktop
 
+Patch1: audacity-1.3.7-libmp3lame-default.patch
+Patch2: audacity-1.3.7-libdir.patch
+Patch3: audacity-1.3.6-flac-import.patch
+Patch4: audacity-1.3.7-portaudio-non-mmap-alsa.patch
+Patch5: audacity-1.3.7-repeat.patch
+Patch6: audacity-1.3.7-vamp-1.3.patch
+Patch7: audacity-1.3.7-audiodevdefaults.patch
+
 #Patch1: audacity-1.3.4-libdir.patch
-Patch2: audacity-1.3.5-gcc43.patch
+#Patch2: audacity-1.3.5-gcc43.patch
 #Patch3: audacity-1.3.4-libmp3lame-default.patch
-Patch4: audacity-1.3.6-ffmpeg-lib-search-path.patch
-Patch5: audacity-1.3.6-portaudio-pulseaudio-rev4-pathfix.patch
-
-# for 1.3.2-beta
-Source100: http://downloads.sf.net/sourceforge/audacity/audacity-src-1.3.2.tar.gz
-Source101: audacity13.desktop
-
-# iconv on locale/fr.po (MAC to ISO Latin-1)
-Patch102: audacity-1.3.2-fr.patch
-Patch103: audacity-1.3.2-exportmp3.patch
-Patch104: audacity-1.3.2-destdir.patch
-Patch105: audacity-1.3.2-resample.patch
-Patch106: audacity-1.3.2-FLAC.patch
-Patch107: audacity-1.3.2-expat2.patch
-Patch108: audacity-1.3.2-gcc43.patch
-Patch109: audacity-1.3.2-libdir.patch
-Patch110: audacity-1.3.2-jack-api-109.patch
-Patch111: audacity-1.3.2-soundtouch-cxxflags.patch
-Patch112: audacity-1.3.2-allegro-cflags.patch
-Patch113: audacity-1.3.2-libmp3lame-default.patch
-Patch114: audacity-1.3.2-CVE-2007-6061.patch
+#Patch4: audacity-1.3.6-ffmpeg-lib-search-path.patch
+#Patch5: audacity-1.3.6-portaudio-pulseaudio-rev4-pathfix.patch
 
 Provides: audacity-nonfree = %{version}-%{release}
 Obsoletes: audacity-nonfree < %{version}-%{release}
@@ -50,132 +39,69 @@
 BuildRequires: gettext
 BuildRequires: jack-audio-connection-kit-devel
 BuildRequires: ladspa-devel
+BuildRequires: lame-devel
 BuildRequires: libid3tag-devel
+BuildRequires: libmad-devel
 BuildRequires: libogg-devel
 BuildRequires: libsamplerate-devel
 BuildRequires: libsndfile-devel
 BuildRequires: libvorbis-devel
 BuildRequires: soundtouch-devel
+%if 0%{?fedora} < 11
+BuildRequires: vamp-plugin-sdk-devel
+%else
+BuildRequires: vamp-plugin-sdk-devel >= 2.0
+%endif
 BuildRequires: zip
 BuildRequires: zlib-devel
-BuildRequires: libmad-devel
-BuildRequires: lame-devel
-
-# for 1.3.6-beta
 BuildRequires: wxGTK-devel
 
-# for 1.3.2-beta
-BuildRequires: compat-wxGTK26-devel
-
-##Requires: lame-libs
-
 
 %description
 Audacity is a cross-platform multitrack audio editor. It allows you to
-record sounds directly or to import Ogg, WAV, AIFF, AU, IRCAM, or MP3
-files. It features a few simple effects, all of the editing features
-you should need, and unlimited undo. The GUI was built with wxWindows
-and the audio I/O currently uses OSS under Linux. Audacity runs on
-Linux/*BSD, MacOS, and Windows.
-
-%prep
-%setup -q -a 100 -c
+record sounds directly or to import files in various formats. It features
+ a few simple effects, all of the editing features you should need, and
+unlimited undo. The GUI was built with wxWidgets and the audio I/O
+supports PulseAudio,  OSS and ALSA under Linux.
+This build has support for mp3 and ffmpeg import/export. 
 
-###
-### 1.3.6
-###
-
-cd audacity-src-1.3.6
-
-# Substitute hardcoded library paths.
-#%%patch1 -p1
-#%%patch3 -p1
-for i in src/effects/ladspa/LoadLadspa.cpp src/export/ExportMP3.cpp src/AudacityApp.cpp lib-src/libvamp/vamp-sdk/PluginHostAdapter.cpp
-do
-    sed -i -e 's!__RPM_LIBDIR__!%{_libdir}!g' $i
-    sed -i -e 's!__RPM_LIB__!%{_lib}!g' $i
-done
-grep -q -s __RPM_LIB * -R && exit 1
-
-%patch2 -p1 -b .gcc43
-#%%patch4 -p1 -b .fr
-%patch4 -p1 -b .ffmpeg-library-search-path
-
-# apply Kevin Kofler's portaudio-pulseaudio patch
-%patch5 -p1 -b .portaudio-pulseaudio-rev4-pathfix
-
-
-# Substitute occurences of "libmp3lame.so" with "libmp3lame.so.0".
-for i in locale/*.po src/export/ExportMP3.cpp
-do
-    sed -i -e 's!libmp3lame.so\([^.]\)!libmp3lame.so.0\1!g' $i
-done
 
-# clear executable permissions on src files that go to -debuginfo
-chmod a-x lib-src/FileDialog/FileDialog.*
-chmod a-x lib-src/FileDialog/gtk/FileDialogPrivate.*
-chmod a-x src/FileIO.* src/UploadDialog.*
-chmod a-x src/widgets/HtmlWindow.cpp src/widgets/ProgressDialog.*
-
-cd -
-
-
-###
-### 1.3.2-beta
-###
-
-cd audacity-src-1.3.2-beta
-%patch102 -p1 -b .fr
-%patch103 -p1 -b .exportmp3
-%patch104 -p1 -b .destdir
-%patch105 -p1 -b .resample
-%patch106 -p1 -b .FLAC
-%patch107 -p1 -b .expat2
-%patch108 -p1 -b .gcc43
+%prep
+%setup -q -n audacity-src-%{version}
 
 # Substitute hardcoded library paths.
-%patch109 -p1
-%patch113 -p1
-for i in src/effects/ladspa/LoadLadspa.cpp src/export/ExportMP3.cpp src/AudacityApp.cpp
+%patch1 -p1
+%patch2 -p1
+for i in src/effects/ladspa/LoadLadspa.cpp src/AudacityApp.cpp src/export/ExportMP3.cpp
+#lib-src/libvamp/vamp-hostsdk/PluginHostAdapter.cpp
 do
     sed -i -e 's!__RPM_LIBDIR__!%{_libdir}!g' $i
     sed -i -e 's!__RPM_LIB__!%{_lib}!g' $i
 done
 grep -q -s __RPM_LIB * -R && exit 1
 
-# F9 devel only
-%if 0%{?fedora} > 8
-%patch110 -p1 -b .jack-api
+%patch3 -p1 -b .dumb-flac-import
+%patch4 -p1 -b .pa-non-mmap-alsa
+%patch5 -p1 -b .repeat
+%if 0%{?fedora} < 11
+%patch6 -p1 -b .vamp-1.3
 %endif
-
-%patch111 -p1 -b .soundtouch-cxxflags
-%patch112 -p1 -b .allegro-cflags
-%patch114 -p1 -b .CVE-2007-6061
+%patch7 -p1 -b .audiodevdefaults
 
 # Substitute occurences of "libmp3lame.so" with "libmp3lame.so.0".
-for i in help/wxhelp/audacity.hhk help/wxhelp/exportmp3.htm locale/*.po src/export/ExportMP3.cpp
+for i in locale/*.po src/export/ExportMP3.cpp
 do
     sed -i -e 's!libmp3lame.so\([^.]\)!libmp3lame.so.0\1!g' $i
 done
 
-%ifnarch %{ix86} x86_64
-sed -i -e 's!-msse!!' lib-src/soundtouch/source/SoundTouch/Makefile.*
-%endif
-
-# for wxGTK26-compat
-sed -i -e 's!wx-config!wx-2.6-config!g' configure
-
 # clear executable permissions on src files that go to -debuginfo
-chmod a-x lib-src/allegro/allegro.* 
-chmod a-x lib-src/allegro/mfallegro.*
-chmod a-x lib-src/allegro/mfmidi.*
-chmod a-x src/UploadDialog.*
-
-cd -
+#chmod a-x lib-src/FileDialog/FileDialog.*
+#chmod a-x lib-src/FileDialog/gtk/FileDialogPrivate.*
+#chmod a-x src/FileIO.* src/UploadDialog.*
+#chmod a-x src/widgets/HtmlWindow.cpp src/widgets/ProgressDialog.*
 
 
 %build
-cd audacity-src-1.3.6
 %configure \
     --with-help \
     --with-libsndfile=system \
@@ -187,28 +113,10 @@
     --with-id3tag=system \
     --with-expat=system \
     --with-soundtouch=system \
+    --with-ffmpeg=system \
     --with-libmad=system \
-    --with-ffmpeg=system
-# _smp_mflags cause problems
-make
-cd -
-
-cd audacity-src-1.3.2-beta
-%configure \
-    --with-help \
-    --with-libsndfile=system \
-    --without-libresample \
-    --with-libsamplerate=system \
-    --with-libflac=system \
-    --with-ladspa \
-    --with-vorbis=system \
-    --with-id3tag=system \
-    --with-expat=system \
-    --program-suffix=13 \
-    --with-libmad=system
 # _smp_mflags cause problems
 make
-cd -
 
 
 %install
@@ -217,22 +125,15 @@
 mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps
 cp %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/pixmaps
 
-cd audacity-src-1.3.6
 make DESTDIR=${RPM_BUILD_ROOT} install
-cd -
-%{find_lang} %{realname}
 
-cd audacity-src-1.3.2-beta
-make DESTDIR=${RPM_BUILD_ROOT} install
-cd -
-%{find_lang} %{realname}13
-cat %{realname}13.lang >> %{realname}.lang
+%{find_lang} %{realname}
 
 rm -f $RPM_BUILD_ROOT%{_datadir}/applications/*.desktop
 desktop-file-install \
     --vendor fedora \
     --dir $RPM_BUILD_ROOT%{_datadir}/applications \
-    %{SOURCE2} %{SOURCE101}
+    %{SOURCE2}
 
 
 %clean
@@ -254,9 +155,7 @@
 %files -f %{realname}.lang
 %defattr(-,root,root,-)
 %{_bindir}/%{realname}
-%{_bindir}/%{realname}13
 %{_datadir}/%{realname}/
-%{_datadir}/%{realname}13/
 %{_mandir}/man*/*
 %{_datadir}/applications/*
 %{_datadir}/pixmaps/*
@@ -265,11 +164,21 @@
 
 
 %changelog
+* Tue May 26 2009 David Timms <iinet.net.au at dtimms> - 1.3.7-0.6.1.beta
+- match the 1.3.7.beta version in fedora proper
+- include new and updated patches from mschwendt
+- del no longer required patches
+
 * Sun Mar 29 2009 Julian Sikorski <belegdol at fedoraproject.org> - 1.3.6-0.4.beta
 - wxGTK no longer provides wxGTK2 in Fedora 11
 
 * Sun Mar 29 2009 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 1.3.6-0.3.beta
 - rebuild for new F11 features
+- revert to 1.3.6.beta for now
+
+* Sat Feb  7 2009 David Timms <iinet.net.au at dtimms> - 1.3.7-0.1.beta
+- update to new upstream beta release
+- drop beta release 1.3.2 from package
 
 * Sun Dec 14 2008 David Timms <iinet.net.au at dtimms> - 1.3.6-0.2.beta
 - add Kevin Koflers portaudio patch to allow output via pulseaudio
@@ -429,4 +338,3 @@
 
 * Sat Oct 25 2003 Gerard Milmeister <gemi at bluewin.ch> - 0:1.2.0-pre2.fdr.1
 - First Fedora release
-


Index: sources
===================================================================
RCS file: /cvs/free/rpms/audacity-freeworld/devel/sources,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- sources	27 Nov 2008 02:33:43 -0000	1.4
+++ sources	26 May 2009 13:38:58 -0000	1.5
@@ -1,2 +1 @@
-a59d30bcedd017c5b3ac7bcecf7a1628  audacity-src-1.3.6.tar.bz2
-bf63673140254f1283dfd55b61ff2422  audacity-src-1.3.2.tar.gz
+7dcbcd8ed417413fd824d446001058d9  audacity-minsrc-1.3.7.tar.bz2


--- audacity-1.3.2-allegro-cflags.patch DELETED ---


--- audacity-1.3.4-gcc43.patch DELETED ---


--- audacity-1.3.4-libdir.patch DELETED ---


--- audacity-1.3.4-libmp3lame-default.patch DELETED ---


--- audacity-1.3.5-fr.patch DELETED ---


--- audacity-1.3.5-gcc43.patch DELETED ---


--- audacity-1.3.6-ffmpeg-lib-search-path.patch DELETED ---


--- audacity-1.3.6-portaudio-pulseaudio-rev4-pathfix.patch DELETED ---



More information about the rpmfusion-commits mailing list