Class BaseAudioDevice.AudioSettings

  • Enclosing class:
    BaseAudioDevice

    public static class BaseAudioDevice.AudioSettings
    extends java.lang.Object
    Defines the format of the audio when a custom audio driver is used.
    • Constructor Summary

      Constructors 
      Constructor Description
      AudioSettings​(int sampleRate, int numChannels)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getNumChannels()
      Returns the number of audio channels.
      int getSampleRate()
      Returns the sample rate (in samples per second).
      void setNumChannels​(int numChannels)
      Sets the number of audio channels.
      void setSampleRate​(int sampleRate)
      Sets the sample rate (in samples per second).
      • Methods inherited from class java.lang.Object

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

      • AudioSettings

        public AudioSettings​(int sampleRate,
                             int numChannels)
    • Method Detail

      • getSampleRate

        public int getSampleRate()
        Returns the sample rate (in samples per second).
      • getNumChannels

        public int getNumChannels()
        Returns the number of audio channels.
      • setSampleRate

        public void setSampleRate​(int sampleRate)
        Sets the sample rate (in samples per second). For example, set this to 32000 for 32 kHz. Specify a sample rate of 44.1, 32, 16, or 8 kHz (441000, 32000, 16000, or 8000).

        Currently, the only available sample format is signed 16-bit integer PCM.

      • setNumChannels

        public void setNumChannels​(int numChannels)
        Sets the number of audio channels.