sound.stop not working

I must be experiencing some kind of bug.
I have a .wav sound file that represents a full length song I am using for the background of a simple game. When I call mysound.play or .playlooping, it begins to play fine. When I call mysound.stop, nothing happens. I added this code in multiple locations including view.close, a button, and a timer, and the sound just continues to play no matter how I try to stop it. If I close the view and open it again, the sound begins again and overlaps itself. Should I re-install xojo? Is this the first time this has happened?

I found some bugs with iOS sound as well when I was trying to build a game with it. I can’t remember the details, but I think I filed a bug report or two about it. In the end I think I just used some declares someone posted. Those worked fine but I ran into other issues. My game is now being developed in XCode, but the learning curve is a bit steep. I believe I’m starting to make good progress and I’m figuring out sprite kit so I hope within a year I’ll have it done working on it in my limited spare time.

I would look at iOSKit and see if the declares you need are there. If you don’t find it, I can try and dig out my old project and see what I can find for you.

I’m lost in the depth of iOSKit if you want to upload your example even for just the sound play and stop that would be fantastic.

Could be a bug, could also be that you do not deal with the scope properly. Do you keep a reference to the sound you are playing?

I play the sound from the open event of a view, all the attempts to close it are within the view. I also tried moving the sound.play command into the timer that stops the sound, which still does not work.

Might be a really stupid question, but do you know what I mean by scope?

And no, doing mySound.play followed by mySound.stop won‘t tell you much because the OTHER mySound is still playing …

[quote=387711:@Markus Winter]Might be a really stupid question, but do you know what I mean by scope?

And no, doing mySound.play followed by mySound.stop won‘t tell you much because the OTHER mySound is still playing …[/quote]

I assume you mean the bounds of the function, for example local vs global. When I do mysound.play followed by mysound.stop, it continues to play. I assume this to be an error, so if there is for example another instance of the sound that develops I do not know how to stop it.