Moderator: eKid
-
naroin
- Posts: 6
- Joined: Mon Jan 19, 2009 1:49 pm
Post
by naroin » Thu Jan 22, 2009 8:34 pm
Hi,
I've just discovered that if you do a mmStop while no music is playing, the sound system crashes.
I easily found a workaround
but maybe there should be a protection in mmStop ?
-
eKid
- Posts: 65
- Joined: Sat Dec 06, 2008 6:07 pm
-
Contact:
Post
by eKid » Fri Jan 23, 2009 4:03 am
Hmm, that is strange. Using mmStop when there's no music playing shouldn't crash the system. :/
Are you sure there's nothing else that could be causing the problem? Using multiple mmStops works fine in the examples.
-
naroin
- Posts: 6
- Joined: Mon Jan 19, 2009 1:49 pm
Post
by naroin » Fri Jan 23, 2009 9:52 am
To be sure, before posting to this forum, I've modified the basicsound sample:
pressing A calls mmStop and mmUnload
pressing B calls mmLoad and mmPlay
A+B+A+B+A+B... works fine
A+A+B : nothing plays
I can send you the code if necessary
-
eKid
- Posts: 65
- Joined: Sat Dec 06, 2008 6:07 pm
-
Contact:
Post
by eKid » Tue Jan 27, 2009 12:50 pm
Heh, calling mmUnload when nothing is loaded will probably crash something... (oops i forgot to check for that). You really want to load something only once, then unload it when you are finished with it. If you load something more than once, the first load will actually load the data, and the extra loads will just increase the reference count, so then you'll need multiple unloads to get it out of memory. (or does this only apply with sound effects
)
-
naroin
- Posts: 6
- Joined: Mon Jan 19, 2009 1:49 pm
Post
by naroin » Tue Jan 27, 2009 1:37 pm
well, to be sure, i just made a mmStop (without mmUnload), and it crashes the same way
now i just do a "if mmActive" before the stop, and i have no problem, so that's not really anoying.
Who is online
Users browsing this forum: No registered users and 0 guests