Page 1 of 1
Mod Support?
Posted: Mon Aug 29, 2005 10:24 pm
by Brujah
I remember having asked this question a while ago.
Will it or is it possible to play modules with purebasic?
The Blitzbasic Version of our game uses Modules for creating a bit of atmosphere.
Can I acomplish this with purebasic too?
Posted: Mon Aug 29, 2005 11:20 pm
by dracflamloc
The mod library for pb says windows only in the help, but i seem to remember asking before aboutt hat and was told it does work in linux? Maybe someone else can confirm this?
Posted: Mon Aug 29, 2005 11:24 pm
by Fred
Yes, it's possible. You have to download the 'Module' lib for linux here (and check the MIDAS license) :
http://www.purebasic.com/download.php3
Posted: Tue Aug 30, 2005 6:10 am
by Brujah
I did exactly what I read in the Dodumentation.
Thats my code:
Code: Select all
If InitSound() = 0
EndIf
If InitModule() = 0
EndIf
egal = loadmodule(1,"laby/sounds/archonsoflight.mod")
playmodule(1)
delay(5000)
And that what I get as response:
Error: Line 4 - InitModule(): Incorrect number of of parameters.
Posted: Tue Aug 30, 2005 4:17 pm
by Fred
The linux version is quite old, so you will have to put the max number of modules in the InitModule() function like: InitModule(20) ; Max 21 modules, from 0 to 20. Also #PB_Any, aren't supported (shouldn't be a problem for this lib).
Posted: Tue Aug 30, 2005 10:31 pm
by Brujah
I tried to kill artsd before running it. But I still hear nothing.
Does anybody know what I could do?
Posted: Sat Oct 08, 2005 2:38 am
by Brujah
I tried around a bit but I still cannot get it working.
This is what I try:
Code: Select all
If InitSound() = 0
print("Sound Error!!")
end
EndIf
If InitModule(1) = 0
print("Module Error!!")
end
EndIf
egal = loadmodule(0,"/home/markus/laby/sounds/archonsoflight.mod")
playmodule(0)
print("playing...")
repeat
examinekeyboard()
until KeyboardPushed(#PB_Key_Return)
end
Posted: Fri Dec 02, 2005 7:26 pm
by Brujah
Maybe the error lies in the location of the libmidas.a?
The documentation in midas is a bit weird here.
For linking with programs they give you examples for c and delphi.
But I still have no idea about purebasic.
Placing it in the same directory as my program does not work.
Where to place it? Do I have to do something else?
Posted: Fri Dec 02, 2005 7:42 pm
by Fred
You theorically don't need the .a if you use the linux module library.
Posted: Sat Dec 03, 2005 2:07 am
by Brujah
I placed the library "module" in the userlibraries directory. In /usr/share/purebasic.
But it is not working, my program crashes when I call initmodule(1).
Can anybody try if it is working on your machines?
Is it a problem of suse? Or my sound configuration?
Really confused...