Performance improvement on loading OGG samples to memory
This commit is contained in:
@@ -220,8 +220,10 @@ namespace lime
|
|||||||
{
|
{
|
||||||
// Read up to a buffer's worth of decoded sound data
|
// Read up to a buffer's worth of decoded sound data
|
||||||
bytes = ov_read(&oggFile, array, BUFFER_SIZE, endian, 2, 1, &bitStream);
|
bytes = ov_read(&oggFile, array, BUFFER_SIZE, endian, 2, 1, &bitStream);
|
||||||
// Append to end of buffer
|
if (bytes)
|
||||||
outBuffer.InsertAt(outBuffer.size(), (unsigned char*)array, bytes);
|
{
|
||||||
|
outBuffer.Set((unsigned char*)array, bytes);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ov_clear(&oggFile);
|
ov_clear(&oggFile);
|
||||||
|
|||||||
Reference in New Issue
Block a user