Page 1 of 1

How to tell if sound effect is currently playing?

Posted: Thu May 22, 2014 7:42 pm
by Derrik
I am looking for a function which does this:

bool mmEffectFinished( mm_word sample_ID );

Re: How to tell if sound effect is currently playing?

Posted: Tue Oct 28, 2014 9:14 pm
by Izhido
So, have you had any luck finding such function? :)

Re: How to tell if sound effect is currently playing?

Posted: Thu Oct 30, 2014 11:07 pm
by Derrik
Izhido wrote:So, have you had any luck finding such function? :)
Nope. Without using a custom build of maxmod I don't think it is possible. I'm surprised MaxMod is missing such basic functionality when it is being pushed as the sound library to use for DS and GBA homebrew.

Re: How to tell if sound effect is currently playing?

Posted: Fri Oct 31, 2014 4:40 pm
by sverx
what about modifying it? It shouldn't be too hard...

edit: in the source code, there's this

Code: Select all

mme_get_channel_index
which seems to me to receive the handler number in r0 and output the channel number on r3... so you just need to write a small wrapper to call this and check if the resulting value is !=-1 (invalid) ...