Class MockAudio

  • All Implemented Interfaces:
    com.badlogic.gdx.Audio

    public class MockAudio
    extends java.lang.Object
    implements com.badlogic.gdx.Audio
    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
      MockAudio()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String[] getAvailableOutputDevices()  
      com.badlogic.gdx.audio.AudioDevice newAudioDevice​(int samplingRate, boolean isMono)  
      com.badlogic.gdx.audio.AudioRecorder newAudioRecorder​(int samplingRate, boolean isMono)  
      com.badlogic.gdx.audio.Music newMusic​(com.badlogic.gdx.files.FileHandle file)  
      com.badlogic.gdx.audio.Sound newSound​(com.badlogic.gdx.files.FileHandle fileHandle)  
      boolean switchOutputDevice​(java.lang.String deviceIdentifier)  
      • Methods inherited from class java.lang.Object

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

      • MockAudio

        public MockAudio()
    • Method Detail

      • newAudioDevice

        public com.badlogic.gdx.audio.AudioDevice newAudioDevice​(int samplingRate,
                                                                 boolean isMono)
        Specified by:
        newAudioDevice in interface com.badlogic.gdx.Audio
      • newAudioRecorder

        public com.badlogic.gdx.audio.AudioRecorder newAudioRecorder​(int samplingRate,
                                                                     boolean isMono)
        Specified by:
        newAudioRecorder in interface com.badlogic.gdx.Audio
      • newSound

        public com.badlogic.gdx.audio.Sound newSound​(com.badlogic.gdx.files.FileHandle fileHandle)
        Specified by:
        newSound in interface com.badlogic.gdx.Audio
      • newMusic

        public com.badlogic.gdx.audio.Music newMusic​(com.badlogic.gdx.files.FileHandle file)
        Specified by:
        newMusic in interface com.badlogic.gdx.Audio
      • switchOutputDevice

        public boolean switchOutputDevice​(java.lang.String deviceIdentifier)
        Specified by:
        switchOutputDevice in interface com.badlogic.gdx.Audio
      • getAvailableOutputDevices

        public java.lang.String[] getAvailableOutputDevices()
        Specified by:
        getAvailableOutputDevices in interface com.badlogic.gdx.Audio