1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-04-02 20:37:38 +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:
Paul Licameli
2019-06-10 14:25:50 -04:00
parent 46bf5a82fc
commit 42a4f55ffe
44 changed files with 180 additions and 29 deletions

View File

@@ -12,7 +12,7 @@ Paul Licameli split from AudacityProject.cpp
#include "Experimental.h"
#include "AudioIO.h"
#include "AudioIOBase.h"
#include "Project.h"
#include "Snap.h"
#include "prefs/QualityPrefs.h"
@@ -65,7 +65,7 @@ ProjectSettings::ProjectSettings( AudacityProject &project )
, mSnapTo( gPrefs->Read(wxT("/SnapTo"), SNAP_OFF) )
{
if (!gPrefs->Read(wxT("/SamplingRate/DefaultProjectSampleRate"), &mRate,
AudioIO::GetOptimalSupportedSampleRate())) {
AudioIOBase::GetOptimalSupportedSampleRate())) {
// The default given above can vary with host/devices. So unless there is
// an entry for the default sample rate in audacity.cfg, Audacity can open
// with a rate which is different from the rate with which it closed.
@@ -101,7 +101,7 @@ void ProjectSettings::UpdatePrefs()
// Do not change this project's rate, unless there are no tracks.
if( TrackList::Get( *this ).size() == 0){
gPrefs->Read(wxT("/SamplingRate/DefaultProjectSampleRate"), &mRate,
AudioIO::GetOptimalSupportedSampleRate());
AudioIOBase::GetOptimalSupportedSampleRate());
// If necessary, we change this rate in the selection toolbar too.
auto bar = SelectionBar::Get( *this );
bar.SetRate( mRate );