diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-10-22 13:40:55 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-10-22 13:40:55 +0100 |
| commit | 6bec4750da08011e944ab53bda1ff9a51065c795 (patch) | |
| tree | 38b32086c462584b601bdf9b5dfcdb15a0172676 /src/lib/decoder.cc | |
| parent | c0e04acd1e9875fa67800a7861bd8a370157b49f (diff) | |
Try to make audio discard work properly.
Diffstat (limited to 'src/lib/decoder.cc')
| -rw-r--r-- | src/lib/decoder.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/decoder.cc b/src/lib/decoder.cc index a90c14b2b..c9235f8e1 100644 --- a/src/lib/decoder.cc +++ b/src/lib/decoder.cc @@ -90,10 +90,12 @@ Decoder::~Decoder () void Decoder::process_begin () { - _delay_in_bytes = _fs->audio_delay() * _fs->audio_sample_rate() * _fs->audio_channels() * bytes_per_audio_sample() / 1000; + _delay_in_bytes = _fs->total_audio_delay() * _fs->audio_sample_rate() * _fs->audio_channels() * bytes_per_audio_sample() / 1000; delete _delay_line; _delay_line = new DelayLine (_delay_in_bytes); + _log->log (String::compose ("Decoding audio with total delay of %1", _fs->total_audio_delay())); + _audio_frames_processed = 0; } |
