Java Code Examples for javax.sound.sampled.AudioFormat.Encoding#PCM_UNSIGNED

The following examples show how to use javax.sound.sampled.AudioFormat.Encoding#PCM_UNSIGNED . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AudioFloatFormatConverter.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public Encoding[] getTargetEncodings(AudioFormat sourceFormat) {
    if (AudioFloatConverter.getConverter(sourceFormat) == null)
        return new Encoding[0];
    return new Encoding[] { Encoding.PCM_SIGNED, Encoding.PCM_UNSIGNED,
            Encoding.PCM_FLOAT };
}
 
Example 2
Source File: AudioFormatKeys.java    From jpexs-decompiler with GNU General Public License v3.0 5 votes vote down vote up
public static javax.sound.sampled.AudioFormat toAudioFormat(Format fmt) {
    // We always use PCM_SIGNED or PCM_UNSIGNED
    return new javax.sound.sampled.AudioFormat(
            !fmt.containsKey(SignedKey) || fmt.get(SignedKey) ? Encoding.PCM_SIGNED : Encoding.PCM_UNSIGNED,
            fmt.get(SampleRateKey).floatValue(),
            fmt.get(SampleSizeInBitsKey, 16),
            fmt.get(ChannelsKey, 1),
            fmt.containsKey(FrameSizeKey) ? fmt.get(FrameSizeKey) : (fmt.get(SampleSizeInBitsKey, 16) + 7) / 8 * fmt.get(ChannelsKey, 1),
            fmt.containsKey(FrameRateKey) ? fmt.get(FrameRateKey).floatValue() : fmt.get(SampleRateKey).floatValue(),
            fmt.containsKey(ByteOrderKey) ? fmt.get(ByteOrderKey) == ByteOrder.BIG_ENDIAN : true);
}
 
Example 3
Source File: AudioFloatFormatConverter.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public Encoding[] getTargetEncodings(AudioFormat sourceFormat) {
    if (AudioFloatConverter.getConverter(sourceFormat) == null)
        return new Encoding[0];
    return new Encoding[] { Encoding.PCM_SIGNED, Encoding.PCM_UNSIGNED,
            Encoding.PCM_FLOAT };
}
 
Example 4
Source File: PCMtoPCMCodec.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public AudioFormat.Encoding[] getSourceEncodings() {
    return new Encoding[]{Encoding.PCM_SIGNED, Encoding.PCM_UNSIGNED};
}
 
Example 5
Source File: AudioFloatFormatConverter.java    From jdk8u_jdk with GNU General Public License v2.0 4 votes vote down vote up
public Encoding[] getTargetEncodings() {
    return new Encoding[] { Encoding.PCM_SIGNED, Encoding.PCM_UNSIGNED,
            Encoding.PCM_FLOAT };
}
 
Example 6
Source File: AudioFloatFormatConverter.java    From Bytecoder with Apache License 2.0 4 votes vote down vote up
@Override
public Encoding[] getSourceEncodings() {
    return new Encoding[] { Encoding.PCM_SIGNED, Encoding.PCM_UNSIGNED,
            Encoding.PCM_FLOAT };
}
 
Example 7
Source File: PCMtoPCMCodec.java    From Bytecoder with Apache License 2.0 4 votes vote down vote up
@Override
public AudioFormat.Encoding[] getSourceEncodings() {
    return new Encoding[]{Encoding.PCM_SIGNED, Encoding.PCM_UNSIGNED};
}
 
Example 8
Source File: AudioFloatFormatConverter.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public Encoding[] getTargetEncodings(AudioFormat sourceFormat) {
    if (AudioFloatConverter.getConverter(sourceFormat) == null)
        return new Encoding[0];
    return new Encoding[] { Encoding.PCM_SIGNED, Encoding.PCM_UNSIGNED,
            Encoding.PCM_FLOAT };
}
 
