MCPcopy Create free account
hub / github.com/zhuker/lamejs / getEffectiveFormat

Method getEffectiveFormat

src/main/java/lowlevel/LameEncoder.java:536–554  ·  view source on GitHub ↗

Return the audioformat representing the encoded mp3 stream. The format object will have the following properties: quality: an Integer, 1 (highest) to 9 (lowest) bitrate: an Integer, 32...320 kbit/s chmode: channel mode, a String, one of "jointstereo", "dual", &qu

()

Source from the content-addressed store, hash-verified

534 * </ul>
535 */
536 public AudioFormat getEffectiveFormat() {
537 // first gather properties
538 HashMap<String, Object> map = new HashMap<String, Object>();
539 map.put(P_QUALITY, getEffectiveQuality());
540 map.put(P_BITRATE, getEffectiveBitRate());
541 map.put(P_CHMODE, chmode2string(getEffectiveChannelMode()));
542 map.put(P_VBR, getEffectiveVBR());
543 // map.put(P_SAMPLERATE, getEffectiveSampleRate());
544 // map.put(P_ENCODING,getEffectiveEncoding());
545 map.put("encoder.name", "LAME");
546 map.put("encoder.version", getEncoderVersion());
547 int channels = 2;
548 if (chMode == CHANNEL_MODE_MONO) {
549 channels = 1;
550 }
551 return new AudioFormat(getEffectiveEncoding(),
552 getEffectiveSampleRate(), NOT_SPECIFIED, channels,
553 NOT_SPECIFIED, NOT_SPECIFIED, false, map);
554 }
555
556 public int getEffectiveQuality() {
557 if (effQuality >= QUALITY_LOWEST) {

Callers

nothing calls this directly

Calls 8

getEffectiveQualityMethod · 0.95
getEffectiveBitRateMethod · 0.95
chmode2stringMethod · 0.95
getEffectiveVBRMethod · 0.95
getEncoderVersionMethod · 0.95
getEffectiveEncodingMethod · 0.95

Tested by

no test coverage detected