コード例 #1
0
ファイル: Program.cs プロジェクト: Grawp/opentx
        void Go()
        {
            int samplerate = 16000;
            int bits = 16;  // 8 or 16
            int channels = 1;  // 1 or 2

            filewriter = new WavFileWriter("out.wav", samplerate, bits, channels);

            WaveFormat fmt = new WaveFormat(samplerate, bits, channels);

            // devicenumber, wavformat, buffersize, callback
            int buffersize = 16384;
            WaveInRecorder rec = new WaveInRecorder(-1, fmt, buffersize, this.DataArrived);
            tmparray = new byte[buffersize];

            Console.WriteLine("Recording - press Enter to end");
            Console.ReadLine();
            rec.Close();

            filewriter.Close();

            Console.WriteLine("Bye");
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: j1top/opentx-1
        void Go()
        {
            int samplerate = 16000;
            int bits       = 16; // 8 or 16
            int channels   = 1;  // 1 or 2

            filewriter = new WavFileWriter("out.wav", samplerate, bits, channels);

            WaveFormat fmt = new WaveFormat(samplerate, bits, channels);

            // devicenumber, wavformat, buffersize, callback
            int            buffersize = 16384;
            WaveInRecorder rec        = new WaveInRecorder(-1, fmt, buffersize, this.DataArrived);

            tmparray = new byte[buffersize];

            Console.WriteLine("Recording - press Enter to end");
            Console.ReadLine();
            rec.Close();

            filewriter.Close();

            Console.WriteLine("Bye");
        }