This method has the drawback that streaming or any kind of change to the audio results in high latency, and seeking, resampling, etc. The audio thread reads from the ringbuffer and writes audio A thread decodes the audio from disk, then fills a ringbuffer The method for streaming music works like this: ![]() ![]() ![]() Streaming happened from disk (OGG files in Godot are streamed from disk), while samples are played from memory, generally uncompressed. This combination of facts resulted in audio implementations where streaming audio (music) and samples (sound effects) had to be divided. Additionally, decoding compressed audio by traditional libraries was CPU intensive and required allocating/deallocating memory (which is forbidden and must never be done in audio threads). Traditionally, devices had little amount of memory until a few years ago. The main main reasons why Godot's audio engine was written as it is were: ![]() I was thinking about modernization of the audio engine.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |