diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-12-29 22:36:01 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-12-29 22:36:01 +0100 |
| commit | 93d1892fe1a884b1ad8003498aabb183406edcd8 (patch) | |
| tree | e9270163f29cfca4a1393e52080b17b0397a708a /src | |
| parent | 1cdb9b09e634ddb9a79ef04966fb4e49912fd9b2 (diff) | |
Compress an if.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/player.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc index 2cec90d93..f91c80f72 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -1502,8 +1502,7 @@ Player::fill_audio(DCPTimePeriod period) DCPTime t = period.from; while (t < period.to) { DCPTime block = min(DCPTime::from_seconds(0.5), period.to - t); - Frame const samples = block.frames_round(film->audio_frame_rate()); - if (samples) { + if (auto const samples = block.frames_round(film->audio_frame_rate())) { auto silence = make_shared<AudioBuffers>(film->audio_channels(), samples); silence->make_silent(); emit_audio(silence, t); |
