SoundDescriptorImpl (Media Authoring with Java API)
Date: 2016-02-05

tv.amwa.maj.model.impl

## Class SoundDescriptorImpl

- java.lang.Object
- - tv.amwa.maj.model.impl.InterchangeObjectImpl
  - - tv.amwa.maj.model.impl.EssenceDescriptorImpl
    - - tv.amwa.maj.model.impl.AAFFileDescriptorImpl
      - - tv.amwa.maj.model.impl.SoundDescriptorImpl

- All Implemented Interfaces:
    Serializable, Cloneable, QAAFFileDescriptor, MediaEntity, MetadataObject, AAFFileDescriptor, EssenceDescriptor, InterchangeObject, SoundDescriptor
  Direct Known Subclasses:
    WAVEPCMDescriptorImpl

      @MediaClass(uuid1=218169601,
                  uuid2=257,
                  uuid3=16896,
                  uuid4={6,14,43,52,2,6,1,1},
                  definedName="SoundDescriptor",
                  description="The SoundDescriptor class specifies that a File SourcePackage is associated with audio essence.",
                  symbol="SoundDescriptor")
      public class SoundDescriptorImpl
      extends AAFFileDescriptorImpl
      implements SoundDescriptor, Serializable, Cloneable

  Implements the description of a file source package that is associated with audio essence.

  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class tv.amwa.maj.model.impl.InterchangeObjectImpl

      `ObjectClassPropertyID`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SoundDescriptorImpl()` Default constructor is not public to avoid unset required fields.
    `SoundDescriptorImpl(ContainerDefinition containerFormat, Rational audioSampleRate, int channels, int quantizationBits)` Creates and initializes a new sound descriptor, which specifies that a `file source package` is associated with audio essence.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `SoundDescriptor` | `clone()` Create a cloned copy of this interchange object.
    `byte` | `getAudioReferenceLevel()` Returns the audio reference level of this sound descriptor.
    `Rational` | `getAudioSampleRate()` Returns the audio sampling rate of audio essence described by this sound descriptor.
    `String` | `getAudioSampleRateString()`
    `int` | `getChannelCount()` Returns the number of audio channels described by this sound descriptor.
    `byte` | `getDialNorm()` Returns the dial norm property of this sound descriptor, which specifies the gain to be applied to normalize perceived loudness of the sound, as defined by ITU-R Recommendation BS.1196 (1dB per step).
    `ElectroSpatialFormulation` | `getElectrospatialFormulation()` Returns the electro-spatial formulation of the signal described by this sound descriptor.
    `boolean` | `getLocked()` Returns the locked flag for the audio essence described by this sound descriptor, which indicates whether the number of samples per frame is locked.
    `int` | `getQuantizationBits()` Returns the number of quantization bits used for the audio essence described by this sound descriptor.
    `AUID` | `getSoundCompression()` Returns he kind of compression and format of compression information of this sound essence data.
    `String` | `getSoundCompressionString()`
    `static Rational` | `initializeAudioSampleRate()`
    `static int` | `initializeChannelCount()`
    `static int` | `initializeQuantizationBits()`
    `boolean` | `isLocked()` Returns the locked flag for the audio essence described by this sound descriptor, which indicates whether the number of samples per frame is locked.
    `void` | `setAudioReferenceLevel(Byte audioReferenceLevel)` Sets the audio reference level of the audio essence described by this sound descriptor.
    `void` | `setAudioSampleRate(Rational rate)` Sets the audio sampling rate of audio essence described by this sound descriptor.
    `void` | `setAudioSampleRateString(String audioSampleRate)`
    `void` | `setChannelCount(int channelCount)` Sets the number of audio channels described by this sound descriptor.
    `void` | `setDialNorm(Byte dialNorm)` Sets the dial norm of this sound descriptor, which specifies the gain to be applied to normalize perceived loudness of the sound, as defined by ITU-R Recommendation BS.1196 (1dB per step).
    `void` | `setElectrospatialFormulation(ElectroSpatialFormulation formulation)` Sets the electro-spatial formulation of the signal of the audio essence described by this sound descriptor.
    `void` | `setIsLocked(Boolean locked)` Sets the locked flag for the audio essence described this sound descriptor, which indicates whether the number of samples per frame is locked.
    `void` | `setQuantizationBits(int bitsCount)` Sets the number of quantization bits used for the audio essence described by this sound descriptor.
    `void` | `setSoundCompression(AUID soundCompression)` Sets the kind of compression and format of compression information of this sound essence data.
    `void` | `setSoundCompressionString(String soundCompression)`

    - ### Methods inherited from class tv.amwa.maj.model.impl.AAFFileDescriptorImpl

      `describesStaticEssence, getCodec, getContainerFormat, getEssenceLength, getLinkedTrackID, getSampleRate, getSampleRateString, getTwentyFourBitAudio, initializeEssenceLength, initializeSampleRate, setCodec, setContainerFormat, setDescribesStaticEssence, setDescribesTimeVaryingEssence, setEssenceLength, setEssenceLengthFromStream, setLinkedTrackID, setSampleRate, setSampleRateFromStream, setSampleRateString, setTwentyFourBitAudio`

    - ### Methods inherited from class tv.amwa.maj.model.impl.EssenceDescriptorImpl

      `appendLocator, appendSubDescriptor, clearLocators, clearSubDescriptors, countLocators, countSubDescriptors, getComment, getLocatorAt, getLocators, getSubDescriptorAt, getSubDescriptors, insertLocatorAt, insertSubDescriptorAt, prependLocator, prependSubDescriptor, removeLocatorAt, removeSubDescriptorAt`

    - ### Methods inherited from class tv.amwa.maj.model.impl.InterchangeObjectImpl

      `addApplicationPlugin, appendXMLChildren, clearApplicationPlugins, containsApplicationPlugin, containsApplicationPlugin, countApplicationPlugins, deepEquals, disableGenerationTracking, enableGenerationTracking, equals, getApplicationPlugins, getGeneration, getLinkedGenerationID, getLinkedGenerationIDString, getObjectClass, getPersistentID, getPersistentIndex, hashCode, isGenerationTracked, removeApplicationPlugin, removeApplicationPlugin, setLinkedGenerationID, setLinkedGenerationIDString, setObjectClass, setPersistentID, setPersistentIndex, toString`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface tv.amwa.maj.model.AAFFileDescriptor

      `getCodec, getContainerFormat, getEssenceLength, getLinkedTrackID, getSampleRate, setCodec, setContainerFormat, setEssenceLength, setLinkedTrackID, setSampleRate`

    - ### Methods inherited from interface tv.amwa.maj.model.EssenceDescriptor

      `appendLocator, appendSubDescriptor, clearLocators, countLocators, countSubDescriptors, getLocatorAt, getLocators, getSubDescriptorAt, getSubDescriptors, insertLocatorAt, insertSubDescriptorAt, prependLocator, prependSubDescriptor, removeLocatorAt, removeSubDescriptorAt`

    - ### Methods inherited from interface tv.amwa.maj.model.InterchangeObject

      `addApplicationPlugin, clearApplicationPlugins, containsApplicationPlugin, containsApplicationPlugin, countApplicationPlugins, deepEquals, disableGenerationTracking, enableGenerationTracking, equals, getApplicationPlugins, getGeneration, getLinkedGenerationID, getObjectClass, isGenerationTracked, removeApplicationPlugin, removeApplicationPlugin, setLinkedGenerationID, setObjectClass, toString`

    - ### Methods inherited from interface tv.amwa.maj.industry.MediaEntity

      `getPersistentID, setPersistentIndex`

- - ### Constructor Detail

    - #### SoundDescriptorImpl

          public SoundDescriptorImpl()

      Default constructor is not public to avoid unset required fields.

    - #### SoundDescriptorImpl

          public SoundDescriptorImpl(ContainerDefinition containerFormat,
                                     Rational audioSampleRate,
                                     @UInt32
                                     int channels,
                                     @UInt32
                                     int quantizationBits)
                              throws NullPointerException,
                                     IllegalArgumentException

      Creates and initializes a new sound descriptor, which specifies that a `file source package` is associated with audio essence.

      Parameters:
        `containerFormat` - Identifies the container mechanism used to store the essence.
        `audioSampleRate` - Sampling rate of the audio essence.
        `channels` - Number of audio channels.
        `quantizationBits` - Number of quantization bits.
      Throws:
        `NullPointerException` - One or both of the container format and/or sampling rate is `null`.
        `IllegalArgumentException` - The channels and/or quantization bit values are negative.

  - ### Method Detail

    - #### getAudioReferenceLevel

          @MediaProperty(uuid1=67240193,
                         uuid2=768,
                         uuid3=0,
                         uuid4={6,14,43,52,1,1,1,1},
                         definedName="AudioReferenceLevel",
                         aliases="AudioRefLevel",
                         typeName="Int8",
                         optional=true,
                         uniqueIdentifier=false,
                         pid=15620,
                         symbol="AudioReferenceLevel")
          public byte getAudioReferenceLevel()
                                                                                                                                                                                                                                                                                                                                                                                                                                        throws PropertyNotPresentException

      Description copied from interface: `SoundDescriptor`

      Returns the audio reference level of this sound descriptor. This specifies the number of dBm for 0VU. This property is optional.

      Specified by:
        `getAudioReferenceLevel` in interface `SoundDescriptor`
      Returns:
        Audio reference level property of this sound descriptor.
      Throws:
        `PropertyNotPresentException` - The optional audio reference level property is not present in this sound descriptor.

    - #### setAudioReferenceLevel

          @MediaPropertySetter(value="AudioReferenceLevel")
          public void setAudioReferenceLevel(Byte audioReferenceLevel)

      Description copied from interface: `SoundDescriptor`

      Sets the audio reference level of the audio essence described by this sound descriptor. This property specifies the number of dBm for 0VU. Set this optional property to `null` to omit it.

      Specified by:
        `setAudioReferenceLevel` in interface `SoundDescriptor`
      Parameters:
        `audioReferenceLevel` - Audio reference level property of this sound descriptor.

    - #### getAudioSampleRate

          @MediaProperty(uuid1=67240705,
                         uuid2=257,
                         uuid3=0,
                         uuid4={6,14,43,52,1,1,1,5},
                         definedName="AudioSampleRate",
                         aliases="AudioSamplingRate",
                         typeName="Rational",
                         optional=false,
                         uniqueIdentifier=false,
                         pid=15619,
                         symbol="AudioSampleRate")
          public Rational getAudioSampleRate()

      Description copied from interface: `SoundDescriptor`

      Returns the audio sampling rate of audio essence described by this sound descriptor.

      Specified by:
        `getAudioSampleRate` in interface `SoundDescriptor`
      Returns:
        Audio sampling rate of audio essence described by this sound descriptor.

    - #### setAudioSampleRate

          @MediaPropertySetter(value="AudioSampleRate")
          public void setAudioSampleRate(Rational rate)
                                                                                throws NullPointerException

      Description copied from interface: `SoundDescriptor`

      Sets the audio sampling rate of audio essence described by this sound descriptor.

      Specified by:
        `setAudioSampleRate` in interface `SoundDescriptor`
      Parameters:
        `rate` - Audio sampling rate of the audio essence described by this sound descriptor.
      Throws:
        `NullPointerException` - The given audio sampling rate is `null`.

    - #### initializeAudioSampleRate

          public static final Rational initializeAudioSampleRate()

    - #### getChannelCount

          @MediaProperty(uuid1=67240193,
                         uuid2=1024,
                         uuid3=0,
                         uuid4={6,14,43,52,1,1,1,5},
                         definedName="ChannelCount",
                         aliases="Channels",
                         typeName="UInt32",
                         optional=false,
                         uniqueIdentifier=false,
                         pid=15623,
                         symbol="ChannelCount")
          public int getChannelCount()

      Description copied from interface: `SoundDescriptor`

      Returns the number of audio channels described by this sound descriptor.

      Specified by:
        `getChannelCount` in interface `SoundDescriptor`
      Returns:
        Number of audio channels described by this sound descriptor.

    - #### setChannelCount

          @MediaPropertySetter(value="ChannelCount")
          public void setChannelCount(int channelCount)
                                                                          throws IllegalArgumentException

      Description copied from interface: `SoundDescriptor`

      Sets the number of audio channels described by this sound descriptor.

      Specified by:
        `setChannelCount` in interface `SoundDescriptor`
      Parameters:
        `channelCount` - Number of audio channels described by this sound descriptor.
      Throws:
        `IllegalArgumentException` - The given channel count is negative.

    - #### initializeChannelCount

          public static final int initializeChannelCount()

    - #### getSoundCompression

          @MediaProperty(uuid1=67240962,
                         uuid2=0,
                         uuid3=0,
                         uuid4={6,14,43,52,1,1,1,2},
                         definedName="SoundCompression",
                         aliases={"Compression","SoundDescriptorCompression"},
                         typeName="AUID",
                         optional=true,
                         uniqueIdentifier=false,
                         pid=15622,
                         symbol="SoundCompression")
          public AUID getSoundCompression()
                                                                                                                                                                                                                                                                                                                                                                                                                                                          throws PropertyNotPresentException

      Description copied from interface: `SoundDescriptor`

      Returns he kind of compression and format of compression information of this sound essence data. This property is optional.

      Specified by:
        `getSoundCompression` in interface `SoundDescriptor`
      Returns:
        The kind of compression and format of compression for the sound essence data.
      Throws:
        `PropertyNotPresentException` - The optional property is not present in the sound descriptor, indicating that the described sound essence is not compressed.

    - #### setSoundCompression

          @MediaPropertySetter(value="SoundCompression")
          public void setSoundCompression(AUID soundCompression)

      Description copied from interface: `SoundDescriptor`

      Sets the kind of compression and format of compression information of this sound essence data. This property is optional and if the property is not present then the described audio essence is not compressed. Set to `null` to indicate that the described audio essence is not compressed.

      Specified by:
        `setSoundCompression` in interface `SoundDescriptor`
      Parameters:
        `soundCompression` - Kind of compression and format of the compression for this sound essence data.

    - #### getDialNorm

          @MediaProperty(uuid1=67241729,
                         uuid2=0,
                         uuid3=0,
                         uuid4={6,14,43,52,1,1,1,5},
                         definedName="DialNorm",
                         typeName="Int8",
                         optional=true,
                         uniqueIdentifier=false,
                         pid=15628,
                         symbol="DialNorm")
          public byte getDialNorm()
                                                                                                                                                                                                                                                                                                                                                             throws PropertyNotPresentException

      Description copied from interface: `SoundDescriptor`

      Returns the dial norm property of this sound descriptor, which specifies the gain to be applied to normalize perceived loudness of the sound, as defined by ITU-R Recommendation BS.1196 (1dB per step). This property is optional.

      Specified by:
        `getDialNorm` in interface `SoundDescriptor`
      Returns:
        Dial norm property of this sound descriptor.
      Throws:
        `PropertyNotPresentException` - This optional dial norm property is not present in this sound descriptor.

    - #### setDialNorm

          @MediaPropertySetter(value="DialNorm")
          public void setDialNorm(Byte dialNorm)

      Description copied from interface: `SoundDescriptor`

      Sets the dial norm of this sound descriptor, which specifies the gain to be applied to normalize perceived loudness of the sound, as defined by ITU-R Recommendation BS.1196 (1dB per step). Set this optional property to `null` to omit it.

      Specified by:
        `setDialNorm` in interface `SoundDescriptor`
      Parameters:
        `dialNorm` - Dial norm property of the sound descriptor.

    - #### getElectrospatialFormulation

          @MediaProperty(uuid1=67240193,
                         uuid2=256,
                         uuid3=0,
                         uuid4={6,14,43,52,1,1,1,1},
                         definedName="ElectrospatialFormulation",
                         aliases={"ElectroSpatial","ElectroSpatialFormulation"},
                         typeName="ElectroSpatialFormulation",
                         optional=true,
                         uniqueIdentifier=false,
                         pid=15621,
                         symbol="ElectrospatialFormulation")
          public ElectroSpatialFormulation getElectrospatialFormulation()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   throws PropertyNotPresentException

      Description copied from interface: `SoundDescriptor`

      Returns the electro-spatial formulation of the signal described by this sound descriptor. This property is optional.

      Possible values for the electo-spatial formulation include:

      - `ElectroSpatialFormulation.MultiChannelMode`
      - `ElectroSpatialFormulation.TwoChannelMode`
      - `ElectroSpatialFormulation.SingleChannelMode`
      Specified by:
        `getElectrospatialFormulation` in interface `SoundDescriptor`
      Returns:
        Electro-spatial formulation of the signal of this sound descriptor.
      Throws:
        `PropertyNotPresentException` - The optional electro-spatial formulation property is not present in this sound descriptor.

    - #### setElectrospatialFormulation

          @MediaPropertySetter(value="ElectrospatialFormulation")
          public void setElectrospatialFormulation(ElectroSpatialFormulation formulation)

      Description copied from interface: `SoundDescriptor`

      Sets the electro-spatial formulation of the signal of the audio essence described by this sound descriptor. Set this optional property to `null` to omit it.

      Possible values for the electo-spatial formulation include:

      - `ElectroSpatialFormulation.MultiChannelMode`
      - `ElectroSpatialFormulation.TwoChannelMode`
      - `ElectroSpatialFormulation.SingleChannelMode`
      Specified by:
        `setElectrospatialFormulation` in interface `SoundDescriptor`
      Parameters:
        `formulation` - Electro-spatial formulation of the signal described by this sound descriptor.

    - #### getQuantizationBits

          @MediaProperty(uuid1=67240707,
                         uuid2=1024,
                         uuid3=0,
                         uuid4={6,14,43,52,1,1,1,4},
                         definedName="QuantizationBits",
                         typeName="UInt32",
                         optional=false,
                         uniqueIdentifier=false,
                         pid=15617,
                         symbol="QuantizationBits")
          public int getQuantizationBits()

      Description copied from interface: `SoundDescriptor`

      Returns the number of quantization bits used for the audio essence described by this sound descriptor.

      Specified by:
        `getQuantizationBits` in interface `SoundDescriptor`
      Returns:
        Number of quantization bits of this sound descriptor.

    - #### setQuantizationBits

          @MediaPropertySetter(value="QuantizationBits")
          public void setQuantizationBits(int bitsCount)
                                                                                  throws IllegalArgumentException

      Description copied from interface: `SoundDescriptor`

      Sets the number of quantization bits used for the audio essence described by this sound descriptor.

      Specified by:
        `setQuantizationBits` in interface `SoundDescriptor`
      Parameters:
        `bitsCount` - Number of quantization bits of this sound descriptor.
      Throws:
        `IllegalArgumentException` - The given quantization bits value is negative.

    - #### initializeQuantizationBits

          public static final int initializeQuantizationBits()

    - #### isLocked

          public boolean isLocked()
                           throws PropertyNotPresentException

      Description copied from interface: `SoundDescriptor`

      Returns the locked flag for the audio essence described by this sound descriptor, which indicates whether the number of samples per frame is locked. This property is optional.

      Specified by:
        `isLocked` in interface `SoundDescriptor`
      Returns:
        Are the number of samples per frame locked?
      Throws:
        `PropertyNotPresentException` - The optional locked property is not present in this sound descriptor.
      See Also:
        `SoundDescriptor.getLocked()`

    - #### getLocked

          @MediaProperty(uuid1=67240705,
                         uuid2=1024,
                         uuid3=0,
                         uuid4={6,14,43,52,1,1,1,4},
                         definedName="Locked",
                         typeName="Boolean",
                         optional=true,
                         uniqueIdentifier=false,
                         pid=15618,
                         symbol="Locked")
          public boolean getLocked()
                                                                                                                                                                                                                                                                                                                                                                throws PropertyNotPresentException

      Description copied from interface: `SoundDescriptor`

      Returns the locked flag for the audio essence described by this sound descriptor, which indicates whether the number of samples per frame is locked. This property is optional.

      Specified by:
        `getLocked` in interface `SoundDescriptor`
      Returns:
        Are the number of samples per frame locked?
      Throws:
        `PropertyNotPresentException` - The optional locked property is not present in this sound descriptor.
      See Also:
        `SoundDescriptor.isLocked()`

    - #### setIsLocked

          @MediaPropertySetter(value="Locked")
          public void setIsLocked(Boolean locked)

      Description copied from interface: `SoundDescriptor`

      Sets the locked flag for the audio essence described this sound descriptor, which indicates whether the number of samples per frame is locked. Set this optional property to `null` to omit it.

      Specified by:
        `setIsLocked` in interface `SoundDescriptor`
      Parameters:
        `locked` - Are the number of samples per frame locked?

    - #### clone

          public SoundDescriptor clone()

      Description copied from interface: `InterchangeObject`

      Create a cloned copy of this interchange object.

      Specified by:
        `clone` in interface `MediaEntity`
      Specified by:
        `clone` in interface `AAFFileDescriptor`
      Specified by:
        `clone` in interface `EssenceDescriptor`
      Specified by:
        `clone` in interface `InterchangeObject`
      Specified by:
        `clone` in interface `SoundDescriptor`
      Overrides:
        `clone` in class `AAFFileDescriptorImpl`
      Returns:
        Cloned copy of this interchange object.

    - #### getAudioSampleRateString

          public String getAudioSampleRateString()

    - #### setAudioSampleRateString

          public void setAudioSampleRateString(String audioSampleRate)

    - #### getSoundCompressionString

          public String getSoundCompressionString()

    - #### setSoundCompressionString

          public void setSoundCompressionString(String soundCompression)

(c)2007-2016 Richard Cartwright, all rights reserved. Licensed under Apache 2 license and subject to the AMWA IPR policy.