Opus is decoding so quickly (20ms frames) that hundreds of AudioBuffer objects are being created. This causes performance issues for larger files and would generate up to 20,000 objects created for 5 minute files.
After the first frames are decoded and scheduled to be played, the remaining decoded frames do not need to be scheduled so quickly. Ideally, decoded audio would only be scheduled when needed (during seeking or a few seconds before it is to be played). Because this is a developer demo, a fast path of making AudioBuffers larger and fewer will be taken.
Opus is decoding so quickly (20ms frames) that hundreds of
AudioBuffer
objects are being created. This causes performance issues for larger files and would generate up to 20,000 objects created for 5 minute files.After the first frames are decoded and scheduled to be played, the remaining decoded frames do not need to be scheduled so quickly. Ideally, decoded audio would only be scheduled when needed (during seeking or a few seconds before it is to be played). Because this is a developer demo, a fast path of making AudioBuffers larger and fewer will be taken.