Is it possible to prevent FMOD scanning the whole OGG/VORBIS file while opening it?


I would like to somehow convince FMOD to not scan/probe (near) end of the file OGG/Vorbis file while opening it -
it seems to be doing this starting backwards from end of the file towards beginning until it finds a valid frame (or so it hopes)-
after probing few of them ( based on (blockalign…) parameters ) it just gives up failing to recognize format despite the download/filesystem having enough data to start the playback at that point

Is this possible/supported in general for Vorbis codec ?

I have a custom filesystem set which retrieves encoded data progressively outside of FMOD and I try to playSound while download is in progress -

I tried few things, but everything seems to be failing for Vorbis files. - An MPEG with the very same setup plays without problems, however.

The files contain album artworks so I tried rather large blockalign buffers and initial downloads, OPENONLY/IGNORETAGS flags combinations, but everything seems to be successfully ignored X)

I’d be fine if this would not be possible at all, but I’d like to have confirmation if it’s indeed the case.

Thank you!

You can specify a suggestedsoundtype in the FMOD_CREATESOUNDEXINFO to tell FMOD to try to open as Ogg first though, otherwise it will scan around the file trying to figure it out.

Thank you for reply !
I should have mentioned this in OP, but I’m setting suggestedsoundtype already
It seems to be either ignored, or not behaving correctly though:
there are one/few initial scans starting backwards from supposed end of the file and after few failed attempts it looks like FMOD plays (few) ‘blockalign’ sized frame/s, then stops.

More precisely with e.g. 12MB OGG file if ‘blockalign’ is somewhat reasonable (say 16-64 kB) there are usually couple failed reads, then a single (correctly from start) frame is played, then it stops,
if ‘blockalign’ is left default (2048) FMOD tries to scan all the way until it hits valid data (probably hundreds of failes attempts for file of this size), then it plays a few starting frames and then stops.
Both files tested have non trivially sized tags at the beginning I think

The (obvious) workaround atm is to set ‘blockalign’ size at least to the size of the file - that way the ‘initial’ read frame covers the whole file which is acceptable for playback apparently ) - while no ideal it might be passable workaround for now though.

little update: while testing with NONBLOCKING opening after couple of failed reads from the end getOpenState returns ERR_FORMAT (after e.g. one LOADING state)
normal (blocking) open - used originally - depending on ‘blockalign’ size either plays first few frames, or ERR_FORMAT on createSound

so this seems to be probably consistent with FMOD trying to determine the format despite having suggestedtype set to OGGVORBIS

while using sync version of file system API, the seek position never seems to be advancing after failed read from the end, too (is reset to 0 and then never called again)

So at this point Im not sure how to proceed/if it’s possible to prevent reads near EOF at open time when media is not fully downloaded / available yet

Would you be able to supply us with your test code and test file?
You can upload files to your profile: