Class MockSound

  • All Implemented Interfaces:
    com.badlogic.gdx.audio.Sound, com.badlogic.gdx.utils.Disposable

    public class MockSound
    extends java.lang.Object
    implements com.badlogic.gdx.audio.Sound
    The headless backend does its best to mock elements. This is intended to make code-sharing between server and client as simple as possible.
    • Constructor Summary

      Constructors 
      Constructor Description
      MockSound()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void dispose()  
      long loop()  
      long loop​(float volume)  
      long loop​(float volume, float pitch, float pan)  
      void pause()  
      void pause​(long soundId)  
      long play()  
      long play​(float volume)  
      long play​(float volume, float pitch, float pan)  
      void resume()  
      void resume​(long soundId)  
      void setLooping​(long soundId, boolean looping)  
      void setPan​(long soundId, float pan, float volume)  
      void setPitch​(long soundId, float pitch)  
      void setVolume​(long soundId, float volume)  
      void stop()  
      void stop​(long soundId)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MockSound

        public MockSound()
    • Method Detail

      • play

        public long play()
        Specified by:
        play in interface com.badlogic.gdx.audio.Sound
      • play

        public long play​(float volume)
        Specified by:
        play in interface com.badlogic.gdx.audio.Sound
      • play

        public long play​(float volume,
                         float pitch,
                         float pan)
        Specified by:
        play in interface com.badlogic.gdx.audio.Sound
      • loop

        public long loop()
        Specified by:
        loop in interface com.badlogic.gdx.audio.Sound
      • loop

        public long loop​(float volume)
        Specified by:
        loop in interface com.badlogic.gdx.audio.Sound
      • loop

        public long loop​(float volume,
                         float pitch,
                         float pan)
        Specified by:
        loop in interface com.badlogic.gdx.audio.Sound
      • stop

        public void stop()
        Specified by:
        stop in interface com.badlogic.gdx.audio.Sound
      • pause

        public void pause()
        Specified by:
        pause in interface com.badlogic.gdx.audio.Sound
      • resume

        public void resume()
        Specified by:
        resume in interface com.badlogic.gdx.audio.Sound
      • dispose

        public void dispose()
        Specified by:
        dispose in interface com.badlogic.gdx.utils.Disposable
        Specified by:
        dispose in interface com.badlogic.gdx.audio.Sound
      • stop

        public void stop​(long soundId)
        Specified by:
        stop in interface com.badlogic.gdx.audio.Sound
      • pause

        public void pause​(long soundId)
        Specified by:
        pause in interface com.badlogic.gdx.audio.Sound
      • resume

        public void resume​(long soundId)
        Specified by:
        resume in interface com.badlogic.gdx.audio.Sound
      • setLooping

        public void setLooping​(long soundId,
                               boolean looping)
        Specified by:
        setLooping in interface com.badlogic.gdx.audio.Sound
      • setPitch

        public void setPitch​(long soundId,
                             float pitch)
        Specified by:
        setPitch in interface com.badlogic.gdx.audio.Sound
      • setVolume

        public void setVolume​(long soundId,
                              float volume)
        Specified by:
        setVolume in interface com.badlogic.gdx.audio.Sound
      • setPan

        public void setPan​(long soundId,
                           float pan,
                           float volume)
        Specified by:
        setPan in interface com.badlogic.gdx.audio.Sound