1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-21 06:01:13 +02:00

Another case where extra deinterleaving isn't necessary. CopySamples() can do

the job quite nicely...well, given the "stride" information he needs.  And in
some cases, it will just use memcpy() so it may improve capture performance a
bit more.
This commit is contained in:
lllucius
2013-09-23 20:36:39 +00:00
parent 6a7da21dec
commit f7aca4b474
3 changed files with 6 additions and 40 deletions

View File

@@ -53,7 +53,7 @@ int RingBuffer::AvailForPut()
}
int RingBuffer::Put(samplePtr buffer, sampleFormat format,
int samplesToCopy)
int samplesToCopy, int stride /* = 1 */)
{
samplePtr src;
int block;
@@ -75,7 +75,7 @@ int RingBuffer::Put(samplePtr buffer, sampleFormat format,
CopySamples(src, format,
mBuffer + pos * SAMPLE_SIZE(mFormat), mFormat,
block);
block, true, stride);
src += block * SAMPLE_SIZE(format);
pos = (pos + block) % mBufferSize;