Incbin dependencies
BlitzMax Forums/BlitzMax Beginners Area/Incbin dependencies
| ||
A noobish question: using the Framework thing to reduce final application size, I get a fully working App, but when I add the Incbin calls, it runs and closes without visible errors, even in debug mode. I'd like to know which deps are related to Incbin command, under Bmax 1.36. Any suggestion, apart from Framework Assistant, which doesn't run under MacOSX? (At least, the one I downloaded here didn't work.) Thanks in advance for your replies. |
| ||
Import BRL.RamStream |
| ||
@Oddball: thanks for your reply. I was already importing that module. I noticed it's not an Incbin issue, but the wrong use I did of it. I supposed LoadSound() was similar to LoadImage(), but I got wrong. Just for a matter of detail, I'm going to show what I'm trying to do: SuperStrict Framework BRL.GLMax2D Import BRL.OpenALAudio Import brl.WAVLoader Import brl.OGGLoader Import BRL.RamStream Import BRL.PNGLoader 'Incbin "Drop.wav" 'Incbin "track.ogg" Incbin "Load.png" SetGraphicsDriver GLMax2DDriver() SetAudioDriver("OpenAL") Local SFX_MusicChannel:TChannel = AllocChannel() Local SFX_Music:TSound = LoadSound("track.ogg",SOUND_LOOP) Local SFX_Key:TSound = LoadSound("drop.wav") 'Local SFX_Music:TSound = LoadSound("incbin::track.ogg",SOUND_LOOP) 'Local SFX_Key:TSound = LoadSound("incbin::drop.wav") Local GFX_Load:TImage = LoadImage("incbin::Load.png") Graphics 640, 480, 0 If SFX_Music And SFX_Key DrawText "Playing Sound!", 0, 0 DrawText "Try to press some key...", 0, 20 DrawText "ESC to quit.", 0, 40 DrawImage GFX_Load, 50, 80 Flip SetChannelVolume(SFX_MusicChannel,1) PlaySound(SFX_Music,SFX_MusicChannel) Else End EndIf While WaitKey() <> KEY_ESCAPE PlaySound(SFX_Key) Wend This is the working version of my test app. Activating the commented part I get the sudden exit, as above explained. Any tip about sounds embedding into a final application? Thanks. ;) |
| ||
one thing about incbin, it's case sensitive. I had a similar problem a long time ago. |
| ||
OMG! Cannot believe it! ^_^ Just changed "incbin::drop.wav" to "incbin::Drop.wav" and all works as expected. Thanks Jesse, thanks Oddball. :) |
| ||
Note that this is not just incbin: filenames on the Mac and Linux are always case-sensitive, even when loading them directly from a folder on your harddrive. |
| ||
Just did a curious experiment. * On the filesystem (Mac) I have: ./Drop.wav * In Bmax source I have: Incbin "drop.wav"... * ...and then "incbin::drop.wav" The program works. What I figured out is: I can incbin a filename, with no care about upper/lower case characters and, after, refer my code to that file just using exactly the same statement. i.e.: Incbin "DrOp.wav" is correct if I refer to it by using "incbin::DrOp.wav", even if the plain filename is "Drop.wav", even on a case sensitive OS. Try it! :-) |