i get error in c#

Started by Zoulz,

Zoulz

i get 'Input string was not in a correct format.' on the following line when I try to build in c#:

bassObj = new BASS(-1, 44100, DeviceSetupFlags.Latency | DeviceSetupFlags.LeaveVolume | DeviceSetupFlags.ThreeDee, this.Handle);

anyone know why?

leppie

#1
This seems to happen on some non-english cultures. Im aware of the German. It happens when when it checks the bass dll version.

public BASS(int device, int freq, DeviceSetupFlags flags, IntPtr hwnd)
{
*  if (Convert.ToSingle(BASS.Version) < 1.6)
*  throw new NotSupportedException("BASS version 1.6+ required. You have BASS version " + BASS.Version);
                  Init(device, freq, flags, hwnd);
                  form = (Form)Form.FromHandle(hwnd);
}

You can safe delete those (*) lines if you have at least BASS 1.6.

Cheers :)