CASampledSP Native Library (arm64)

arm64 library for CASampledSP.

Лицензия

Лицензия

Группа

Группа

com.tagtraum
Идентификатор

Идентификатор

casampledsp-arm64
Последняя версия

Последняя версия

0.9.24
Дата

Дата

Тип

Тип

dylib
Описание

Описание

CASampledSP Native Library (arm64)
arm64 library for CASampledSP.
Организация-разработчик

Организация-разработчик

tagtraum industries incorporated

Скачать casampledsp-arm64

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
com.tagtraum : casampledsp-java jar 0.9.24

provided (1)

Идентификатор библиотеки Тип Версия
org.apache.ant : ant jar 1.9.15

test (1)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.10

Модули Проекта

Данный проект не имеет модулей.

README.md

LGPL 2.1 Maven Central Build and Test CodeCov

CASampledSP is an implementation of the javax.sound.sampled service provider interfaces based on Apple's Core Audio library, supporting all its file formats (mp3, aac, ...). It is part of the SampledSP collection of javax.sound.sampled libraries.

Its main purpose is to decode audio files or streams to signed linear pcm.

This library comes with absolutely no support, warranty etc. you name it.

Binaries and more info can be found at its tagtraum home.

Usage Example

To use the library with Maven, introduce the following dependency:

<dependency>
  <groupId>com.tagtraum</groupId>
  <artifactId>casampledsp-complete</artifactId>
</dependency>

Note that when opening a compressed file with CASampledSP, you still need to convert to PCM in order to actually decode the file.

Here's a simple example for how that's done for mp3 to wave:

public static void mp3ToWav(File mp3Data) throws UnsupportedAudioFileException, IOException {
    // open stream
    AudioInputStream mp3Stream = AudioSystem.getAudioInputStream(mp3Data);
    AudioFormat sourceFormat = mp3Stream.getFormat();
    // create audio format object for the desired stream/audio format
    // this is *not* the same as the file format (wav)
    AudioFormat convertFormat = new AudioFormat(AudioFormat.Encoding.PCM_SIGNED, 
        sourceFormat.getSampleRate(), 16, 
        sourceFormat.getChannels(), 
        sourceFormat.getChannels() * 2,
        sourceFormat.getSampleRate(),
        false);
    // create stream that delivers the desired format
    AudioInputStream converted = AudioSystem.getAudioInputStream(convertFormat, mp3Stream);
    // write stream into a file with file format wav
    AudioSystem.write(converted, Type.WAVE, new File("C:\\temp\\out.wav"));
}

See also here.

Build

You can only build this library on macOS.

To do so, you also need:

Once you have all this, you need to adjust some properties in the parent pom.xml. Or.. simply override them using -Dname=value notation. E.g. to point to your Oracle JDK JNI headers, add e.g.

-Ddarwin.headers.jni=/Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home/include/

to your mvn call. You might also need to change mmacosx-version-min and isysroot, if you don't have an OS X 10.7 SDK installed.

So all in all, something like the following might work for you:

mvn -Ddarwin.headers.jni=/Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home/include/ \
    -Dmmacosx-version-min=10.7 \
    -Disysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/ \
    clean install

Enjoy.

https://www.tagtraum.com/casampledsp/

Версии библиотеки

Версия
0.9.24