Skip to content

Commit

Permalink
Merge pull request #18 from umjammer/1.0.7
Browse files Browse the repository at this point in the history
1.0.7
  • Loading branch information
umjammer authored Feb 18, 2024
2 parents 26059f1 + 2f744ea commit 2bce3bf
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 116 deletions.
34 changes: 0 additions & 34 deletions .github/workflows/maven-publish.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
jobs:
build:

runs-on: macos-14
runs-on: macos-13

steps:
- name: Checkout repository
Expand All @@ -32,6 +32,6 @@ jobs:
settings-path: ${{ github.workspace }} # location for the settings.xml file

- name: Build with Maven
run: mvn -B package --file pom.xml -s $GITHUB_WORKSPACE/settings.xml -Dmaven.test.skip=true
run: mvn -B package --file pom.xml -s $GITHUB_WORKSPACE/settings.xml
env:
GITHUB_TOKEN: ${{ github.token }}
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Maven Package](https://github.com/umjammer/vavi-sound-sandbox/actions/workflows/maven-publish.yml/badge.svg)](https://github.com/umjammer/vavi-sound-sandbox/actions/workflows/maven-publish.yml)
[![Release](https://jitpack.io/v/umjammer/vavi-sound-sandbox.svg)](https://jitpack.io/#umjammer/vavi-sound-sandbox)
[![Java CI](https://github.com/umjammer/vavi-sound-sandbox/actions/workflows/maven.yml/badge.svg)](https://github.com/umjammer/vavi-sound-sandbox/actions/workflows/maven.yml)
[![CodeQL](https://github.com/umjammer/vavi-sound-sandbox/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/umjammer/vavi-sound-sandbox/actions/workflows/codeql-analysis.yml)
![Java](https://img.shields.io/badge/Java-17-b07219)
Expand Down Expand Up @@ -58,9 +58,7 @@

## Install

* https://github.com/umjammer/vavi-sound-sandbox/packages/1298964
* this project uses github packages. add a personal access token to `~/.m2/settings.xml`
* see https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry
* [maven](https://jitpack.io/#umjammer/vavi-sound-sandbox)

## Tech Know

Expand Down Expand Up @@ -103,12 +101,12 @@
#### macos coremidi

* ~~[osxmidi4j](https://github.com/locurasoft/osxmidi4j)~~[osxmidi4j](https://github.com/umjammer/osxmidi4j)
* ~~https://github.com/DerekCook/CoreMidi4J~~ (uses jni)
* ~~https://github.com/DerekCook/CoreMidi4J~~ (jni)

#### macos audiounit

* open audiounit custom view
* https://github.com/nativelibs4java/BridJ (is able to deal objective-c blocks)
* https://github.com/nativelibs4java/BridJ (~~is able to deal objective-c blocks~~ inactive)
* volume

#### others
Expand Down
2 changes: 2 additions & 0 deletions jitpack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
jdk:
- openjdk17
89 changes: 16 additions & 73 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<groupId>vavi</groupId>
<artifactId>vavi-sound-sandbox</artifactId>
<version>1.0.6</version>
<version>1.0.7</version>

<name>Vavi Sound API (Sandbox)</name>
<url>https://github.com/umjammer/vavi-sound-sandbox</url>
Expand All @@ -21,59 +21,13 @@
</issueManagement>

<properties>
<tritonus.version>0.3.12</tritonus.version>
<rococoa.version>0.8.6</rococoa.version>
<tritonus.groupId>com.github.umjammer.tritonus</tritonus.groupId> <!-- org.tritonus / com.github.umjammer.tritonus -->
<tritonus.version>0.3.13</tritonus.version>
<rococoa.groupId>com.github.umjammer.rococoa</rococoa.groupId> <!-- org.rococoa / com.github.umjammer.rococoa -->
<rococoa.version>0.8.7</rococoa.version>
<maven.plugin.validation>VERBOSE</maven.plugin.validation>
</properties>

<distributionManagement>
<repository>
<id>github</id>
<url>https://maven.pkg.github.com/umjammer/vavi-sound-sandbox</url>
</repository>
</distributionManagement>

<profiles>
<profile>
<id>mac</id>
<activation>
<os>
<family>mac</family>
</os>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.6.0</version>
<executions>
<execution>
<id>copy</id>
<phase>generate-resources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.rococoa</groupId>
<artifactId>rococoa-core</artifactId>
<type>dylib</type>
<overWrite>true</overWrite>
<outputDirectory>${project.build.testOutputDirectory}</outputDirectory>
<destFileName>librococoa.dylib</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<build>
<plugins>
<plugin>
Expand All @@ -100,7 +54,6 @@
<configuration>
<argLine>
-Xmx4G
-Dvavi.util.logging.VaviFormatter.extraClassMethod=org\\.tritonus\\.share\\.TDebug#out
-Djava.util.logging.config.file=${project.build.testOutputDirectory}/logging.properties
-Dvavi.test.volume=0.02
--add-exports java.desktop/com.sun.media.sound=ALL-UNNAMED
Expand All @@ -117,10 +70,6 @@
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
<repository>
<id>github</id>
<url>https://maven.pkg.github.com/umjammer/*</url>
</repository>
</repositories>

<dependencyManagement>
Expand Down Expand Up @@ -154,17 +103,17 @@
</dependency>

<dependency>
<groupId>org.rococoa</groupId>
<groupId>${rococoa.groupId}</groupId>
<artifactId>rococoa-cocoa</artifactId>
<version>${rococoa.version}</version>
</dependency>
<dependency>
<groupId>org.rococoa</groupId>
<groupId>${rococoa.groupId}</groupId>
<artifactId>rococoa-core</artifactId>
<version>${rococoa.version}</version>
</dependency>
<dependency>
<groupId>org.tritonus</groupId>
<groupId>${tritonus.groupId}</groupId>
<artifactId>tritonus-remaining</artifactId>
<version>${tritonus.version}</version>
</dependency>
Expand Down Expand Up @@ -229,21 +178,21 @@
</dependency>

<dependency>
<groupId>org.tritonus</groupId>
<groupId>${tritonus.groupId}</groupId>
<artifactId>tritonus-dsp</artifactId>
<version>${tritonus.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.tritonus</groupId>
<groupId>${tritonus.groupId}</groupId>
<artifactId>tritonus-cdda</artifactId>
<version>${tritonus.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.tritonus</groupId>
<groupId>${tritonus.groupId}</groupId>
<artifactId>tritonus-jorbis</artifactId>
<version>${tritonus.version}</version>
<scope>test</scope>
Expand Down Expand Up @@ -278,16 +227,10 @@
<!--
-->
<dependency>
<groupId>net.javazoom</groupId>
<groupId>com.github.umjammer</groupId> <!-- net.javazoom / com.github.umjammer -->
<artifactId>mp3spi</artifactId>
<version>1.9.13</version>
<version>1.9.15</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>com.github.umjammer</groupId>
<artifactId>vavi-commons</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
Expand All @@ -312,9 +255,9 @@
</dependency>
-->
<dependency>
<groupId>com.locurasoft</groupId>
<groupId>com.github.umjammer</groupId> <!-- com.locurasoft / com.github.umjammer -->
<artifactId>osxmidi4j</artifactId>
<version>1.0.4</version>
<version>1.0.6</version>
<scope>test</scope>
</dependency>

Expand Down Expand Up @@ -357,7 +300,7 @@
<dependency>
<groupId>com.github.umjammer</groupId>
<artifactId>vavi-sound-alac</artifactId>
<version>0.3.3</version>
<version>0.3.4</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
import org.junit.jupiter.api.condition.EnabledOnOs;
import org.junit.jupiter.api.condition.OS;

Expand Down Expand Up @@ -87,6 +88,7 @@ void setup() throws Exception {

@Test
@DisplayName("directly")
@DisabledIfSystemProperty(named = "os.arch", matches = "x86_64")
void test() throws Exception {
Synthesizer synthesizer = MidiSystem.getSynthesizer();
synthesizer.open();
Expand Down
2 changes: 2 additions & 0 deletions src/test/java/vavi/sound/sampled/rococoa/RococoaClipTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import javax.swing.JFrame;

import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
import org.junit.jupiter.api.condition.EnabledOnOs;
import org.junit.jupiter.api.condition.OS;
import org.rococoa.ObjCObjectByReference;
Expand Down Expand Up @@ -107,6 +108,7 @@ static void test1(String[] args) throws Exception {
}

@Test
@DisabledIfSystemProperty(named = "os.arch", matches = "x86_64")
void test1() throws Exception {
Path path = Paths.get(RococoaClipTest.class.getResource(inFile).toURI());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledIfEnvironmentVariable;
import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
import org.junit.jupiter.api.condition.EnabledOnOs;
import org.junit.jupiter.api.condition.OS;
import org.rococoa.RunOnMainThread;
Expand Down Expand Up @@ -47,6 +48,7 @@ class AVFoundationTest {

/** {@link AVAudioFormat#init(AudioStreamBasicDescription)} */
@Test
@DisabledIfSystemProperty(named = "os.arch", matches = "x86_64")
void test01() {
AudioStreamBasicDescription outDesc = new AudioStreamBasicDescription();
outDesc.mSampleRate = 44100.0;
Expand Down Expand Up @@ -101,6 +103,7 @@ void test() throws Exception {
* AVAudioUnitMIDIInstrument (kAudioUnitSubType_MIDISynth) w/ AudioToolbox#MusicDeviceMIDIEvent
*/
@Test
@DisabledIfSystemProperty(named = "os.arch", matches = "x86_64")
void test2() throws Exception {
AVAudioEngine engine = AVAudioEngine.newInstance();
Debug.println(engine);
Expand Down Expand Up @@ -144,6 +147,7 @@ void test2() throws Exception {
* TODO w/ sound font
*/
@Test
@DisabledIfSystemProperty(named = "os.arch", matches = "x86_64")
void test3() throws Exception {
AVAudioEngine engine = AVAudioEngine.newInstance();
Debug.println(engine);
Expand Down Expand Up @@ -192,6 +196,7 @@ void test3() throws Exception {
* AVAudioUnitMIDIInstrument (kAudioUnitSubType_DLSSynth)
*/
@Test
@DisabledIfSystemProperty(named = "os.arch", matches = "x86_64")
void test31() throws Exception {
AVAudioEngine engine = AVAudioEngine.newInstance();
Debug.println(engine);
Expand Down Expand Up @@ -284,6 +289,7 @@ void test5() throws Exception {

/** list AVAudioUnitComponent */
@Test
@DisabledIfSystemProperty(named = "os.arch", matches = "x86_64")
void test6() throws Exception {
AudioComponentDescription description = new AudioComponentDescription();
description.componentType = AudioComponentDescription.kAudioUnitType_MusicDevice;
Expand Down
2 changes: 2 additions & 0 deletions src/test/java/vavix/rococoa/avfoundation/SpeechTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import java.util.concurrent.CountDownLatch;

import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
import vavi.util.Debug;


Expand All @@ -21,6 +22,7 @@
public class SpeechTest {

@Test
@DisabledIfSystemProperty(named = "os.arch", matches = "x86_64")
void test1() throws Exception {
// for (NSObject voice : AVSpeechSynthesisVoice.speechVoices()) { // TODO cannot use AVSpeechSynthesisVoice instead of NSObject
// System.err.println(voice);
Expand Down
3 changes: 2 additions & 1 deletion src/test/java/vavix/rococoa/ituneslibrary/ITLibraryTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
import java.awt.Graphics;
import java.awt.image.BufferedImage;
import java.io.IOException;

import javax.swing.JFrame;
import javax.swing.JPanel;

import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
import org.junit.jupiter.api.condition.EnabledOnOs;
import org.junit.jupiter.api.condition.OS;
import org.rococoa.cocoa.foundation.NSArray;
Expand Down Expand Up @@ -70,6 +70,7 @@ public void paint(Graphics g) {
}

@Test
@DisabledIfSystemProperty(named = "os.arch", matches = "x86_64")
void test() {
ITLibrary library = ITLibrary.libraryWithAPIVersion("1.1");
library.getMediaItems().stream()
Expand Down

0 comments on commit 2bce3bf

Please sign in to comment.