bbPlayMusic. Does it work?
Archives Forums/Blitz3D SDK Bug Reports/bbPlayMusic. Does it work?
| ||
This command seems to return a valid channel but doesn't play the sound. The same .ogg files work with bbLoadSound - except long files don't play to the end. |
| ||
works fine for me with mp3, i havent tried ogg yet. |
| ||
I just get silence. This test program attempts to play the same file via bbLoadSound() + bbPlaysound then again via bbPlayMusic(). The first method plays fine but the second results in silence for me. Any idea what I'm doing wrong? Import pub.win32 Import blitz3d.blitz3dsdk bbBeginBlitz3D Local filename$="C:\Documents And Settings\John Pickford\Desktop\VSM\Skin-Magnetic Billiards\Assets\sounds\music\Look Busy.ogg" 'Preload the sound file Print "Loading Sound..."+filename$ Local sound=bbLoadSound (filename$) Print "Sound:"+sound 'Play sound until key is pressed Print "Playing loaded sound..." Local channel=bbPlaySound (sound) Print "Channel:"+channel Print "Press any Key to Continue" bbWaitKey() bbStopChannel channel 'Now stream the same file usinging bbPLayMusic until a key is pressed Print "Streaming the same file..." channel=bbPlayMusic (filename$) Print "Channel:"+channel Print "Press any Key to finish" bbWaitKey() bbStopChannel channel End Obviously you'll need to supply your own sound file. I've tried it with both .ogg and .mp3. Same result. |
| ||
Using that program (though adding a bbGraphics call otherwise bbWaitKey doesn't get directed to the program), I get a 0 result for channel in both bbPlaySound and bbPlayMusic with an mp3. A wav plays fine here with bbPlaySound, but although I get a valid channel from bbPlayMusic, there's no sound. I get the same result for various ogg files. Actually, trying a few more mp3s, some work and some don't. There's no obvious difference in a pair of working/non-working files. (Media Player Classic reports "MPEG Audio 44100Hz stereo 128Kbps [Audio]" for one file and "Audio: MPEG Audio 44100Hz stereo 96Kbps [Audio]" for the other.) [Moved to Bug Reports.] |
| ||
Hmm, just to confirm, the failing mp3 plays fine in 'plain' Blitz3D using this, and it works for both PlaySound and PlayMusic:Graphics 640, 480, 0, 2 Local filename$="E:\Docs\My Music\Best\Frank Black\Misc\Ghost Coming.mp3" Print "Loading Sound..."+filename$ Local sound=LoadSound (filename$) Print "Sound:"+sound Print "Playing loaded sound..." Local channel=PlaySound (sound) Print "Channel:"+channel Print "Press any Key to Continue" WaitKey() StopChannel channel Print "Streaming the same file..." channel=PlayMusic (filename$) Print "Channel:"+channel Print "Press any Key to finish" WaitKey() StopChannel channel End |
| ||
Well at least it isn't just me! Is this likely to be fixed soon or should I look for another solution? |
| ||
Is this likely to be fixed soon or should I look for another solution? The SDK does not use the same audio engine as B3D. Does the SDK hand off to DX and thus require codecs to be installed? |
| ||
naked war is still a dead link to lunarpages. |