diff --git a/audacity-1.3.7-audiodevdefaults.patch b/audacity-1.3.7-audiodevdefaults.patch new file mode 100644 index 0000000..a4fe1fb --- /dev/null +++ b/audacity-1.3.7-audiodevdefaults.patch @@ -0,0 +1,77 @@ +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 diff --git a/audacity.spec b/audacity.spec index f6a5617..735df9b 100644 --- a/audacity.spec +++ b/audacity.spec @@ -5,7 +5,7 @@ Name: audacity Version: 1.3.7 -Release: 0.4.beta%{?dist} +Release: 0.4.beta%{?dist}.2 Summary: Multitrack audio editor Group: Applications/Multimedia License: GPLv2 @@ -21,6 +21,7 @@ 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 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: alsa-lib-devel @@ -36,7 +37,11 @@ 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: wxGTK-devel @@ -67,7 +72,10 @@ grep -q -s __RPM_LIB * -R && exit 1 %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 +%patch7 -p1 -b .audiodevdefaults # Substitute occurences of "libmp3lame.so" with "libmp3lame.so.0". for i in locale/*.po src/export/ExportMP3.cpp @@ -139,6 +147,9 @@ update-desktop-database &> /dev/null || : %changelog +* Tue Mar 17 2009 Michael Schwendt - 1.3.7-0.4.beta.2 +- sync with Rawhide (1.3.7-0.6.beta) for updates-testing + * Sat Feb 28 2009 Kevin Kofler - 1.3.7-0.4.beta - remove no longer needed default hostapi hunk of the non-mmap-alsa patch