public static BASS_WASAPI_DEVICEINFO BASS_WASAPI_GetDeviceInfo(int device) { BASS_WASAPI_DEVICEINFO bass_WASAPI_DEVICEINFO = new BASS_WASAPI_DEVICEINFO(); if (BassWasapi.BASS_WASAPI_GetDeviceInfo(device, bass_WASAPI_DEVICEINFO)) { return(bass_WASAPI_DEVICEINFO); } return(null); }
public static bool BASS_WASAPI_GetDeviceInfo(int device, BASS_WASAPI_DEVICEINFO info) { bool result; try { bool flag = BassWasapi.BASS_WASAPI_GetDeviceInfoInternal(device, ref info._internal); if (flag) { if (info._internal.name != IntPtr.Zero) { if (Bass.Bass._configUTF8) { info.name = Utils.IntPtrAsStringUtf8(info._internal.name); } else { info.name = Utils.IntPtrAsStringAnsi(info._internal.name); } } else { info.name = string.Empty; } if (info._internal.id != IntPtr.Zero) { if (Bass.Bass._configUTF8) { info.id = Utils.IntPtrAsStringUtf8(info._internal.id); } else { info.id = Utils.IntPtrAsStringAnsi(info._internal.id); } } else { info.id = string.Empty; } info.type = info._internal.type; info.flags = info._internal.flags; info.minperiod = info._internal.minperiod; info.defperiod = info._internal.defperiod; info.mixfreq = info._internal.mixfreq; info.mixchans = info._internal.mixchans; } result = flag; } catch { result = false; } return(result); }
public static int BASS_WASAPI_GetDeviceCount() { BASS_WASAPI_DEVICEINFO info = new BASS_WASAPI_DEVICEINFO(); int num = 0; while (BassWasapi.BASS_WASAPI_GetDeviceInfo(num, info)) { num++; } BassWasapi.BASS_WASAPI_GetCPU(); return(num); }