Maxmod2
BlitzMax Forums/BlitzMax Programming/Maxmod2
| ||
Need help with playing a mod file on mac I want load the sound via incbin, and play it. incbin "sample.xm" file=loadmusic ("incbin::sample.xm") playmusic(file) .. .. While Not KeyHit(KEY_ESCAPE) .. .. wend is this correct? |
| ||
Dunno. Do you hear anything? I've never used XM format. The only thing I see missing from your code are the maxmod2 imports. Also you might want to store the result of PlayMusic() in a TChannel otherwise you might have trouble stopping it. |
| ||
i hear nothing, and the import this: Import MaxMod2.RtAudio |
| ||
I'm pretty sure you need to import some other stuff (and maybe set maxmod's audio driver) before you'll get a peep out of it. Have a look at the sample code, I'm sure there's an XM example. |
| ||
I am Importing all maxmod2 import.Set the audiodriver to maxmod rtaudio,but nothing happens. |
| ||
Getting this if i use maxmodverbose true: MaxMod2: MaxMod_CreateSound 10164 MaxMod2: MaxMod_CreateSound 11792 MaxMod2: MaxMod_CreateSound 9120 MaxMod2: MaxMod_CreateSound 38304 MaxMod2: MaxMod_CreateSound 1014816 MaxMod2: CMEM SEEK MaxMod2: CMEM SEEK MaxMod2: Flac Loader... MaxMod2: CMEM SEEK MaxMod2: Flac tag rejected MaxMod2: CMEM SEEK MaxMod2: OGG Loader... MaxMod2: CMEM SEEK MaxMod2: CMEM SEEK MaxMod2: OGG decoder rejected MaxMod2: ~OggPlayer MaxMod2: CMEM SEEK MaxMod2: Wav Loader... MaxMod2: CMEM SEEK MaxMod2: Wav rejected MaxMod2: ~WavPlayer MaxMod2: CMEM SEEK MaxMod2: Dumb Loader... MaxMod2: CMEM SEEK MaxMod2: Dumb Memory Loader... MaxMod2: CMEM SEEK MaxMod2: RtAudioDriver::Shutdown |
| ||
i am using this sample:SuperStrict Import MaxMod2.RtAudio Import MaxMod2.ModPlayer Import MaxMod2.OGG Import MaxMod2.FLAC Import MaxMod2.WAV SetAudioStreamDriver("MaxMod RtAudio") 'MaxModVerbose True Graphics 30,200,0 Local Channel:TChannel = PlayMusic(RequestFile("",MusicExtensions())) If Not Channel RuntimeError "no channel?" Local L!,R! Repeat Cls GetChannelUV(Channel,L,R) SetColor(100,100,150) DrawRect(5,5,10,190) DrawRect(20,5,10,190) SetColor(255,255,255) DrawRect(5,195-(190*L),10,190*L) DrawRect(20,195-(190*R),10,190*R) Flip Until ChannelPlaying(Channel)=0 Or AppTerminate() Or KeyHit(KEY_ESCAPE) but can't find interface for maxmod2.modplayer ?!?! |
| ||
Problem solved. Thanx for helping! |
| ||
How did you solve it? |
| ||
Take a look:Import MaxMod2.Dumb Import MaxMod2.RtAudio ... Incbin "MUZAK/virtual_humanity.xm" SetAudioDriver("MaxMod RtAudio") MaxModVerbose False ... Global Channel:TChannel = PlayMusic("incbin::MUZAK/virtual_humanity.xm",True) .. Last edited 2011 |
| ||
Hmm... After updating to the latest Bmax (1.44b) and the latest MinGW (gcc 4.6.1) I can get almost all modules to compile (even wxMax!), and almost all of the examples that come with those modules, but still not able to get Maxmod2 to work :( I can compile the module itself after adding the line #include <stdio.h> to the top of the file.cpp file. But both examples give the following error upon compilation: Linking:PlayFolder.debug.exe C:/BlitzMax/bin/ld.exe: cannot find -ldsound Build Error: Failed to link C:/BlitzMax/mod/maxmod2.mod/examples/PlayFolder.debug.exe Process complete whether I have the default ar.exe and ld.exe files in Blitzmax/bin or the ones from MinGW/bin. (I would imagine that they are the same by now anyway) And yes, I know the maxmod2.Modplayer line needs to be changed to maxmod2.Dumb (without that change, it complains about not finding the interface to maxmod2.Modplayer, etc). I've tried MacSven's code as well to no avail. :( Any ideas, anyone? Is -ldsound referring to the directsound library? Russell |
| ||
Same problem here. Complains about missing -ldsound. And yes it seems to be the direct sound library. Strangely enough if you use the LD.EXE from BMax 1.43 it works, but generates lots of warnings so it's probably not a good idea to use it for release. Dunno what do do, really. |
| ||
Copying 'libdsound.a' from MinGW\lib, to BlitzMax\lib seem to fix the cannot find -ldsoundOnly tested the Miniplayer example tho. |
| ||
Hey, thanks, that fixed it! Too bad error messages aren't written to be understood by normal humans... (Why not say "Wrong version of 'libdsound'" instead? : There was already a file called libdsound.a in Blitzmax/lib, but it was a slightly different size and, I'm assuming, version as well.) Anyway, glad I can finally use it! On that note, I also some mention on these forums of a mod player called 'ufmod' (It's really tiny!, but only plays XM files). BEWARE: My virus detector found a trojan in it - Which is just as well, since I was unable to get it to work. It is quite old, however, so I'm not surprised. Thanks again, Russell |
| ||
Copying 'libdsound.a' from MinGW\lib, to BlitzMax\lib seem to fix the Thanks, just ran into that problem myself as well. That appears to take care of it. |
| ||
I get the error... Can't find interface for module 'maxmod2.modplayer' ...I have Win7 64-Bit. Can anybody help? |
| ||
Compile the module first: blitzmax\bin\bmk makemods -a maxmod2 blitzmax\bin\bmk makemods -a -h maxmod2 and/or rebuild the documentation through the IDE. |
| ||
That error appears when you compile any of the example code that came with maxmod2, even after the module itself compiles without errors. It seems that the maxmod2.modplayer module was replaced by the maxmod2.dumb module, but the example files were not updated. Change 'Import maxmod2.modplayer' to 'Import maxmod2.dumb' (and move the above mentioned libdsound file) and you should be alright. Russell |
| ||
:Russell - Excellent dude...! That worked. Thanks for all the info, most appreciated. Last edited 2011 |
| ||
Glad to help! :) And thanks to Redi (the author of Maxmod) for making this module, and constructing it in a way that we only need to import the part(s) needed. Bloat is evil... EEEEEEEEVIL!!! Russell |
| ||
And thanks to Redi (the author of Maxmod) for making this module... Yes I thank him for making this module and problems... |
| ||
Holy... do you have anything of value to contribute to module discussions other than complaining at things that were given for free? All these problems you're having with compiling modules are directly related to your competence and resourcefulness, not the authors'. Do you honestly think any of these modules were released in unworking (or as it must appear to you, uncompilable) conditions? The worst part is that you'd rather use your time to diss the author than thanking the above posters (xlsior and Russell for example) for providing solutions. Lack of class, IMO. |
| ||
All these problems you're having with compiling modules are directly related to your competence and resourcefulness My competence and resourcefulness? I am laughing now. We own the same language. How your language works better than mine? all we purchase the same language. I did all instructions you gave me. And why some modules work at once and other you need to struggle to make them not working? is my competence? do you have anything of value to contribute ... What kind of value to contribute to? I am collecting the modules I need to create my games , you will see my value in the future. Last edited 2012 |