Beispiel #1
0
 private void ResetLocalState()
 {
     strStopReq     = StopRequest.Immediately;
     IsStreamed     = false;
     streamProvider = null;
     IsStopped      = false;
 }
Beispiel #2
0
        private void ResetLocalState()
        {
            lock (this.strLock)
            {
                this.strStopReq     = StopRequest.Immediately;
                this.isStreamed     = false;
                this.streamProvider = null;

                this.ReleaseStreamBuffers();
            }
        }
Beispiel #3
0
        public void Initialize(int outputCount, IAudioStreamProvider provider)
        {
            _channelsCount  = outputCount;
            _streamProvider = provider;

            _channels = new AudioChannel[_channelsCount];
            for (int i = 0; i < _channelsCount; ++i)
            {
                _channels[i] = new AudioChannel();
            }
        }
		void INativeAudioSource.Play(IAudioStreamProvider streamingProvider)
		{
			lock (this.strLock)
			{
				if (!this.isInitial) throw new InvalidOperationException("Native audio source already in use. To re-use an audio source, reset it first.");
				this.isInitial = false;

				this.isStreamed = true;
				this.strStopReq = StopRequest.None;
				this.streamProvider = streamingProvider;
				AudioBackend.ActiveInstance.EnqueueForStreaming(this);
			}
		}
Beispiel #5
0
        void INativeAudioSource.Play(IAudioStreamProvider streamingProvider)
        {
            lock (this.strLock)
            {
                if (!this.isInitial)
                {
                    throw new InvalidOperationException("Native audio source already in use. To re-use an audio source, reset it first.");
                }
                this.isInitial = false;

                this.isStreamed     = true;
                this.strStopReq     = StopRequest.None;
                this.streamProvider = streamingProvider;
                AudioBackend.ActiveInstance.EnqueueForStreaming(this);
            }
        }
		private void ResetLocalState()
		{
			lock (this.strLock)
			{
				this.strStopReq = StopRequest.Immediately;
				this.isStreamed = false;
				this.streamProvider = null;

				this.ReleaseStreamBuffers();
			}
		}
 void INativeAudioSource.Play(IAudioStreamProvider streamingProvider)
 {
     this.initial = false;
 }
		void INativeAudioSource.Play(IAudioStreamProvider streamingProvider)
		{
			this.initial = false;
		}
Beispiel #9
0
 public void Initialize(int blockSize, IAudioStreamProvider provider)
 {
     Samples         = new double[blockSize];
     _streamProvider = provider;
 }