Home » Questions » A few questions (Pausing Streams/WMA, MIDI time, MOD time)

0

0

Hello, first time posting here. I’m a huge fan of FMOD.

Anyway all of these questions relate to C/C++ Win32, 3.6 version.

First off, what is the best way to pause a stream? Right now I’m using FSOUND_SetPaused(FSOUND_ALL, 1); but this leads me to my next problem… That works fine for MP3s, but does nothing when playing WMA files. Is this a bug or am I just doing something wrong?

My next problem has to do with telling how long a MIDI is and how far into it is. I read in another post that there isn’t a way to get how long it is in milliseconds, but is there some way to tell how long it is and how far into it is? I just need a way of telling percentage (if not actual time).

Last problem is related to the above, only with MODs… For MODs, I’m just geting the curent order and deviding it by the total number of orders to get the percentage. Seems to work decently, but is there a more acurate way?

Thanks. I hope I’m not asking questions that have been gone over a million times before (I did check the FAQ before coming here).

As for MIDIs, yeah, I know they don’t work the same as MODs (which is why I had them as seperate questions heh)… I just want SOME way of telling how far into it the player is, accurate or not, I couldn’t find any.

I’m having the same problem with MODs, too… Stupid looping ones. What I figure I’ll do is just have an option to time out on MODs if they don’t end naturally within a set amount of time.

I’m making a player btw Just a project that evolved out of bordom and a hatred of those fancy (and very slow) players that are out there today.

I might (once I get all the other quirks worked out) make those pre-proccesing routines to figure out the length of MIDIs/MODs (or if they repeat forever)… I could send you the routines once they’re created if you’re intrested

I don’t think the MIDI one would be as slow, though, considering every MIDI player I have seen calculates it instantly (well, almost)… Even old ones.

As for MODs, I don’t know how the format works, but seems to me the easiest way to detect if a MOD is looping is to detect when the order goes in reverse. I’m thinking about doing that myself… IE one second it’s on order 10, the next it’s on 9… loop. I’d have to look at the format before making any kind of real guess as to how to get the length etc., though.