Example 9
Source File: AudioFloatFormatConverter.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public Encoding[] getTargetEncodings() {
    return new Encoding[] { Encoding.PCM_SIGNED, Encoding.PCM_UNSIGNED,
            Encoding.PCM_FLOAT };
}
 
Example 10
Source File: AudioFloatFormatConverter.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
public Encoding[] getSourceEncodings() {
    return new Encoding[] { Encoding.PCM_SIGNED, Encoding.PCM_UNSIGNED,
            Encoding.PCM_FLOAT };
}
 
Example 11
Source File: AudioFloatFormatConverter.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public Encoding[] getTargetEncodings(AudioFormat sourceFormat) {
    if (AudioFloatConverter.getConverter(sourceFormat) == null)
        return new Encoding[0];
    return new Encoding[] { Encoding.PCM_SIGNED, Encoding.PCM_UNSIGNED,
            Encoding.PCM_FLOAT };
}
 
Example 12
Source File: AudioFloatFormatConverter.java    From dragonwell8_jdk with GNU General Public License v2.0 4 votes vote down vote up
public Encoding[] getSourceEncodings() {
    return new Encoding[] { Encoding.PCM_SIGNED, Encoding.PCM_UNSIGNED,
            Encoding.PCM_FLOAT };
}
 
Example 13
Source File: AudioFloatFormatConverter.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public Encoding[] getTargetEncodings(AudioFormat sourceFormat) {
    if (AudioFloatConverter.getConverter(sourceFormat) == null)
        return new Encoding[0];
    return new Encoding[] { Encoding.PCM_SIGNED, Encoding.PCM_UNSIGNED,
            Encoding.PCM_FLOAT };
}
 
Example 14
Source File: AudioFloatFormatConverter.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public Encoding[] getTargetEncodings() {
    return new Encoding[] { Encoding.PCM_SIGNED, Encoding.PCM_UNSIGNED,
            Encoding.PCM_FLOAT };
}
 
Example 15
Source File: AudioFloatFormatConverter.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
public Encoding[] getTargetEncodings(AudioFormat sourceFormat) {
    if (AudioFloatConverter.getConverter(sourceFormat) == null)
        return new Encoding[0];
    return new Encoding[] { Encoding.PCM_SIGNED, Encoding.PCM_UNSIGNED,
            Encoding.PCM_FLOAT };
}
 
Example 16
Source File: AudioFloatFormatConverter.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public Encoding[] getTargetEncodings() {
    return new Encoding[] { Encoding.PCM_SIGNED, Encoding.PCM_UNSIGNED,
            Encoding.PCM_FLOAT };
}
 
Example 17
Source File: AudioFloatFormatConverter.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public Encoding[] getTargetEncodings() {
    return new Encoding[] { Encoding.PCM_SIGNED, Encoding.PCM_UNSIGNED,
            Encoding.PCM_FLOAT };
}
 
Example 18
Source File: AudioFloatFormatConverter.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public Encoding[] getSourceEncodings() {
    return new Encoding[] { Encoding.PCM_SIGNED, Encoding.PCM_UNSIGNED,
            Encoding.PCM_FLOAT };
}
 
Example 19
Source File: AudioFloatFormatConverter.java    From dragonwell8_jdk with GNU General Public License v2.0 4 votes vote down vote up
public Encoding[] getTargetEncodings(AudioFormat sourceFormat) {
    if (AudioFloatConverter.getConverter(sourceFormat) == null)
        return new Encoding[0];
    return new Encoding[] { Encoding.PCM_SIGNED, Encoding.PCM_UNSIGNED,
            Encoding.PCM_FLOAT };
}
 
Example 20
Source File: AudioFloatFormatConverter.java    From jdk8u-dev-jdk with GNU General Public License v2.0 4 votes vote down vote up
public Encoding[] getSourceEncodings() {
    return new Encoding[] { Encoding.PCM_SIGNED, Encoding.PCM_UNSIGNED,
            Encoding.PCM_FLOAT };
}