void ControlToolBar::StopPlaying(bool stopStream /* = true*/) { StopScrolling(); AudacityProject *project = GetActiveProject(); if(project) { // Let scrubbing code do some appearance change project->GetScrubber().StopScrubbing(); } if (!CanStopAudioStream()) return; mStop->PushDown(); SetStop(false); if(stopStream) gAudioIO->StopStream(); SetPlay(false); SetRecord(false); #ifdef EXPERIMENTAL_AUTOMATED_INPUT_LEVEL_ADJUSTMENT gAudioIO->AILADisable(); #endif mPause->PopUp(); mPaused=false; //Make sure you tell gAudioIO to unpause gAudioIO->SetPaused(mPaused); ClearCutPreviewTracks(); mBusyProject = NULL; // So that we continue monitoring after playing or recording. // also clean the MeterQueues if( project ) { project->MayStartMonitoring(); Meter *meter = project->GetPlaybackMeter(); if( meter ) { meter->Clear(); } meter = project->GetCaptureMeter(); if( meter ) { meter->Clear(); } } const auto toolbar = project->GetToolManager()->GetToolBar(ScrubbingBarID); toolbar->EnableDisableButtons(); }
void ControlToolBar::StopPlaying(bool stopStream /* = true*/) { mStop->PushDown(); SetStop(false); if(stopStream) gAudioIO->StopStream(); SetPlay(false); SetRecord(false); #ifdef AUTOMATED_INPUT_LEVEL_ADJUSTMENT gAudioIO->AILADisable(); #endif mPause->PopUp(); mPaused=false; //Make sure you tell gAudioIO to unpause gAudioIO->SetPaused(mPaused); ClearCutPreviewTracks(); mBusyProject = NULL; // So that we continue monitoring after playing or recording. // also clean the MeterQueues AudacityProject *project = GetActiveProject(); if( project ) { project->MayStartMonitoring(); Meter *meter = project->GetPlaybackMeter(); if( meter ) { meter->Clear(); } meter = project->GetCaptureMeter(); if( meter ) { meter->Clear(); } } }