/// <summary> /// Initializes an ASIO device by its identifier, using the specified sample rate (frequency) /// and initialization flags. To get the deviceId, use the DeviceHelper class. /// </summary> /// <param name="deviceId">Device identifier</param> /// <param name="frequency">Sample rate (in Hz)</param> /// <param name="init">Intiailization flags</param> /// <param name="asioInit">ASIO initialization flags</param> public static void Init(int deviceId, int frequency, BASSInit init, BASSASIOInit asioInit) { // Initialize base device if (!Bass.BASS_Init(-1, frequency, init, IntPtr.Zero)) { // Check for error (throw exception if the error is found) Base.CheckForError(); } // Initialize ASIO device if (!BassAsio.BASS_ASIO_Init(deviceId, asioInit)) { // Check for error (throw exception if the error is found) Base.CheckForError(); } }
public static extern bool BASS_ASIO_Init(int device, BASSASIOInit flags);