Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
JDK 17 java.desktop.jmod - Desktop Module
JDK 17 java.desktop.jmod is the JMOD file for JDK 17 Desktop module.
JDK 17 Desktop module compiled class files are stored in \fyicenter\jdk-17.0.5\jmods\java.desktop.jmod.
JDK 17 Desktop module compiled class files are also linked and stored in the \fyicenter\jdk-17.0.5\lib\modules JImage file.
JDK 17 Desktop module source code files are stored in \fyicenter\jdk-17.0.5\lib\src.zip\java.desktop.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ com/sun/media/sound/SoftLimiter.java
/* * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package com.sun.media.sound; /** * A simple look-ahead volume limiter with very fast attack and fast release. * This filter is used for preventing clipping. * * @author Karl Helgason */ public final class SoftLimiter implements SoftAudioProcessor { float lastmax = 0; float gain = 1; float[] temp_bufferL; float[] temp_bufferR; boolean mix = false; SoftAudioBuffer bufferL; SoftAudioBuffer bufferR; SoftAudioBuffer bufferLout; SoftAudioBuffer bufferRout; float controlrate; @Override public void init(float samplerate, float controlrate) { this.controlrate = controlrate; } @Override public void setInput(int pin, SoftAudioBuffer input) { if (pin == 0) bufferL = input; if (pin == 1) bufferR = input; } @Override public void setOutput(int pin, SoftAudioBuffer output) { if (pin == 0) bufferLout = output; if (pin == 1) bufferRout = output; } @Override public void setMixMode(boolean mix) { this.mix = mix; } @Override public void globalParameterControlChange(int[] slothpath, long param, long value) { } double silentcounter = 0; @Override public void processAudio() { if (this.bufferL.isSilent() && (this.bufferR == null || this.bufferR.isSilent())) { silentcounter += 1 / controlrate; if (silentcounter > 60) { if (!mix) { bufferLout.clear(); if (bufferRout != null) bufferRout.clear(); } return; } } else silentcounter = 0; float[] bufferL = this.bufferL.array(); float[] bufferR = this.bufferR == null ? null : this.bufferR.array(); float[] bufferLout = this.bufferLout.array(); float[] bufferRout = this.bufferRout == null ? null : this.bufferRout.array(); if (temp_bufferL == null || temp_bufferL.length < bufferL.length) temp_bufferL = new float[bufferL.length]; if (bufferR != null) if (temp_bufferR == null || temp_bufferR.length < bufferR.length) temp_bufferR = new float[bufferR.length]; float max = 0; int len = bufferL.length; if (bufferR == null) { for (int i = 0; i < len; i++) { if (bufferL[i] > max) max = bufferL[i]; if (-bufferL[i] > max) max = -bufferL[i]; } } else { for (int i = 0; i < len; i++) { if (bufferL[i] > max) max = bufferL[i]; if (bufferR[i] > max) max = bufferR[i]; if (-bufferL[i] > max) max = -bufferL[i]; if (-bufferR[i] > max) max = -bufferR[i]; } } float lmax = lastmax; lastmax = max; if (lmax > max) max = lmax; float newgain = 1; if (max > 0.99f) newgain = 0.99f / max; else newgain = 1; if (newgain > gain) newgain = (newgain + gain * 9) / 10f; float gaindelta = (newgain - gain) / len; if (mix) { if (bufferR == null) { for (int i = 0; i < len; i++) { gain += gaindelta; float bL = bufferL[i]; float tL = temp_bufferL[i]; temp_bufferL[i] = bL; bufferLout[i] += tL * gain; } } else { for (int i = 0; i < len; i++) { gain += gaindelta; float bL = bufferL[i]; float bR = bufferR[i]; float tL = temp_bufferL[i]; float tR = temp_bufferR[i]; temp_bufferL[i] = bL; temp_bufferR[i] = bR; bufferLout[i] += tL * gain; bufferRout[i] += tR * gain; } } } else { if (bufferR == null) { for (int i = 0; i < len; i++) { gain += gaindelta; float bL = bufferL[i]; float tL = temp_bufferL[i]; temp_bufferL[i] = bL; bufferLout[i] = tL * gain; } } else { for (int i = 0; i < len; i++) { gain += gaindelta; float bL = bufferL[i]; float bR = bufferR[i]; float tL = temp_bufferL[i]; float tR = temp_bufferR[i]; temp_bufferL[i] = bL; temp_bufferR[i] = bR; bufferLout[i] = tL * gain; bufferRout[i] = tR * gain; } } } gain = newgain; } @Override public void processControlLogic() { } }
⏎ com/sun/media/sound/SoftLimiter.java
Or download all of them as a single archive file:
File name: java.desktop-17.0.5-src.zip File size: 9152233 bytes Release date: 2022-09-13 Download
⇒ JDK 17 java.instrument.jmod - Instrument Module
2023-09-16, 33885👍, 0💬
Popular Posts:
What Is ojdbc14.jar for Oracle 10g R2? ojdbc14.jar for Oracle 10g R2 is the JAR files of ojdbc.jar, ...
xml-commons Resolver Source Code Files are provided in the source package file, xml-commons-resolver...
JDK 11 jrt-fs.jar is the JAR file for JDK 11 JRT-FS (Java RunTime - File System) defined in the "jdk...
Rhino JavaScript Java Library is an open-source implementation of JavaScript written entirely in Jav...
The Digester package lets you configure an XML -> Java object mapping module, which triggers certain...