コード例 #1
0
        private static void PrintVoiceInfo(int inputChannels, int outputChannels, SourceVoice sourceVoice)
        {
            float[] channelVolumes = sourceVoice.GetChannelVolumes(inputChannels);
            float[] outputMatrix   = sourceVoice.GetOutputMatrix(inputChannels, outputChannels);

            // volume, channelvolumes, outputmatrix
            Console.WriteLine("Volume:\t\t" + sourceVoice.Volume);
            Console.WriteLine("VolumeLevels:");
            PrintArray(channelVolumes);
            Console.WriteLine("OutputMatrix:");
            PrintArray(outputMatrix);
            float c1 = 0, c2 = 0;

            for (int i = 0; i < outputMatrix.Length / 2; i++)
            {
                c1 += outputMatrix[i];
                c2 += outputMatrix[i + outputMatrix.Length / 2];
            }
            Console.WriteLine("Sum OM: ({0}, {1})", c1, c2);
            Console.WriteLine("--------------------------------------------------------");
        }
コード例 #2
0
        private static void PrintVoiceInfo(int inputChannels, int outputChannels, SourceVoice sourceVoice)
        {
            float[] channelVolumes = sourceVoice.GetChannelVolumes(inputChannels);
            float[] outputMatrix = sourceVoice.GetOutputMatrix(inputChannels, outputChannels);

            // volume, channelvolumes, outputmatrix
            Console.WriteLine("Volume:\t\t" + sourceVoice.Volume);
            Console.WriteLine("VolumeLevels:");
            PrintArray(channelVolumes);
            Console.WriteLine("OutputMatrix:");
            PrintArray(outputMatrix);
            float c1 = 0, c2 = 0;
            for (int i = 0; i < outputMatrix.Length / 2; i++)
            {
                c1 += outputMatrix[i];
                c2 += outputMatrix[i + outputMatrix.Length / 2];
            }
            Console.WriteLine("Sum OM: ({0}, {1})", c1, c2);
            Console.WriteLine("--------------------------------------------------------");
        }