Ejemplo n.º 1
0
        public void DifferentStartPlaying()
        {
            switch (this.enum1_0)
            {
            case AudioStatus.ShouldStartAudio:
                return;

            case AudioStatus.IsCurrentlyPlayingAudio:
                Class119.alSourcePlay(this.intptr_1);
                this.stopwatch_0.Start();
                this.enum1_0 = AudioStatus.ShouldStartAudio;
                return;

            default:
            {
                while (Class119.smethod_4(this.intptr_1, Enum11.const_5) > 0)
                {
                    Class119.smethod_6(this.intptr_1);
                }
                IntPtr[] array = this.intptr_2;
                for (int i = 0; i < array.Length; i++)
                {
                    IntPtr intPtr = array[i];
                    int    num;
                    lock (this.stream1_0)
                    {
                        num = this.stream1_0.vmethod_3(this.intptr_0, this.int_1);
                    }
                    Class119.alBufferData(intPtr, this.enum12_0, this.intptr_0, num, this.int_0);
                }
                Class119.alSourceQueueBuffers(this.intptr_1, this.intptr_2.Length, this.intptr_2);
                if (!this.bool_1)
                {
                    ThreadPool.QueueUserWorkItem(new WaitCallback(this.method_3));
                }
                Class119.alSourcef(this.intptr_1, Enum10.const_4, 0f);
                Class119.alSourcePlay(this.intptr_1);
                this.stopwatch_0.Start();
                this.enum1_0 = AudioStatus.ShouldStartAudio;
                this.method_0();
                return;
            }
            }
        }