I've succesfully implemented BASS [
http://www.un4seen.com/] and I can use this to play the files I want.
The problem I still have is: if I need to share my app, I also need to find the corresponding track it plays and that track must be placed on a specific location on the computer (fixed path) or it won't play at all of course.
I want to add my modfiles as a resource in my project and then play it from there (locally), so it works instantly from any location my apps run and I don't have to send my modfiles all the time.
I
can't seem to get this working the easy way:
just add as resource and use 'resource path' [e.g. Properties.Resources.Trackname] instead of 'location as string' [e.g. "C:\Test\Trackname.mod"]).
I've tried to search for help at the official forum for BASS at the website mentioned above, but no one seems to know how it works, as they don't program in C# (.NET)... Very nice.
This is keeping me busy for over a month now, is there someone here that knows or can find out:
How to play a modfile from resource using the BASS modplayer?
Working code after BASS-implementation to play files on the computer:
using Un4seen.Bass;
int vol = 10000;
Bass.BASS_Init(-1, 44100, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero);
int load = Bass.BASS_MusicLoad("C:\\Test\\TestTrack.mod", 0, 0, BASSFlag.BASS_SAMPLE_LOOP, 0);
Bass.BASS_SetConfig(BASSConfig.BASS_CONFIG_GVOL_MUSIC, vol);
Bass.BASS_ChannelPlay(load, false);
So I want to change
MusicLoad("C:\\Test\\TestTrack.mod", ... )
MusicLoad(Properties.Resources.TestTrack, ... )
And still have the playing music, which won't work this way.
At the BASS forum they said it had to do with resource importing methods from .NET, not with functions of BASS itself.
Any ideas?