sox

JNA Bindings to the Sound eXchange(SoX) Library

Лицензия

Лицензия

Категории

Категории

Ant Компиляция и сборка JNA Инструменты разработки Native
Группа

Группа

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

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

sox-jna
Последняя версия

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

1.0.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

sox
JNA Bindings to the Sound eXchange(SoX) Library
Ссылка на сайт

Ссылка на сайт

https://github.com/anthemengineering/sox-jna
Система контроля версий

Система контроля версий

https://github.com/anthemengineering/sox-jna/

Скачать sox-jna

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.anthemengineering/sox-jna/ -->
<dependency>
    <groupId>com.anthemengineering</groupId>
    <artifactId>sox-jna</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.anthemengineering/sox-jna/
implementation 'com.anthemengineering:sox-jna:1.0.0'
// https://jarcasting.com/artifacts/com.anthemengineering/sox-jna/
implementation ("com.anthemengineering:sox-jna:1.0.0")
'com.anthemengineering:sox-jna:jar:1.0.0'
<dependency org="com.anthemengineering" name="sox-jna" rev="1.0.0">
  <artifact name="sox-jna" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.anthemengineering', module='sox-jna', version='1.0.0')
)
libraryDependencies += "com.anthemengineering" % "sox-jna" % "1.0.0"
[com.anthemengineering/sox-jna "1.0.0"]

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
net.java.dev.jna : jna-platform jar 5.4.0
net.java.dev.jna : jna jar 5.4.0

test (2)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.11
org.assertj : assertj-core jar 2.9.1

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

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

sox-jna

This project is a Java JNA binding to the Sound eXchange(SoX) audio processing library.

Maven Coordinates

<dependency>
  <groupId>com.anthemengineering</groupId>
  <artifactId>sox-jna</artifactId>
  <version>${sox-jna.version}</version>
</dependency>

Maven Central

Dependencies

Install sox-14.4.2 onto your library path.

Mac

brew install sox

This installs sox.h to your include path at /usr/local/Cellar/sox/__VERSION__/include/sox.h. Use that as the path to the sox.h as the jnaerator argument.

Ubuntu

sudo apt install libsox-dev

You may need to also run sudo apt install build-essential

This installs sox.h to your include path at /usr/include/sox.h. Use that as the path to the sox.h as the jnaerator argument.

Generating JNA Bindings

In order to generate the JNA bindings you must have the 'sox.h' file on your system in a way that jnaerator can read from it.

Via maven

The pom file is setup in a way that it will look for the 'sox.h' file:

  • on linux at /usr/include/sox.h (based on the apt install of the 'devel' sox package)
  • on mac at /usr/local/Cellar/sox/__VERSION__/include/sox.h (as if brew installed it)
  • manually configured via a flag given to maven: -Dsox_header=/my/path/to/incude/sox.h

The configuration parameters is given via the src/main/jnaerator/config.jnaerator maven resource file.

./mvnw process-resources  com.nativelibs4java:maven-jnaerator-plugin:generate

This command generates sources underneath the target/generated-sources/jna-bindings/com/anthemengineering/sox/jna path.

Manual way (because knowing how things works is a good thing)

wget https://repo1.maven.org/maven2/com/nativelibs4java/jnaerator/0.12/jnaerator-0.12-shaded.jar
java -jar jnaerator-0.12-shaded.jar -runtime JNA -mode Directory -library sox -package com.anthemengineering.sox.jna sox.h

Building the sox-jna wrapper

./mvnw package

This should then generate the jar: target/sox-$VERSION.jar.

Small examples

  • SoxMain.java
    $ ./mvnw exec:java -Dexec.mainClass=com.anthemengineering.sox.SoxMain -Dexec.classpathScope=test
    
  • SoxEffectsChainMain.java
    $ ./mvnw exec:java -Dexec.mainClass=com.anthemengineering.sox.SoxEffectsChainMain -Dexec.classpathScope=test
    

Useful Links

com.anthemengineering

Anthem Engineering

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

Версия
1.0.0