mirror of
https://github.com/cookiengineer/audacity
synced 2026-03-31 19:44: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:
@@ -14,7 +14,7 @@ Paul Licameli split from AudacityProject.cpp
|
||||
|
||||
#include "AdornedRulerPanel.h"
|
||||
#include "AllThemeResources.h"
|
||||
#include "AudioIO.h"
|
||||
#include "AudioIOBase.h"
|
||||
#include "Menus.h"
|
||||
#include "Project.h"
|
||||
#include "ProjectAudioIO.h"
|
||||
@@ -1555,6 +1555,7 @@ void ProjectWindow::TP_DisplaySelection()
|
||||
double audioTime;
|
||||
auto &playRegion = ViewInfo::Get( project ).playRegion;
|
||||
|
||||
auto gAudioIO = AudioIOBase::Get();
|
||||
if (!gAudioIO->IsBusy() && !playRegion.Locked())
|
||||
ruler.SetPlayRegion( selectedRegion.t0(), selectedRegion.t1() );
|
||||
else
|
||||
@@ -1664,6 +1665,7 @@ void ProjectWindow::ZoomInByFactor( double ZoomFactor )
|
||||
auto &trackPanel = TrackPanel::Get( project );
|
||||
auto &viewInfo = ViewInfo::Get( project );
|
||||
|
||||
auto gAudioIO = AudioIOBase::Get();
|
||||
// LLL: Handling positioning differently when audio is
|
||||
// actively playing. Don't do this if paused.
|
||||
if (gAudioIO->IsStreamActive(
|
||||
|
||||
Reference in New Issue
Block a user