Hello Everyone,
I'm using bass.dll in my game project because I'm using *.xm music files. First version of game was written 20 years ago in C++, and it was also using bass. Now I managed to rewrite playback 'engine' using bass.net wrapper. Everything seems to work fine except short music which is played in loop in game menu. Very last sound(note) of music is somehow prolonged giving audible strange effect ('Not proper.mp3' in attachment). Same file played in xmplay application works fine ('Proper.mp3' in attachment). Can't find the reason. I also used code from Bass24.Net\Samples\CS\MyFirstBass to play my music with same 'Not proper' result. Maybe i'm missing some flag in BASS_Init or in BASS_MusicLoad or frequency is not properly set? Do you have any suggestions what should I try? Below is part of code i use for playback:
// init BASS using the default output device
if ( Bass.BASS_Init(-1, 44100,
BASSInit.BASS_DEVICE_DEFAULT
, IntPtr.Zero) )
{
// create a stream channel from a file
int stream = Bass.BASS_MusicLoad("menu.xm", 0, 0,
BASSFlag.BASS_MUSIC_LOOP | BASSFlag.BASS_MUSIC_RAMPS,
0);
if (stream != 0)
{
// play the channel
Bass.BASS_ChannelPlay(stream, false);
}
Thanks in advance for help