Skip to content

Commit

Permalink
Merge pull request #8 from umjammer/1.0.12
Browse files Browse the repository at this point in the history
1.0.12
  • Loading branch information
umjammer authored Mar 4, 2022
2 parents 7674de6 + 18ca259 commit 33c53a6
Show file tree
Hide file tree
Showing 206 changed files with 2,720 additions and 3,127 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
tmp/
etc/
111 changes: 75 additions & 36 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,50 +8,57 @@

<groupId>vavi</groupId>
<artifactId>vavi-sound</artifactId>
<version>1.0.11</version>
<version>1.0.12</version>

<name>Vavi Sound API</name>
<url>https://github.com/umjammer/vavi-sound</url>
<scm>
<url>https://github.com/umjammer/vavi-sound</url>
</scm>
<description>1.0.7

simplify service loader
fix dependencies

1.0.6

depends on vavi-commons api change
fix event listener duplication

1.0.5

fix midi spi

1.0.4

ssrc spi (wip)

1.0.3

make build pass

1.0.2

maintenance version

1.0.1

refactor properties related

<description>
TODO

adpcm spi</description>
<issueManagement>
<url>https://github.com/umjammer/vavi-sound/issues</url>
</issueManagement>

<profiles>
<profile>
<id>mac</id>
<activation>
<os>
<family>mac</family>
</os>
</activation>
<properties>
<dev.null>/dev/null</dev.null>
</properties>
</profile>
<profile>
<id>unix</id>
<activation>
<os>
<family>unix</family>
</os>
</activation>
<properties>
<dev.null>/dev/null</dev.null>
</properties>
</profile>
<profile>
<id>windows</id>
<activation>
<os>
<family>windows</family>
</os>
</activation>
<properties>
<dev.null>NUL</dev.null>
</properties>
</profile>
</profiles>

<build>
<plugins>
<plugin>
Expand Down Expand Up @@ -82,10 +89,11 @@ TODO
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M4</version>
<version>3.0.0-M5</version>
<configuration>
<argLine>
-Djava.util.logging.config.file=${project.build.testOutputDirectory}/logging.properties
-Dvavi.test.dev.null=${dev.null}
</argLine>
<trimStackTrace>false</trimStackTrace>
</configuration>
Expand All @@ -104,44 +112,75 @@ TODO
</repository>
</repositories>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>5.8.1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>com.github.umjammer</groupId>
<artifactId>vavi-commons</artifactId>
<version>1.1.4</version>
<version>1.1.6</version>
</dependency>
<dependency>
<groupId>com.github.umjammer</groupId>
<artifactId>klab-commons-cli</artifactId>
<version>1.3.0</version>
<exclusions>
<exclusion>
<groupId>com.github.umjammer</groupId>
<artifactId>vavi-commons</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.github.umjammer</groupId>
<artifactId>vavi-util-codec-sandbox</artifactId>
<version>1.0.1</version>
<exclusions>
<exclusion>
<groupId>com.github.umjammer</groupId>
<artifactId>vavi-commons</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>vavi</groupId>
<artifactId>vavi-sound-nda</artifactId>
<version>1.0.10</version>
<exclusions>
<exclusion>
<groupId>com.github.umjammer</groupId>
<artifactId>vavi-commons</artifactId>
</exclusion>
<exclusion>
<groupId>com.github.umjammer</groupId>
<artifactId>vavi-sound</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.3.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.3.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-commons</artifactId>
<version>1.5.2</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
34 changes: 34 additions & 0 deletions src/main/java/vavi/sound/SoundUtil.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* Copyright (c) 2022 by Naohide Sano, All rights reserved.
*
* Programmed by Naohide Sano
*/

package vavi.sound;

import javax.sound.sampled.DataLine;
import javax.sound.sampled.FloatControl;


/**
* SoundUtil.
*
* @author <a href="mailto:[email protected]">Naohide Sano</a> (umjammer)
* @version 0.00 2022/02/13 umjammer initial version <br>
*/
public final class SoundUtil {

private SoundUtil() {}

/**
* @param gain number between 0 and 1 (loudest)
* @before {@link DataLine#open()}
*/
public static void volume(DataLine line, double gain) {
FloatControl gainControl = (FloatControl) line.getControl(FloatControl.Type.MASTER_GAIN);
float dB = (float) (Math.log10(gain) * 20.0);
gainControl.setValue(dB);
}
}

/* */
Original file line number Diff line number Diff line change
@@ -1,50 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
# vavi.sound.adpcm.ccitt

<html>
<head>
<link rev="MADE" href="mailto:[email protected]" />
<link rel="INDEX" href="orverview.html" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<link rel="stylesheet" type="text/css" href="../../../../vavi.css" />
<title>vavi.sound.adpcm.ccitt</title>
<!--
* Copyright (c) 2003 by Naohide Sano, All rights reserved.
*
* Written by Naohide Sano
*
* @author <a href="mailto:[email protected]">Naohide Sano</a> (nsano)
*
* @version 0.00 030816 nsano initial version
-->
</head>

<body>

<p>
CCITT 勧告の音声圧縮フォーマット関連のクラスを提供します。
</p>

<ul>
<li>encoder.exe は little endian</li>
</ul>
## Tech-know

<h2>わかったこと</h2>
* encoder.exe は little endian
* PCM_SIGNED の場合はちゃんと 16Bit Signed な数値を渡してやる

<ul>
<li>PCM_SIGNED の場合はちゃんと 16Bit Signed な数値を渡してやる</li>
<li></li>
</ul>
## TODO

<h2>これから実装すること</h2>
* 3, 5bit

<ul>
<li>3, 5bit</li>
<li></li>
</ul>
## License

<h2>一次ライセンス</h2>
<pre>
```
/*
* This source code is a product of Sun Microsystems, Inc. and is provided
* for unrestricted use. Users may copy or modify this source code without
Expand All @@ -70,8 +39,4 @@ <h2>一次ライセンス</h2>
* 2550 Garcia Avenue
* Mountain View, California 94043
*/
</pre>

</body>

</html>
```
Original file line number Diff line number Diff line change
@@ -1,47 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<html lang="ja">
# vavi.sound.adpcm.dvi

<head>
<link rev="MADE" href="mailto:[email protected]" />
<link rel="INDEX" href="orverview.html" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<link rel="stylesheet" type="text/css" href="../../../../vavi.css" />
<title>vavi.sound.adpcm.dvi</title>
<!--
* Copyright (c) 2003 by Naohide Sano, All rights reserved.
*
* Written by Naohide Sano
*
* @author <a href="mailto:[email protected]">Naohide Sano</a> (nsano)
*
* @version 0.00 030817 nsano initial version
-->
</head>

<body>

<p>
Intel/DVI ADPCM フォーマット関連のクラスを提供します.
</p>

## Status

完成

<h2>わかったこと</h2>
## Tech-know

<ul>
<li>audiocafe の Java 移植はバグってる?</li>
</ul>
* audiocafe の Java 移植はバグってる?

<h2>これから実装すること</h2>
## TODO

<ul>
<li><del datetime="060124">一括読み込みを止める</del></li>
<li><del>encode</del></li>
</ul>
* ~~datetime="060124 一括読み込みを止める~~
* ~~encode~~

<h2>一次ライセンス</h2>
<pre>
## License
```
/***********************************************************
Copyright 1992 by Stichting Mathematisch Centrum, Amsterdam, The
Netherlands.
Expand All @@ -65,7 +40,4 @@ <h2>一次ライセンス</h2>
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
******************************************************************/
</pre>
</body>

</html>
```
Loading

0 comments on commit 33c53a6

Please sign in to comment.