Exemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ASIODriverExt"/> class based on an already
        /// instantiated ASIODriver instance.
        /// </summary>
        /// <param name="driver">A ASIODriver already instantiated.</param>
        public ASIODriverExt(ASIODriver driver)
        {
            this.driver = driver;

            driver.init(IntPtr.Zero);

            callbacks = new ASIOCallbacks();
            callbacks.pasioMessage          = AsioMessageCallBack;
            callbacks.pbufferSwitch         = BufferSwitchCallBack;
            callbacks.pbufferSwitchTimeInfo = BufferSwitchTimeInfoCallBack;
            callbacks.psampleRateDidChange  = SampleRateDidChangeCallBack;

            BuildCapabilities();
        }
Exemplo n.º 2
0
 public ASIODriverExt(ASIODriver driver)
 {
     this.driver = driver;
     if (!driver.init(IntPtr.Zero))
     {
         throw new InvalidOperationException(driver.getErrorMessage());
     }
     this.callbacks = default(ASIOCallbacks);
     this.callbacks.pasioMessage          = new ASIOCallbacks.ASIOAsioMessageCallBack(this.AsioMessageCallBack);
     this.callbacks.pbufferSwitch         = new ASIOCallbacks.ASIOBufferSwitchCallBack(this.BufferSwitchCallBack);
     this.callbacks.pbufferSwitchTimeInfo = new ASIOCallbacks.ASIOBufferSwitchTimeInfoCallBack(this.BufferSwitchTimeInfoCallBack);
     this.callbacks.psampleRateDidChange  = new ASIOCallbacks.ASIOSampleRateDidChangeCallBack(this.SampleRateDidChangeCallBack);
     this.BuildCapabilities();
 }
Exemplo n.º 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ASIODriverExt"/> class based on an already
        /// instantiated ASIODriver instance.
        /// </summary>
        /// <param name="driver">A ASIODriver already instantiated.</param>
        public ASIODriverExt(ASIODriver driver)
        {
            this.driver = driver;

            driver.init(IntPtr.Zero);

            callbacks = new ASIOCallbacks();
            callbacks.pasioMessage = AsioMessageCallBack;
            callbacks.pbufferSwitch = BufferSwitchCallBack;
            callbacks.pbufferSwitchTimeInfo = BufferSwitchTimeInfoCallBack;
            callbacks.psampleRateDidChange = SampleRateDidChangeCallBack;

            BuildCapabilities();
        }
Exemplo n.º 4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ASIODriverExt"/> class based on an already
        /// instantiated ASIODriver instance.
        /// </summary>
        /// <param name="driver">A ASIODriver already instantiated.</param>
        public ASIODriverExt(ASIODriver driver)
        {
            this.driver = driver;

            if (!driver.init(IntPtr.Zero))
            {
                throw new InvalidOperationException(driver.getErrorMessage());
            }

            callbacks = new ASIOCallbacks();
            callbacks.pasioMessage          = AsioMessageCallBack;
            callbacks.pbufferSwitch         = BufferSwitchCallBack;
            callbacks.pbufferSwitchTimeInfo = BufferSwitchTimeInfoCallBack;
            callbacks.psampleRateDidChange  = SampleRateDidChangeCallBack;

            BuildCapabilities();
        }
Exemplo n.º 5
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ASIODriverExt"/> class based on an already
        /// instantiated ASIODriver instance.
        /// </summary>
        /// <param name="driver">A ASIODriver already instantiated.</param>
        public ASIODriverExt(ASIODriver driver)
        {
            this.driver = driver;

            if (!driver.init(IntPtr.Zero))
            {
                throw new InvalidOperationException(driver.getErrorMessage());
            }

            callbacks = new ASIOCallbacks();
            callbacks.pasioMessage = AsioMessageCallBack;
            callbacks.pbufferSwitch = BufferSwitchCallBack;
            callbacks.pbufferSwitchTimeInfo = BufferSwitchTimeInfoCallBack;
            callbacks.psampleRateDidChange = SampleRateDidChangeCallBack;

            BuildCapabilities();
        }