public AudioStream.Builder GetStreamBuilder()
        {
            AudioStream stream = _audioStreamPool.Get <AudioStream>();

            var builder = new AudioStream.Builder(stream);

            builder.SetOnComplete(() =>
            {
                _audioStreamPool.Return(stream.gameObject);
            });

            return(builder);
        }
Example #2
0
        public static AudioStream.Builder GetBuilder(AudioSource source)
        {
            var builder = new AudioStream.Builder(AudioStream.CreateFromSource(source));

            return(builder);
        }