In a windows-only game I want to support Commodore .sid audio - has someone already made a wrapper for a library to do so in GLB? :blink:
I'm not sure but one of these might be able to, at least with an add-on. Do you really, really, really need it to be in .sid format? Also just wondering if it is from an original commercial title?
bass.dll
http://www.glbasic.com/forum/index.php?topic=1708.msg12010
fmod
http://www.glbasic.com/forum/index.php?topic=7564.msg62935
I wonder the same like matchy, do you really need that format? Wouldnt a converter be the better solution to use that sounds?
More easy convert from a tracker to .wav...
With Winamp you can easily output that sid as an mp3 or wav file. Just use the Winamp sid plugin and then set the output plugin to Winamp Disk Writer, it writes the file in a desired format. I would do so.
I'm guessing that the idea of playing the sid file is to keep the audio small. I had a dll for playing AY/YM in BlitzBasic years ago but nothing from back then on playing SID to even use as a starting point :( As for playing SID in Winamp and converting to WAV, Winamp hasn't got the best replay engine for tracker or old computer formats.
Well I can now convert sid to mp3 very easily, but the whole idea is filesize. Some songs are 2KB and sound great. Even at the lowest quality MP3 it's >1MB... I'll look into FMOD. And it's not for a commercial title or anything.
On the ´converter / player´ part, you can try FOOBAR too, It is what I use as a music player. I think I saw some plugins for SID a while ago.
Ok so I think I found my solution. I forgot that a while back I messed around with RPG Maker's RGSS (ruby) language and helped get a winamp.dll to play .SPC files. Here's the link:
http://forums.rpgmakerweb.com/index.php?/topic/2235-extended-music-script-35/
I just can't seem to wrap the winamp.dll file properly... I tried to get it to initialize like this:
IMPORT "C" long Init_Winamp(char* inDLL, char* outDLL, void* hwnd)
and then called
Init_Winamp("in_snes.dll","out_wave.dll",0)
but it spits out
...gpc_temp0.o:gpc_temp0.cpp:(.text+0x1a14d): undefined reference to `_Init_Winamp'
*** FATAL ERROR - Please post this output in the forum
If I can get help properly wrapping Winamp.dll, we can play lots and lots of game music formats...
attached is Winamp.dll, the in_snes plugin, the out_wave plugin, and an example .spc file to play. It works in RPG Maker purely by initializing winamp and throwing a song at it... there must be a way to do this.
===========================================================================
EDIT: I realized I needed:
REQUIRE "Winamp.dll" and then it gets past that error, but now I think my problem is defining the proper variable types for Winamp.DLL. It gets some scary looking errors with my current setup...
Hi,
make a new file in your project and past this:
INLINE
#define WINAMP "Winamp.dll"
DECLARE_C_ALIAS(_Init_Winamp, WINAMP, "Init_Winamp",(const char*, const char*, void*), long);
ENDINLINE
FUNCTION Init_Winamp:
INLINE
return _Init_Winamp("in_snes.dll","out_wave.dll", GLBASIC_HWND());
ENDINLINE
ENDFUNCTION
it returnes -3 , it's say that the in_dll is wrong...
but trust me, the init isn't work this way!
Well - there's this.
http://www.glbasic.com/showroom.php?game=fmodPlayer
seems to play .sid without any special plugins. The .exe that comes WITH the project works fine, I can hear the music!!
The source code on the other hand isn't fine. It'll compile... but it returns 0 and no sound is played. Using GLBasic 11.322. Can someone please get this to compile/work? I'd be forever grateful...
I think it was compiled with GLBasic 3.x ... that's a long time ago. I suspect something changed with the way DLLCALL is handled... but the compiler does not complain... the actual program just does nothing when compiled. Like I said before though, the original .exe that is in the demo works great... I don't get it o_o :rant:
I give you start to fmodex later. I'm on the road atm.
Thanks Schranz0r! I did manage to get "sidplayfp" working great because it's a command-line too, all I needed to do was use SHELLCMD to call it with a music playing function. It runs in the background and loads .sid audio instantaneously - should I stick with that or is FMOD dll really a better solution?