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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user