mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-25 07:43:54 +02:00
Prepare to split AudioIOBase from AudioIO...
... New files, but (almost) empty; don't use the global variable gAudioIO, but use one of two accessor function names (which are the same function for now). AudioIOBase will have fewer dependencies than AudioIO -- in particular, no dependency on tracks. It won't include StartStream. It will contain functions to query the present state of streams, and device capabilities.
This commit is contained in:
@@ -814,6 +814,7 @@ void PrefsDialog::OnOK(wxCommandEvent & WXUNUSED(event))
|
||||
SavePreferredPage();
|
||||
|
||||
#if USE_PORTMIXER
|
||||
auto gAudioIO = AudioIO::Get();
|
||||
if (gAudioIO) {
|
||||
// We cannot have opened this dialog if gAudioIO->IsAudioTokenActive(),
|
||||
// per the setting of AudioIONotBusyFlag and AudioIOBusyFlag in
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include <wx/defs.h>
|
||||
#include <wx/textctrl.h>
|
||||
|
||||
#include "../AudioIO.h"
|
||||
#include "../AudioIOBase.h"
|
||||
#include "../Dither.h"
|
||||
#include "../Prefs.h"
|
||||
#include "../Resample.h"
|
||||
@@ -92,7 +92,7 @@ void QualityPrefs::Populate()
|
||||
GetNamesAndLabels();
|
||||
gPrefs->Read(wxT("/SamplingRate/DefaultProjectSampleRate"),
|
||||
&mOtherSampleRateValue,
|
||||
AudioIO::GetOptimalSupportedSampleRate());
|
||||
AudioIOBase::GetOptimalSupportedSampleRate());
|
||||
|
||||
//------------------------- Main section --------------------
|
||||
// Now construct the GUI itself.
|
||||
@@ -126,8 +126,8 @@ void QualityPrefs::GetNamesAndLabels()
|
||||
//
|
||||
// GetSupportedSampleRates() allows passing in device names, but
|
||||
// how do you get at them as they are on the Audio I/O page????
|
||||
for (int i = 0; i < AudioIO::NumStandardRates; i++) {
|
||||
int iRate = AudioIO::StandardRates[i];
|
||||
for (int i = 0; i < AudioIOBase::NumStandardRates; i++) {
|
||||
int iRate = AudioIOBase::StandardRates[i];
|
||||
mSampleRateLabels.push_back(iRate);
|
||||
mSampleRateNames.push_back(wxString::Format(wxT("%i Hz"), iRate));
|
||||
}
|
||||
@@ -160,7 +160,7 @@ void QualityPrefs::PopulateOrExchange(ShuttleGui & S)
|
||||
// We make sure we have a pointer to it, so that we can drive it.
|
||||
mSampleRates = S.TieNumberAsChoice( {},
|
||||
wxT("/SamplingRate/DefaultProjectSampleRate"),
|
||||
AudioIO::GetOptimalSupportedSampleRate(),
|
||||
AudioIOBase::GetOptimalSupportedSampleRate(),
|
||||
mSampleRateNames,
|
||||
mSampleRateLabels);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user