diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-04-15 16:24:03 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-04-15 16:24:03 +0100 |
| commit | 3f2365fcf3a1ffc50901eb2e4af246aa4c83e272 (patch) | |
| tree | 289a2fdbea44d1f5d8326601972e259e65aa0d80 /src/lib/sndfile_decoder.cc | |
| parent | a00ebbc68438e84076c65e99d0e70403afb4407d (diff) | |
Repair very bad merge. Mysterious.
Diffstat (limited to 'src/lib/sndfile_decoder.cc')
| -rw-r--r-- | src/lib/sndfile_decoder.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/sndfile_decoder.cc b/src/lib/sndfile_decoder.cc index 0e3e5e234..af59c049c 100644 --- a/src/lib/sndfile_decoder.cc +++ b/src/lib/sndfile_decoder.cc @@ -113,8 +113,8 @@ SndfileDecoder::pass () to what FFmpeg (and in particular the resampler) can cope with. */ sf_count_t const block = _audio_stream->sample_rate() / 2; - shared_ptr<AudioBuffers> audio (new AudioBuffers (_audio_stream->channels(), block)); + sf_count_t done = 0; while (frames > 0) { sf_count_t const this_time = min (block, frames); for (size_t i = 0; i < sndfiles.size(); ++i) { @@ -126,7 +126,8 @@ SndfileDecoder::pass () } audio->set_frames (this_time); - Audio (audio); + Audio (audio, double(done) / _audio_stream->sample_rate()); + done += this_time; frames -= this_time; } |
