Пример #1
0
        /// <summary>
        /// Plays the sample through the specified player's track trackNb
        /// </summary>
        public void PlayScheduledThroughTrack(GATPlayer player, double dspTime, int trackNb, float gain = 1f)
        {
            if (PlayingStatus != Status.ReadyToPlay)
            {
                return;
            }

            PlayingStatus = Status.Scheduled;
            player.PlayDataScheduled(_dataOwner.AudioData, dspTime, trackNb, gain, PlayerWillMixSample);
            _endDspTime = dspTime + MaxDuration;
        }
Пример #2
0
        /// <summary>
        /// Plays the sample directly through the specified player.
        /// If no AGATPanInfo reference was specified when creating the instance,
        /// doesn't do anything.
        /// </summary>
        public void PlayScheduled(GATPlayer player, double dspTime, float gain = 1f)
        {
            if (panInfo == null)
            {
                                #if GAT_DEBUG
                Debug.LogWarning("No panInfo set!");
                return;
                                #endif
            }
            if (PlayingStatus != Status.ReadyToPlay)
            {
                return;
            }

            PlayingStatus = Status.Scheduled;
            player.PlayDataScheduled(_dataOwner.AudioData, dspTime, panInfo, gain, PlayerWillMixSample);
            _endDspTime = dspTime + MaxDuration;
        }
Пример #3
0
 public IGATBufferedSampleOptions PlayScheduled(GATPlayer player, double dspTime, int trackNb, float gain = 1f, GATPlayer.OnShouldMixSample mixCallback = null)
 {
     UpdateAudioData();
     return(player.PlayDataScheduled(_audioData, dspTime, trackNb, gain, mixCallback));                  //Only use AudioData property when playing, as it updates
 }