On Mon, 02 Mar 2009 12:26:53 +0100, Markus wrote:
> I would have expected the problem appears on all platforms but there
> must be something different going on on Linux regarding the device
> detection.
Maybe. If the default I/O device index on Windows is 0, the problem
won't be visible. Only if the default device index is non-zero, you
should be able to reproduce it.
Audacity >= 1.3.7-beta doesn't save the default preferences. However, the
GUI implementation retrieves configuration values from the preferences
backend (gPrefs). This creates a conflict between actual defaults and what
the GUI displays as defaults in case of missing/unset preferences.
E.g. the Audio I/O dialog (prefs/AudioIOPrefs.cpp -> ShuttleGUI.cpp)
relies on /AudioIO/PlaybackDevice and /AudioIO/RecordingDevice being set,
or else it falls back to its own default value (zero or empty string) that
differs from the defaults in the Audio I/O frontend code (AudioIO.cpp).
> > The real fix would make the Audio I/O Prefs retrieve the device name
> > for the default device numbers instead of saving the defaults.
>
> Thanks for the step-by-step directions to reproduce. I'm afraid I
> currently cannot reproduce the problem because I do not have a working
> Linux install right now. Anyone else?
>
> As you say you have an idea how a "real fix" would look like, do you
> think you can make up a patch for that? That would be great!
I've attached a different patch, which doesn't write/save the defaults.
Instead, it follows the footsteps of the current AudioIOPrefs.cpp code,
which queries PortAudio to learn about devices.
It's a question of design. Could still be improved by moving much more
into the AudioIO.cpp wrapper instead of querying PortAudio directly.
1) It's good that defaults are _not_ saved to the cfg file. Fully agreed
here. That way defaults can continue to change automatically at run-time
(depending on hardware changes and/or software updates) till the user
enters the Preferences dialogue and confirms/saves the settings explicitly
in order to override defaults.
2) It's not good that the GUI relies on preferences being set, and if not
being set, it falls back to its own defaults. As in the case of
AudioIOPrefs.cpp where this fails.
ShuttleGUI.cpp does not care about the actual default audio I/O device
numbers as determined in AudioIO.cpp. As outlined above, it retrieves the
device names from the Preferences (gPrefs). If the Preferences don't set
the rec/play device, either ShuttleGUI or the AudioIOPrefs code must learn
about the actual defaults as determined by AudioIO.cpp. That's what the
new patch implements, except that it AudioIOPrefs queries PortAudio
instead of AudioIO (which is private for most of its useful methods).
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H_______________________________________________
audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel