Routes a mono stream to a player's track. Note that trying to route multiple streams to the same track will throw an exception.
Inheritance: IGATAudioThreadStreamClient, IGATTrackContributor
コード例 #1
0
        protected override void Start()
        {
            base.Start();

            if (_stream == null)
            {
                this.enabled = false;
            }

            if (_stream.NbOfChannels != 1)
            {
                this.enabled = false;
                throw new GATException("Only mono streams can be routed to a track. You may use GATAudioThreadStreamSplitter to split an interleaved stream in as many mono streams.");
            }

            GATTrack track = player.GetTrack(trackNumber);

            _streamToTrack = new GATAudioThreadStreamToTrack(track, _stream, exclusive);

            _streamToTrack.Start();
        }
コード例 #2
0
ファイル: StreamToTrackModule.cs プロジェクト: gregzo/G-Audio
        protected override void Start()
        {
            base.Start ();

            if( _stream == null )
            {
                this.enabled = false;
            }

            if( _stream.NbOfChannels != 1 )
            {
                this.enabled = false;
                throw new GATException( "Only mono streams can be routed to a track. You may use GATAudioThreadStreamSplitter to split an interleaved stream in as many mono streams." );
            }

            GATTrack track = player.GetTrack( trackNumber );

            _streamToTrack = new GATAudioThreadStreamToTrack( track, _stream, exclusive );

            _streamToTrack.Start();
        }