Xojo Sound Won't Play At All

How do I solve this problem where sound simply doesn’t play?

I’m on Windows and if I execute the code:
‘GetFolderItem(“C:\Users\Oli\Desktop\MySound.mp3”).OpenAsSound.Play’

It doesn’t play anything and the IsPlaying variable returns false. Take note, this is without any code that will disable it.

But if I use:
‘GetFolderItem(“C:\Users\Oli\Desktop\MySound.mp3”).Launch’

The file will open fine and play fine in the default sound player on my system.

Thanks

try

GetFolderItem(“C:\Users\Oli\Desktop\MySound.mp3”, FolderItem.PathTypeNative).OpenAsSound.Play

Still doesn’t work. Thanks

In OSX it works …

SpecialFolder.Desktop.Child(“MySound.mp3”).OpenAsSound.Play
works too

Is the MP3 file protected in any way?

I’ve tried different MP3s. I doubt it. It does not seem to work with any sound. I believe this code has worked perfectly fine in the past but I don’t know what’s has changed apart from maybe which version of Xojo I am using since I wrote that code. This is 2015 Release 1 btw. Thanks

Release 1 broke the MP3 and much of the sound playback besides .WAV (have no idea how that would happen!), the Release 2 and higher restored it however.

I am not entitled to release 2. Can staff get me a free upgrade just to release 2 under exceptionally buggy circumstances please? It’s that one bug that kills my project. I cannot afford £191.84 just to renew my Xojo license. :confused: I don’t know if my project will work in previous Xojo releases either.

You can always try a previous release, they’re available in the Xojo downloads dashboard at xojo.com. Send a copy of your source to Xojo in a bug report only you and xojo can see for bug confirmation and testing. Sound is working here for me on Windows 10 and Mac 10.10.x. I do know that I installed a codec pack one time which xojo did not like and broke sound, I believe it was ACFilters codec. See if you have that installed.

[quote=207641:@Oliver Scott-Brown]‘GetFolderItem(“C:\Users\Oli\Desktop\MySound.mp3”).OpenAsSound.Play’

It doesn’t play anything and the IsPlaying variable returns false.[/quote]

Where are you getting IsPlaying from? In that code the Sound instance isn’t held anywhere to call IsPlaying on.

Possibly something changed so a playing sound doesn’t keep itself alive and it’s destructed right away. Try storing the Sound instance someplace before calling Play.

[code]Property testSound As Sound

//…

testSound = GetFolderItem(“C:\Users\Oli\Desktop\MySound.mp3”).OpenAsSound
testSound.Play
[/code]

[quote=207694:@Will Shank]Where are you getting IsPlaying from? In that code the Sound instance isn’t held anywhere to call IsPlaying on.

Possibly something changed so a playing sound doesn’t keep itself alive and it’s destructed right away. Try storing the Sound instance someplace before calling Play.

[code]Property testSound As Sound

//…

testSound = GetFolderItem(“C:\Users\Oli\Desktop\MySound.mp3”).OpenAsSound
testSound.Play
[/code][/quote]
Originally my code did that but I modified it to its simplest form to test if sound works at all.

Can’t see that installed. I’ll test it with a different version once I have completed some other tasks.