swoolcock / diddy

An Open Source Framework that includes a set of extra functions and APIs for the Monkey language.
MIT License
21 stars 4 forks source link

glfw crashes when using sounds.Load(string) #29

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. using sounds.Load(string)anywhere in the code
2. compile for glfw

The attached file works fine on all targets except for glfw in which it crashes 
as soon as it runs.

What version of the product are you using? On what operating system?
r317 with monkeyPro v45c, v47, and v50 on windows 7 x64

Original issue reported on code.google.com by aman....@gmail.com on 6 Dec 2011 at 5:49

Attachments:

GoogleCodeExporter commented 9 years ago
Sorry, I forgot to uncomment line 14 in the attached file. Without doing so, 
the file will run normally when compiled fo glfw.

Original comment by aman....@gmail.com on 7 Dec 2011 at 12:35

GoogleCodeExporter commented 9 years ago
GLFW does not support mp3 format, please read the Monkey docs in Module 
mojo.audio.
A good guide is the audiotest sample monkey file:
#If TARGET="glfw"
        'GLFW supports WAV only
        fmt="wav"
#Elseif TARGET="html5"
        'Less than awesomely, there appears to be no 'common' format for html5!
        'Opera/Chrome appear to handle everything, but...
        'IE wont play WAV/OGG
        'FF wont play MP3/M4A
        'Let's support OGG!
        fmt="ogg"       'use M4a for IE...
#Elseif TARGET="flash"
        'Flash supports MP3, M4A online, but only MP3 embedded.
        fmt="mp3"
#Elseif TARGET="android"
        'Android supports WAV, OGG, MP3, M4A (M4A only appears to work for music though)
        'There are rumours of problems with WAV sounds so let's use OGG.
        fmt="ogg"
#Elseif TARGET="xna"
        'XNA supports WAV, MP3, WMA
        'Probably OK to use mp3 here, as audio is converted by XNA so you're not actually 
        'redistributing/decoding mp3s so probably don't need a license. But that's a lot
        'of 'probablys'...
        fmt="wav"
        mfmt="wma"
#Elseif TARGET="ios"
        'iOS supports WAV, MP3, M4A
        fmt="m4a"
#End

Original comment by therevil...@gmail.com on 7 Dec 2011 at 11:05

GoogleCodeExporter commented 9 years ago
I feel stupid. Should have checked that before submitting the issue. Thanks

Original comment by aman....@gmail.com on 8 Dec 2011 at 1:21