/// <summary> /// Wraps audio data in a looping container. Set NumberOfLoops to -1 for infinite looping. /// 0 for no loop. Pass a GATFixedPanInfo or GATDynamicPanInfo object if you intend to route /// playback directly to the player ( as opposed to through a track ). /// </summary> public GATLoopedSample( IGATDataOwner dataOwner, int numberOfLoops = -1, AGATPanInfo panInfo = null ) : base(dataOwner, panInfo) { if( numberOfLoops != 0 ) { Loop = true; } NumberOfLoops = numberOfLoops; }
public IGATBufferedSampleOptions PlayScheduled( GATPlayer player, double dspTime, AGATPanInfo panInfo, float gain = 1f, GATPlayer.OnShouldMixSample mixCallback = null ) { UpdateAudioData(); return player.PlayDataScheduled( _audioData, dspTime, panInfo, gain, mixCallback ); //Only use AudioData property when playing, as it updates }
public IGATBufferedSampleOptions Play( AGATPanInfo panInfo, float gain = 1f, GATPlayer.OnShouldMixSample mixCallback = null ) { UpdateAudioData(); return GATManager.DefaultPlayer.PlayData( _audioData, panInfo, gain, mixCallback ); //Only use AudioData property when playing, as it updates }
/// <summary> /// Data owners include IGATProcessedSample and GATData obects. /// Specify a GATDynamicPanInfo or GATFixedPanInfo object to /// enable routing playback directly to the player ( not through tracks ). /// </summary> public AGATWrappedSample( IGATDataOwner dataOwner, AGATPanInfo ipaninfo = null ) { panInfo = ipaninfo; _dataOwner = dataOwner; }