Joel Auterson | DWG out now! @joelotter.com · Apr 24

Here's the loadogg function from SoLoud, which we use for cross-platform audio (it's great). It uses stb_vorbis for parsing .ogg files. When you open a file with stb_vorbis, it needs to extract a bunch of information about the file, before it's even started playing anything.

2 likes 1 replies

?

Replies

Joel Auterson | DWG out now! · Apr 24

How it does this is honestly a little beyond my comprehension but what I can tell for sure is that it is repeatedly seeking around the file and reading out sections byte-by-byte, each of which is its own I/O call. My guess is that this is because .ogg is a paged format (thank you Wikipedia):