Пример #1
0
        /// <summary>
        /// Immediately stop a specific played sound.
        /// [iOS] One of the total 32 OpenAL sources will stop.
        /// [Android] One of all AudioTrack will stop.
        /// </summary>
        public void Stop()
        {
#if UNITY_IOS
            NativeAudio._StopAudio(instanceIndex);
#elif UNITY_ANDROID
            NativeAudio.AndroidNativeAudio.CallStatic(NativeAudio.AndroidStopAudio, instanceIndex);
#endif
        }
        /// <summary>
        /// Immediately stop a source that was used to play the sound.
        /// [iOS] One of all OpenAL sources that was used to play this sound will stop.
        /// [Android] One of all SLAndroidSimpleBufferQueue that was used to play this sound will stop.
        /// </summary>
        public void Stop()
        {
#if UNITY_IOS
            NativeAudio._StopAudio(InstanceIndex);
#elif UNITY_ANDROID
            NativeAudio.stopAudio(InstanceIndex);
#endif
        }
        /// <summary>
        /// Immediately stop a source that was selected to play the sound.
        /// [iOS] One of all OpenAL sources that was used to play this sound will stop.
        /// [Android] One of all SLAndroidSimpleBufferQueue that was used to play this sound will stop.
        /// </summary>
        public void Stop()
        {
            AssertInitialized();
#if UNITY_IOS
            NativeAudio._StopAudio(InstanceIndex);
#elif UNITY_ANDROID
            NativeAudio.stopAudio(InstanceIndex);
#endif
        }