Class SDL_AudioSpec


  • @FieldOrder({"freq","format","channels","silence","samples","padding","size","callback","userdata"})
    public final class SDL_AudioSpec
    extends com.sun.jna.Structure

    The calculated values in this structure are calculated by SDL_OpenAudio().

    For multi-channel audio, the default SDL channel mapping is:

      2:  FL FR                       (stereo)
      3:  FL FR LFE                   (2.1 surround)
      4:  FL FR BL BR                 (quad)
      5:  FL FR LFE BL BR             (4.1 surround)
      6:  FL FR FC LFE SL SR          (5.1 surround - last two can also be BL BR)
      7:  FL FR FC LFE BC SL SR       (6.1 surround)
      8:  FL FR FC LFE BL BR SL SR    (7.1 surround)
     
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.sun.jna.Structure

        com.sun.jna.Structure.ByReference, com.sun.jna.Structure.ByValue, com.sun.jna.Structure.FieldOrder, com.sun.jna.Structure.StructField
    • Field Summary

      Fields 
      Modifier and Type Field Description
      SDL_AudioCallback callback
      Callback that feeds the audio device (NULL to use SDL_QueueAudio()).
      byte channels
      Number of channels: 1 mono, 2 stereo
      SDL_AudioFormat format
      Audio data format
      int freq
      DSP frequency -- samples per second
      short padding
      Necessary for some compile environments
      short samples
      Audio buffer size in sample FRAMES (total samples divided by channel count)
      byte silence
      Audio buffer silence value (calculated)
      int size
      Audio buffer size in bytes (calculated)
      com.sun.jna.Pointer userdata
      Userdata passed to callback (ignored for NULL callbacks).
      • Fields inherited from class com.sun.jna.Structure

        ALIGN_DEFAULT, ALIGN_GNUC, ALIGN_MSVC, ALIGN_NONE, CALCULATE_SIZE
    • Method Summary

      • Methods inherited from class com.sun.jna.Structure

        allocateMemory, allocateMemory, autoAllocate, autoRead, autoRead, autoWrite, autoWrite, cacheTypeInfo, calculateSize, clear, createFieldsOrder, createFieldsOrder, createFieldsOrder, createFieldsOrder, dataEquals, dataEquals, ensureAllocated, equals, fieldOffset, getAutoRead, getAutoWrite, getFieldList, getFieldOrder, getFields, getNativeAlignment, getNativeSize, getNativeSize, getPointer, getStringEncoding, getStructAlignment, hashCode, newInstance, newInstance, read, readField, readField, setAlignType, setAutoRead, setAutoSynch, setAutoWrite, setStringEncoding, size, sortFields, toArray, toArray, toString, toString, useMemory, useMemory, write, writeField, writeField, writeField
    • Field Detail

      • freq

        public int freq
        DSP frequency -- samples per second
      • channels

        public byte channels
        Number of channels: 1 mono, 2 stereo
      • silence

        public byte silence
        Audio buffer silence value (calculated)
      • samples

        public short samples
        Audio buffer size in sample FRAMES (total samples divided by channel count)
      • padding

        public short padding
        Necessary for some compile environments
      • size

        public int size
        Audio buffer size in bytes (calculated)
      • callback

        public SDL_AudioCallback callback
        Callback that feeds the audio device (NULL to use SDL_QueueAudio()).
      • userdata

        public com.sun.jna.Pointer userdata
        Userdata passed to callback (ignored for NULL callbacks).
    • Constructor Detail

      • SDL_AudioSpec

        public SDL_AudioSpec()
      • SDL_AudioSpec

        public SDL_AudioSpec​(com.sun.jna.Pointer p)