Introduce paged decoding to the resource manager in the high level API.

This enables early playback of the sound while the remainder of the
sound is loaded in the background. When the first page is loaded, the
sound can start playback. While it's playing, the rest of the sound is
loaded in a background thread. In addition, sounds no longer need to
wait for every sound prior to it in the queue to fully decode before it
is able to start - it only needs to wait for the first page of each of
the queued sounds to decode. This enables much fairer prioritization of
asynchronously loaded sounds.

This paged decoding system is *not* a true streaming solution for long
sounds. Support for true streaming will be added in future commits.
This commit is only concerned with filling in-memory buffers containing
the whole sound in an asynchronous manner.
This commit is contained in:
David Reid
2020-06-12 21:47:49 +10:00
parent 7f49fca227
commit 213ee9dc52
2 changed files with 517 additions and 602 deletions
+475 -601
View File
File diff suppressed because it is too large Load Diff