Esempio n. 1
0
        /// <summary>
        /// Constructs a new instance of a <see cref="SoundIoAudioTrack"/>
        /// </summary>
        /// <param name="trackId">The track ID</param>
        /// <param name="audioContext">The SoundIO audio context</param>
        /// <param name="audioDevice">The SoundIO audio device</param>
        public SoundIoAudioTrack(int trackId, SoundIO audioContext, SoundIODevice audioDevice)
        {
            TrackID         = trackId;
            AudioContext    = audioContext;
            AudioDevice     = audioDevice;
            State           = PlaybackState.Stopped;
            ReleasedBuffers = new ConcurrentQueue <long>();

            m_Buffer          = new SoundIoRingBuffer();
            m_ReservedBuffers = new ConcurrentQueue <SoundIoBuffer>();
        }