void OnEnable() { if (_streamToTrack != null) { _streamToTrack.Start(); } }
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(); }
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(); }