Exemple #1
0
        private void OnBufferSwitch(int Index, ASIOBool Direct)
        {
            Audio.SampleBuffer[] a = new Audio.SampleBuffer[input.Length];
            for (int i = 0; i < input.Length; ++i)
            {
                a[i] = input[i].Samples;

                using (Audio.RawLock l = new Audio.RawLock(a[i], false, true))
                    ConvertSamples(
                        input[i].Info.buffers[Index],
                        input[i].Type,
                        l,
                        l.Count);
            }

            Audio.SampleBuffer[] b = new Audio.SampleBuffer[output.Length];
            for (int i = 0; i < output.Length; ++i)
            {
                b[i] = output[i].Samples;
            }

            callback(buffer, a, b, sampleRate);

            for (int i = 0; i < output.Length; ++i)
            {
                using (Audio.RawLock l = new Audio.RawLock(b[i], true, false))
                    ConvertSamples(
                        l,
                        output[i].Info.buffers[Index],
                        output[i].Type,
                        l.Count);
            }
        }
Exemple #2
0
        private void OnBufferSwitch(int Index, ASIOBool Direct)
        {
            Audio.SampleBuffer[] a = new Audio.SampleBuffer[input.Length];
            for (int i = 0; i < input.Length; ++i)
            {
                a[i] = input[i].Samples;

                ConvertSamples(
                    input[i].Info.buffers[Index],
                    input[i].Type,
                    a[i].Raw,
                    a[i].Count);
            }

            Audio.SampleBuffer[] b = new Audio.SampleBuffer[output.Length];
            for (int i = 0; i < output.Length; ++i)
            {
                b[i] = output[i].Samples;
            }

            callback(buffer, a, b, sampleRate);

            for (int i = 0; i < output.Length; ++i)
            {
                ConvertSamples(
                    b[i].Raw,
                    output[i].Info.buffers[Index],
                    output[i].Type,
                    b[i].Count);
            }
        }
Exemple #3
0
        private void OnBufferSwitch(int Index, ASIOBool Direct)
        {
            for (int i = 0; i < input.Length; ++i)
            {
                ConvertSamples(input[i].Info.buffers[Index], input[i].Type, inputBuffers[i]);
            }

            callback(bufferSize, inputBuffers, outputBuffers, sampleRate);

            for (int i = 0; i < output.Length; ++i)
            {
                ConvertSamples(outputBuffers[i], output[i].Info.buffers[Index], output[i].Type);
            }
        }
Exemple #4
0
 private IntPtr OnBufferSwitchTimeInfo(IntPtr _params, int doubleBufferIndex, ASIOBool directProcess)
 {
     return(_params);
 }
Exemple #5
0
 private IntPtr OnBufferSwitchTimeInfo(IntPtr _params, int doubleBufferIndex, ASIOBool directProcess)
 {
     return _params;
 }
Exemple #6
0
        private void OnBufferSwitch(int Index, ASIOBool Direct)
        {
            Audio.SampleBuffer[] a = new Audio.SampleBuffer[input.Length];
            for (int i = 0; i < input.Length; ++i)
            {
                a[i] = input[i].Samples;

                using (Audio.RawLock l = new Audio.RawLock(a[i], false, true))
                    ConvertSamples(
                        input[i].Info.buffers[Index],
                        input[i].Type,
                        l,
                        l.Count);
            }

            Audio.SampleBuffer[] b = new Audio.SampleBuffer[output.Length];
            for (int i = 0; i < output.Length; ++i)
                b[i] = output[i].Samples;

            callback(buffer, a, b, sampleRate);

            for (int i = 0; i < output.Length; ++i)
            {
                using (Audio.RawLock l = new Audio.RawLock(b[i], true, false))
                    ConvertSamples(
                        l,
                        output[i].Info.buffers[Index],
                        output[i].Type,
                        l.Count);
            }
        }