I'm using stb_vorbis.c to load/decode .ogg audio files in C++. How do I get the clip's duration in seconds?
You can use the stb_vorbis_stream_length_in_seconds
function which takes the result of the stb_vorbis_open_file
call as the argument.
Here is an example of how it is used.