コード例 #1
0
 public void Start()
 {
     if (_audioGrabber != null)
     {
         _audioGrabber.Start();
     }
 }
コード例 #2
0
    public void Init(RobotInfo ifo)
    {
        _ifo = ifo;
        //Create audio streaming
        _audioStreamer = TargetNode.AddComponent <GstAppNetAudioStreamer> ();
        //_audioStreamer.SetChannels(1);

        AudioStreamPort = Settings.Instance.GetPortValue("AudioStreamPort", AudioStreamPort);
        string ip = Settings.Instance.GetValue("Ports", "ReceiveHost", _ifo.IP);

        Debug.Log("Streaming audio to:" + AudioStreamPort.ToString());
        //_audioStreamer.AddClient (ip, AudioStreamPort);
        _audioStreamer.SetIP(ip, (uint)AudioStreamPort);
        _audioStreamer.AttachGrabber(grabber);
        _audioStreamer.CreateStream();
        grabber.Start();
        _audioStreamer.Stream();
        RobotConnector.Connector.SendData(TxKitMouth.ServiceName, "AudioParameters", "", false, true);
    }