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:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user