org.tritonus.share.sampled
Class AudioFormats
java.lang.Object
org.tritonus.share.sampled.AudioFormats
- public class AudioFormats
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AudioFormats
public AudioFormats()
matches
public static boolean matches(AudioFormat format1,
AudioFormat format2)
- Tests whether 2 AudioFormats have matching formats.
A field matches when it is AudioSystem.NOT_SPECIFIED in
at least one of the formats or the field is the same
in both formats.
Exceptions:
- Encoding must always be equal for a match.
- For a match, endianness must be equal if SampleSizeInBits is not
AudioSystem.NOT_SPECIFIED and greater than 8bit in both formats.
In other words: If SampleSizeInBits is AudioSystem.NOT_SPECIFIED
in either format or both formats have a SampleSizeInBits<8,
endianness does not matter.
This is a proposition to be used as AudioFormat.matches.
It can therefore be considered as a temporary workaround.
equals
public static boolean equals(AudioFormat format1,
AudioFormat format2)
- Tests for exact equality of 2 AudioFormats.
This is the behaviour of AudioFormat.matches in JavaSound 1.0.
This is a proposition to be used as AudioFormat.equals.
It can therefore be considered as a temporary workaround.