Skip to content

Commit

Permalink
update settings
Browse files Browse the repository at this point in the history
  • Loading branch information
umjammer committed Feb 13, 2024
1 parent f24e4a8 commit 69223ec
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 72 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand All @@ -44,6 +44,13 @@ jobs:

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven

- name: Autobuild
uses: github/codeql-action/autobuild@v2

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Check w/o SNAPSHOT when "bump version"
if: ${{ contains(github.event.head_commit.message, 'bump version') }}
run: grep "<version>" pom.xml | head -1 | grep -v SNAPSHOT

- name: Set up JDK 1.8
uses: actions/setup-java@v3
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '8'
java-version: '17'
distribution: 'temurin'
cache: maven

Expand Down
51 changes: 5 additions & 46 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
[![Release](https://jitpack.io/v/umjammer/vavi-sound-alac.svg)](https://jitpack.io/#umjammer/vavi-sound-alac)
[![Java CI](https://github.com/umjammer/vavi-sound-alac/actions/workflows/maven.yml/badge.svg)](https://github.com/umjammer/vavi-sound-alac/actions/workflows/maven.yml)
[![CodeQL](https://github.com/umjammer/vavi-sound-alac/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/umjammer/vavi-sound-alac/actions/workflows/codeql-analysis.yml)
![Java](https://img.shields.io/badge/Java-8-b07219)
![Java](https://img.shields.io/badge/Java-17-b07219)
[![Parent](https://img.shields.io/badge/Parent-vavi--sound--sandbox-pink)](https://github.com/umjammer/vavi-sound-sandbox)

# vavi-sound-alac

<img src="https://user-images.githubusercontent.com/493908/194699473-aaee645a-d178-4d9f-b220-9de335bf4c62.png" width="320" alt="ALAC logo"/>
<sub>© <a href="https://alac.macosforge.org">Apple</a></sub>
<img src="https://user-images.githubusercontent.com/493908/194699473-aaee645a-d178-4d9f-b220-9de335bf4c62.png" width="320" alt="ALAC logo"/><sub>© <a href="https://alac.macosforge.org">Apple</a></sub>


Java Implementation of Apple Lossless Decoder
Pure Java Apple Lossless decoder (Java Sound SPI)

it works as `javax.sound.sampled.spi`</br>
this project is a fork of [soiaf/Java-Apple-Lossless-decoder](https://github.com/soiaf/Java-Apple-Lossless-decoder)
Expand All @@ -30,47 +28,8 @@ https://jitpack.io/#umjammer/vavi-sound-alac

## TODO

* play clip w/o format conversion
* play clip w/o format conversion (possible?)

---

## Original

Copyright (c) 2011-2014 Peter McQuillan</br>
All Rights Reserved.</br>
Distributed under the BSD Software License (see [license.txt](license.txt))</br>

This package contains a Java implementation of an Apple Lossless decoder.
It is ported from v0.2.0 of the Apple Lossless decoder written by David Hammerton.
This code supports both 16-bit and 24-bit Apple Lossless files.

It is packaged with a demo command-line program that accepts a
Apple Lossless audio file as input and output a RIFF wav file.

The Java source code files can be compiled to class files very simply by going
to the directory where you have downloaded the .java files and running

`javac *.java`

To run the demo program, use the following command

`java DecoderDemo <input.m4a> <output.wav>`

where input.m4a is the name of the Apple Lossless file you wish to decode to a WAV file.

This code is ported from v0.2.0 of the Apple Lossless decoder written by David Hammerton.
However there are also some extra changes, for example:

* The original code to read the hdlr atom was capable of generating a minus value seek
after reading strlen - this causes problems if there is poor or non-existent seeking
support
* The stream handling code is now written so that it keeps track of where in the input
stream it is - this is needed for handling the case where the mdat atom comes before the
moov atom (and you have poor/non-existent seeking support)
* The stsz atom handling code assumed variable sample sizes, it now also handles fixed
sample sizes.


Thanks to Denis Tulskiy for the contributions he made to the code.

Please direct any questions or comments to [email protected]
[Original](src/main/java/com/beatofthedrum/alacdecoder/readme.md)
32 changes: 11 additions & 21 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,32 @@
<artifactId>vavi-sound-alac</artifactId>
<version>0.3.3</version>

<name>Java Implementation of Apple Lossless Decoder</name>
<url>https://github.com/umjammer/Java-Apple-Lossless-decoder</url>
<name>Apple Lossless Decoder for Java</name>
<url>https://github.com/umjammer/vavi-sound-alac</url>
<description>ALAC Java sound SPI</description>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<version>3.11.0</version>
<configuration>
<source>8</source>
<target>8</target>
<encoding>UTF-8</encoding>
<release>17</release>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M7</version>
<version>3.2.2</version>
<configuration>
<argLine>
--add-opens java.base/java.io=ALL-UNNAMED
-Djava.util.logging.config.file=${project.build.testOutputDirectory}/logging.properties
-Dvavi.test.volume=0.02
</argLine>
<trimStackTrace>false</trimStackTrace>
<forkMode>always</forkMode>
<reuseForks>false</reuseForks>
</configuration>
</plugin>
</plugins>
Expand All @@ -53,7 +53,7 @@
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>5.9.3</version>
<version>5.10.1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand All @@ -62,19 +62,9 @@

<dependencies>
<dependency>
<groupId>com.github.umjammer</groupId>
<groupId>com.github.umjammer</groupId> <!-- vavi / com.github.umjammer -->
<artifactId>vavi-sound</artifactId>
<version>1.0.15</version>
<exclusions>
<exclusion>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
</exclusion>
</exclusions>
<version>1.0.16</version>
</dependency>

<dependency>
Expand Down
40 changes: 40 additions & 0 deletions src/main/java/com/beatofthedrum/alacdecoder/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Java Apple Lossless Decoder

Copyright (c) 2011-2014 Peter McQuillan</br>
All Rights Reserved.</br>
Distributed under the BSD Software License (see [license.txt](../../../../../../license.txt))</br>

This package contains a Java implementation of an Apple Lossless decoder.
It is ported from v0.2.0 of the Apple Lossless decoder written by David Hammerton.
This code supports both 16-bit and 24-bit Apple Lossless files.

It is packaged with a demo command-line program that accepts an
Apple Lossless audio file as input and output a RIFF wav file.

The Java source code files can be compiled to class files very simply by going
to the directory where you have downloaded the .java files and running

`javac *.java`

To run the demo program, use the following command

`java DecoderDemo <input.m4a> <output.wav>`

where input.m4a is the name of the Apple Lossless file you wish to decode to a WAV file.

This code is ported from v0.2.0 of the Apple Lossless decoder written by David Hammerton.
However there are also some extra changes, for example:

* The original code to read the hdlr atom was capable of generating a minus value seek
after reading strlen - this causes problems if there is poor or non-existent seeking
support
* The stream handling code is now written so that it keeps track of where in the input
stream it is - this is needed for handling the case where the mdat atom comes before the
moov atom (and you have poor/non-existent seeking support)
* The stsz atom handling code assumed variable sample sizes, it now also handles fixed
sample sizes.


Thanks to Denis Tulskiy for the contributions he made to the code.

Please direct any questions or comments to [email protected]

0 comments on commit 69223ec

Please sign in to comment.