rpms/audacity/devel audacity-1.3.7-audiodevdefaults.patch, 1.1, 1.2 audacity.spec, 1.73, 1.74
Michael Schwendt
mschwendt at fedoraproject.org
Mon Mar 2 16:28:38 UTC 2009
Author: mschwendt
Update of /cvs/pkgs/rpms/audacity/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv18898
Modified Files:
audacity-1.3.7-audiodevdefaults.patch audacity.spec
Log Message:
* Mon Mar 2 2009 Michael Schwendt <mschwendt at fedoraproject.org> - 1.3.7-0.6.beta
- revise default device names patch, so it doesn't save the defaults
audacity-1.3.7-audiodevdefaults.patch:
Index: audacity-1.3.7-audiodevdefaults.patch
===================================================================
RCS file: /cvs/pkgs/rpms/audacity/devel/audacity-1.3.7-audiodevdefaults.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- audacity-1.3.7-audiodevdefaults.patch 1 Mar 2009 08:03:00 -0000 1.1
+++ audacity-1.3.7-audiodevdefaults.patch 2 Mar 2009 16:28:38 -0000 1.2
@@ -1,27 +1,77 @@
-diff -Nur audacity-src-1.3.7-orig/src/AudioIO.cpp audacity-src-1.3.7/src/AudioIO.cpp
---- audacity-src-1.3.7-orig/src/AudioIO.cpp 2009-01-27 21:50:59.000000000 +0100
-+++ audacity-src-1.3.7/src/AudioIO.cpp 2009-03-01 08:48:20.000000000 +0100
-@@ -1898,6 +1898,11 @@
- // device, so we just use the first one available
- if (recDeviceNum < 0)
- recDeviceNum = 0;
-+ const PaDeviceInfo* info = Pa_GetDeviceInfo(recDeviceNum);
-+ if (info && (info->maxInputChannels > 0))
-+ {
-+ gPrefs->Write(wxT("/AudioIO/RecordingDevice"), DeviceName(info));
-+ }
- return recDeviceNum;
- }
+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;
-@@ -1937,6 +1942,11 @@
- // device, so we just use the first one available
- if (DeviceNum < 0)
- DeviceNum = 0;
-+ const PaDeviceInfo* info = Pa_GetDeviceInfo(DeviceNum);
-+ if (info && (info->maxInputChannels > 0))
-+ {
-+ gPrefs->Write(wxT("/AudioIO/PlaybackDevice"), DeviceName(info));
++ 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
+ }
- return DeviceNum;
- }
++
+ #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
Index: audacity.spec
===================================================================
RCS file: /cvs/pkgs/rpms/audacity/devel/audacity.spec,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -r1.73 -r1.74
--- audacity.spec 1 Mar 2009 08:03:00 -0000 1.73
+++ audacity.spec 2 Mar 2009 16:28:38 -0000 1.74
@@ -5,7 +5,7 @@
Name: audacity
Version: 1.3.7
-Release: 0.5.beta%{?dist}
+Release: 0.6.beta%{?dist}
Summary: Multitrack audio editor
Group: Applications/Multimedia
License: GPLv2
@@ -143,6 +143,9 @@
%changelog
+* Mon Mar 2 2009 Michael Schwendt <mschwendt at fedoraproject.org> - 1.3.7-0.6.beta
+- revise default device names patch, so it doesn't save the defaults
+
* Sun Mar 1 2009 Michael Schwendt <mschwendt at fedoraproject.org> - 1.3.7-0.5.beta
- show default device names in Audio I/O preferences
More information about the scm-commits
mailing list