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(); project->GetMeterToolBar()->Clear(); } }
void Meter::StartMonitoring() { if (gAudioIO->IsMonitoring()) gAudioIO->StopStream(); else { #if WANT_METER_MENU if (mMeterDisabled){ wxCommandEvent dummy; OnDisableMeter(dummy); } #endif AudacityProject *p = GetActiveProject(); if (p) { gAudioIO->StartMonitoring(p->GetRate()); MeterToolBar *bar = p->GetMeterToolBar(); if (bar) { Meter *play, *record; bar->GetMeters(&play, &record); gAudioIO->SetMeters(record, play); } } } }