Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
About the PR
Disclaimer: At current state this is more of a proof-of-concept than anything. However, I need feedback to make this work so I'm submitting this as a draft.
What is this
A attempt to tackle the problem with bloating game files by giving the engine a way to download audio files from a http source and use them as needed.
Originally this was an attempt to port the efforts of this 12 year old blog post to stream OGG audio files in chunks and play those chunks as the file still downloads. This could be done by tweaking NVorbis, but I still could not get it to work.
Instead,
GetFileAsync
saves the entire file to disk. To check if file is downloaded and playable, I introduced a little hack in methodPlayOggAudioFile
for testing purposes, but all playback logic will have to be moved somewhere else.The main idea here is the introduction of
CDNConsumer
class to provide engine with audio files on-the-fly, but it needs polishingTODO:
_activeSources
after they are done playingMedia
playaudiocdn.mp4