I have built a simple test case for this:
static void Main(string[] args)
{
InitBass();
string location = @"E:\Music\Artist\xxx.mp3";
int handle = 0;
handle = Bass.BASS_StreamCreateFile(location, 0L, 0L, BASSFlag.BASS_STREAM_DECODE);
if (handle != Bass.FALSE)
{
int tempo = BassFx.BASS_FX_TempoCreate(handle, BASSFlag.BASS_DEFAULT);
Console.WriteLine(tempo);
bool play = Bass.BASS_ChannelPlay(tempo, true);
BASSError error = Bass.BASS_ErrorGetCode();
}
Console.WriteLine(handle + " " + error);
Console.ReadKey();
}
private static bool IsWindowsOS()
{
switch (Environment.OSVersion.Platform)
{
case PlatformID.Win32NT:
case PlatformID.Win32S:
case PlatformID.Win32Windows:
return true;
default:
return false;
}
}
private static void InitBass()
{
string targetPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
if (Utils.Is64Bit)
targetPath = Path.Combine(targetPath, "lib/x64");
else
targetPath = Path.Combine(targetPath, "lib/x86");
if (IsWindowsOS())
{
bool isBassLoad = Bass.LoadMe(targetPath);
bool isBassFxLoad = BassFx.LoadMe(targetPath);
}
bool isBassInit = Bass.BASS_Init(-1, 44100, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero);
}
All the init goes well, tempo handle return a non zero value but fails to play.
This does not happens with the simple handle.
So, the problem stays in the fx plugin.
I had no problem with windows 7, this happens on win8