Sound object only plays once

You must Login before you can answer or comment on any questions.

I'm building a Windows desktop app. I created a Sound object like so:

var soundObj = Titanium.Media.createSound('app://warning.wav');

At appropriate points in my code, I play the sound like so:

soundObj.play();

The first time play() is called, the sound plays just fine. But any subsequent call to play() does not yield any sound. Other than creating the sound object and calling play, my code does nothing else with the sound object. Has anyone else seen this? Is it perhaps a problem with using the .wav format? Any suggestions?

Developing in WinXP with Titanium Developer 1.2.2 and Titanium SDK 1.1.0.

2 Answers

I believe it's a bug, I tried using soundObj.reload(); however then the sound is not played at all.

And of course, the funny thing. If you use createSound and play every time you need it as a part of an object, you are creating a memory leak (with speed of leaking depending on size).

Howdy, Is there a ticket for this bug? I've been trying to figure this out for a while. I thought I have fixed this on Mac osx Lion.. Seems more prevalent on Win32.

Your Answer

Think you can help? Login to answer this question!