From 6ee1b8ca52e10b72856b01304a351d72c7f6e5a1 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Thu, 24 Apr 2014 19:08:05 -0700 Subject: [PATCH] Update the start sample between blocks in the ram audio provider correctly --- src/audio_provider_ram.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/audio_provider_ram.cpp b/src/audio_provider_ram.cpp index edddf2173..2f0aa5d1c 100644 --- a/src/audio_provider_ram.cpp +++ b/src/audio_provider_ram.cpp @@ -104,9 +104,8 @@ void RAMAudioProvider::FillBuffer(void *buf, int64_t start, int64_t count) const memcpy(charbuf, &blockcache[i][start_offset], read_size); charbuf += read_size; - bytes_remaining -= read_size; - start += CacheBlockSize / bytes_per_sample; + start += read_size / bytes_per_sample; } } }