Esempio n. 1
0
    public void Pause(string name)
    {
        Sound s = Array.Find(sounds, sound => sound.name == name);

        if (s == null)
        {
            Debug.LogWarning("Sound: " + name + "Can't be stopped");
            return;
        }
        AndroidNativeAudio.pause(s.stream);
    }
Esempio n. 2
0
    void ModifySound()
    {
        // These aren't necessary, but show how you could work with a loaded sound.

        AndroidNativeAudio.pause(SoundID);
        AndroidNativeAudio.resume(SoundID);
        AndroidNativeAudio.stop(SoundID);

        AndroidNativeAudio.pauseAll();
        AndroidNativeAudio.resumeAll();

        AndroidNativeAudio.setVolume(SoundID, 0.5f);
        AndroidNativeAudio.setLoop(SoundID, 3);
        AndroidNativeAudio.setPriority(SoundID, 5);
        AndroidNativeAudio.setRate(SoundID, 0.75f);
    }