| 443 | } |
| 444 | |
| 445 | bool MeterToolBar::Expose( bool show ) |
| 446 | { |
| 447 | auto &projectAudioIO = ProjectAudioIO::Get( mProject ); |
| 448 | if( show ) { |
| 449 | if( mPlayMeter ) { |
| 450 | projectAudioIO.SetPlaybackMeter( mPlayMeter->GetMeter() ); |
| 451 | } |
| 452 | |
| 453 | if( mRecordMeter ) { |
| 454 | projectAudioIO.SetCaptureMeter( mRecordMeter->GetMeter() ); |
| 455 | } |
| 456 | } else { |
| 457 | if( mPlayMeter && |
| 458 | projectAudioIO.GetPlaybackMeter() == mPlayMeter->GetMeter() ) { |
| 459 | projectAudioIO.SetPlaybackMeter( nullptr ); |
| 460 | } |
| 461 | |
| 462 | if( mRecordMeter && |
| 463 | projectAudioIO.GetCaptureMeter() == mRecordMeter->GetMeter() ) { |
| 464 | projectAudioIO.SetCaptureMeter( nullptr ); |
| 465 | } |
| 466 | } |
| 467 | |
| 468 | return ToolBar::Expose( show ); |
| 469 | } |
| 470 | |
| 471 | int MeterToolBar::GetInitialWidth() |
| 472 | { |
nothing calls this directly
no test coverage detected