Skip to content

How to get the length of an ogg sound with libvorbis/libogg and dynamic decoding/streaming? #839

Answered by mackron
ns-studios asked this question in Q&A
Discussion options

You must be logged in to vote

The libvorbis decoding backend does not have reliable retrieval of the length of a file. You can try modifying ma_libvorbis_get_length_in_pcm_frames() in extras/miniaudio_libvorbis.h to call ov_pcm_total, but in my experience it gave inaccurate results.

Regarding the error when using streaming, do you mean ma_sound_get_length_in_pcm_frames() is returning an error?

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ns-studios
Comment options

Answer selected by ns-studios
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants