Esempio n. 1
0
        public void StartAudioOutput(Discord.Audio.AudioInStream audioInStream)
        {
            AudioInStream = audioInStream;

            // 音声出力用のオーディオグラフ入力ノードを作成
            // Note: Channels = 2 かつ BitRateがDisocrdに合わせて16bitじゃなきゃダメ
            #region DO NOT TOUCH

            _FrameInputNode = _AudioGraph.CreateFrameInputNode(
                AudioEncodingProperties.CreatePcm(
                    OpusConvertConstants.SamplingRate,
                    OpusConvertConstants.Channels,
                    16
                    ));

            #endregion

            // デフォルトの出力ノードに接続
            _FrameInputNode.AddOutgoingConnection(_OutputNode);


            _FrameInputNode.QuantumStarted += FrameInputNode_QuantumStarted;

            _FrameInputNode.Start();

            _AudioGraph.Start();
        }
Esempio n. 2
0
 public StreamPair(AudioInStream reader, AudioOutStream writer)
 {
     Reader = reader;
     Writer = writer;
 }
Esempio n. 3
0
 public void StartAudioOutput(Discord.Audio.AudioInStream audioInStream)
 {
     Output.StartAudioOutput(audioInStream);
 }