1.43 - No sound [OSX Lion]
Archives Forums/BlitzMax Bug Reports/1.43 - No sound [OSX Lion]
| ||
Tried this with half a dozen OGG files now - all I get is two audible 'clicks' in FreeAudio (default), while OpenAL produces no sound whatsoever.Strict Local s:String For s = EachIn AudioDrivers() Print s Next Graphics 800,600 Local snd:TSound = LoadSound("sound.ogg") PlaySound(snd) WaitKey End [edit] Just tried it with a music OGG file and its become apparent that the two clicks are played when the audio is meant start, and when its meant to stop, i.e., the longer the OGG file is, the further apart the clicks are. [edit] Just tried a WAV file. Works fine in FreeAudio and OpenAL so I guess BRL.OGGLoader has gone tits-up somehow. Last edited 2011 |
| ||
Hi, Anyone else getting this? Here, the above outputs... OpenAL FreeAudio FreeAudio CoreAudio Null ...and changing the LoadSound to: "../samples/digesteroids/sounds/menu.ogg" plays audio as expected. Digesteroids also works fine, with or without SetAudioDriver "OpenAL" at the top. |
| ||
Presumably you're using xcode 4? I rebuilt all modules if that's likely to make a difference. by the way, i get the same list of audio drivers as you. Last edited 2011 |
| ||
Just tried digestoroids. all works fine except the music as its in ogg format. I get the clicks i mentioned before. the sounds are in wav format and work fine. |
| ||
Hi, Yes, rebuilding modules did the 'trick'! The fix is to modify bmk to use the old compilers - will have a 143b up soon. A shame, because the new LLVM based compilers are FAST! |
| ||
Mark, you may want to switch warnings back on for bmk and update the ogg and vorbis source modules (they are looking a little long in the tooth). There seems to be some 64 to 32 bit casting issues / warnings that may have been fixed. |
| ||
Hi, Ok, I've updated to the latest here: http://xiph.org/downloads/ But the results are same - works with gcc, not with llvm (note: I'm assuming 'g++-4.2' uses the 'gcc' compilers and plain 'g++' uses llvm, going by what they print out in console). I'm getting just the one warning: /Users/marksibly/Desktop/BlitzMax/mod/pub.mod/oggvorbis.mod/libvorbis-1.3.2/lib/info.c: In function 'vorbis_granule_time': /Users/marksibly/Desktop/BlitzMax/mod/pub.mod/oggvorbis.mod/libvorbis-1.3.2/lib/info.c:657: warning: integer constant is too large for 'long' type ...and the code does indeed look dodgy: granuleoff|=0x7ffffffff; Going by the surrounding code, I assume it's meant to be 0x7fffffff, but changing that doesn't fix it. Do I need to turn on more warnings? Any more clues? It would be nice to get the llvm compilers going! Last edited 2011 Last edited 2011 |
| ||
Hmm, maybe it's the module glue, will take a look. |
| ||
Most likely candidate seems to be the 64 bit value passed to the seek call back. I wrote this code before BlitzMax got longs so I think it needs a bit of a rewrite: in vorbisfile.h the code is int (*seek_func) (void *datasource, ogg_int64_t offset, int whence); in brl.mod/gooloader.mod/oggloader.bmx we have: Function seekfunc( src_obj:Object,off0,off1,whence ) Local off Local src:TStream=TStream(src_obj) ?X86 off=off0 ?PPC off=off1 ? I have no shame... |
| ||
Hi, Looks OK to me - I tried swapping off0/off1 but it didn't help. I don't see why gcc and llvm should compile this any differently anyway - surely they'll both put 64 bit values on the stack in the same way? So...I think I'll just stick with using gcc for now. |
| ||
All good in 143b! |