Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ jobs:
if: ${{ matrix.os == 'ubuntu-latest' }}
run: sudo apt-get install -y fuse libfuse2

- name: Set up JDK 20
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '20.0.1'
java-version: '21'
distribution: 'temurin'

- name: Build
Expand Down Expand Up @@ -66,10 +66,10 @@ jobs:
if: ${{ matrix.os == 'ubuntu-latest' }}
run: sudo apt-get install -y fuse libfuse2

- name: Set up JDK 20
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '20.0.1'
java-version: '21'
distribution: 'temurin'

- name: Switch portable flag (Linux)
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ jobs:
if: ${{ matrix.os == 'ubuntu-latest' }}
run: sudo apt-get install -y fuse libfuse2

- name: Set up JDK 20
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '20.0.1'
java-version: '21'
distribution: 'temurin'

- name: Test
Expand Down
34 changes: 16 additions & 18 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ plugins {
id 'idea'
id 'eclipse'
id 'application'
id 'org.beryx.jlink' version '2.26.0'
id 'org.openjfx.javafxplugin' version '0.0.14'
id 'org.beryx.jlink' version '3.0.0'
id 'org.openjfx.javafxplugin' version '0.1.0'
}

group 'com.codedead'
version '1.2.0'
version '1.3.0'

def currentOS = DefaultNativePlatform.currentOperatingSystem

java {
targetCompatibility = JavaVersion.VERSION_20
sourceCompatibility = JavaVersion.VERSION_20
targetCompatibility = JavaVersion.VERSION_21
sourceCompatibility = JavaVersion.VERSION_21
}

application {
Expand All @@ -25,13 +25,13 @@ application {
}

javafx {
version = '20.0.1'
version = '21.0.1'
configuration = 'implementation'
modules = ['javafx.base', 'javafx.controls', 'javafx.fxml', 'javafx.media']
}

jlink {
options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
options = ['--strip-debug', '--compress', 'zip-9', '--no-header-files', '--no-man-pages']
forceMerge('log4j-api', 'jackson')
launcher {
name = 'Opal'
Expand All @@ -40,8 +40,6 @@ jlink {
mergedModule {
additive = true
uses 'org.apache.logging.log4j.util.PropertySource'
uses 'org.apache.logging.log4j.core.util.ContextDataProvider'
uses 'org.apache.logging.log4j.core.util.WatchEventService'
uses 'org.apache.logging.log4j.spi.Provider'
uses 'org.apache.logging.log4j.message.ThreadDumpMessage.ThreadInfoFactory'
}
Expand Down Expand Up @@ -105,20 +103,20 @@ tasks.register('AppImage') {
doLast {
copy {
from '.AppImage/.AppDir'
into "${buildDir}/AppImage/Opal.AppDir"
into layout.buildDirectory.dir("AppImage/Opal.AppDir")
}
copy {
from "${buildDir}/jpackage/Opal/"
into "${buildDir}/AppImage/Opal.AppDir/usr/"
from layout.buildDirectory.dir("jpackage/Opal/")
into layout.buildDirectory.dir("AppImage/Opal.AppDir/usr/")
}
copy {
from '.AppImage/.AppDir/Opal.png'
into "${buildDir}/AppImage/Opal.AppDir/usr/lib"
into layout.buildDirectory.dir("AppImage/Opal.AppDir/usr/lib")
}
exec {
commandLine 'sh', "${project.rootDir}/.AppImage/createAppImage.sh", "${project.version.toString()}"
}
delete "${buildDir}/AppImage/Opal.AppDir"
delete layout.buildDirectory.dir("AppImage/Opal.AppDir")
}
}

Expand All @@ -142,11 +140,11 @@ repositories {
}

dependencies {
implementation 'org.apache.logging.log4j:log4j-core:2.20.0'
implementation 'org.apache.logging.log4j:log4j-core:2.21.1'
implementation 'io.github.mkpaz:atlantafx-base:2.0.1'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.15.2'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.3'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.3'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.15.3'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.0'
}

tasks.named('test') {
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
17 changes: 9 additions & 8 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,22 @@ private void saveSoundPresetAction() {
}
}

/**
* Play or pause all media
*/
@FXML
private void playPauseAction() {
logger.info("Play / pause all media");
try {
for (final SoundPane soundPane : getAllSoundPanes(grpControls)) {
soundPane.playPause();
}
} catch (final MediaPlayerException ex) {
logger.error("Unable to play / pause MediaPlayer", ex);
FxUtils.showErrorAlert(translationBundle.getString("PlayPauseError"), ex.toString(), getClass().getResourceAsStream(SharedVariables.ICON_URL));
}
}

/**
* Method that is called when all players should be reset
*/
Expand Down Expand Up @@ -408,6 +424,8 @@ private void settingsAction() {

logger.info("Showing the SettingsWindow");
primaryStage.show();
primaryStage.setWidth(450);
primaryStage.setHeight(320);
} catch (final IOException ex) {
logger.error("Unable to open the SettingsWindow", ex);
FxUtils.showErrorAlert(translationBundle.getString("SettingsWindowError"), ex.toString(), getClass().getResourceAsStream(SharedVariables.ICON_URL));
Expand Down Expand Up @@ -491,6 +509,8 @@ private void aboutAction() {

logger.info("Showing the AboutWindow");
primaryStage.show();
primaryStage.setWidth(450);
primaryStage.setHeight(250);
} catch (final IOException ex) {
logger.error("Unable to open the AboutWindow", ex);
FxUtils.showErrorAlert(translationBundle.getString("AboutWindowError"), ex.toString(), getClass().getResourceAsStream(SharedVariables.ICON_URL));
Expand Down
10 changes: 2 additions & 8 deletions src/main/java/com/codedead/opal/domain/SoundPane.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,6 @@ private void initializeMediaPlayer(final String value) throws URISyntaxException
disposeMediaPlayer();

mediaPlayer = new MediaPlayer(new Media(Objects.requireNonNull(getClass().getResource(value)).toURI().toString()));
mediaPlayer.currentTimeProperty().addListener((observableValue, oldDuration, newDuration) -> {
// Quality of life improvement to reduce audio lag when restarting the media
if (mediaPlayer != null && newDuration.toSeconds() >= mediaPlayer.getMedia().getDuration().toSeconds() - 0.5) {
mediaPlayer.seek(Duration.ZERO);
}
});
mediaPlayer.setOnEndOfMedia(() -> {
if (mediaPlayer != null) {
mediaPlayer.seek(Duration.ZERO);
Expand Down Expand Up @@ -275,10 +269,10 @@ public void pause() {
* @throws MediaPlayerException When the {@link MediaPlayer} object could not be initialized
*/
@FXML
private void playPause() throws MediaPlayerException {
public void playPause() throws MediaPlayerException {
if (mediaPlayer != null && mediaPlayer.getStatus() == MediaPlayer.Status.PLAYING) {
pause();
} else {
} else if (mediaPlayer != null && mediaPlayer.getVolume() != 0) {
play();
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/codedead/opal/utils/SharedVariables.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
public final class SharedVariables {

public static final String ICON_URL = "/images/opal.png";
public static final String CURRENT_VERSION = "1.2.0.0";
public static final String CURRENT_VERSION = "1.3.0.0";
public static final boolean PORTABLE = false;
public static final String DEFAULT_LOCALE = "en-US";

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
requires javafx.controls;
requires javafx.fxml;
requires java.desktop;
requires java.compiler;
requires java.naming;
requires javafx.media;
//noinspection Java9RedundantRequiresStatement
requires jdk.crypto.ec; // Added for SSL handshakes
Expand Down
Binary file added src/main/resources/audio/metronome.mp3
Binary file not shown.
Binary file added src/main/resources/audio/metronomefast.mp3
Binary file not shown.
Binary file added src/main/resources/images/metronome.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/images/playpause.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion src/main/resources/translations/OpalApplication.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
About=About
AboutText=Opal was created by DeadLine\n\nAudio: ZapSplat.com\nImages: Remix Icon\nTheme: AtlantaFX\nVersion: 1.2.0\n\nCopyright © 2023 CodeDead
AboutText=Opal was created by DeadLine\n\nAudio: ZapSplat.com\nImages: Remix Icon\nTheme: AtlantaFX\nVersion: 1.3.0\n\nCopyright © 2023 CodeDead
AboutWindowError=Unable to open the About Window!
AboutWindowTitle=Opal - About
AutoUpdate=Automatically check for updates
Expand Down Expand Up @@ -94,3 +94,7 @@ AudioBalance=Audio balance
Advanced=Advanced
Seagulls=Seagulls
Belltower=Bell tower
SlowMetronome=Metronome (slow)
FastMetronome=Metronome (fast)
PlayPause=Play / Pause
PlayPauseError=Unable to play / pause!
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
About=Über
AboutText=Opal wurde erstellt von: DeadLine\n\nAudio: ZapSplat.com\nBilder: Remix Icon\nDesign: AtlantaFX\nÜbersetzung: github.com/uDEV2019\nVersion: 1.2.0\n\nCopyright © 2023 CodeDead
AboutText=Opal wurde erstellt von: DeadLine\n\nAudio: ZapSplat.com\nBilder: Remix Icon\nDesign: AtlantaFX\nÜbersetzung: github.com/uDEV2019\nVersion: 1.3.0\n\nCopyright © 2023 CodeDead
AboutWindowError=Über-Dialog konnte nicht geöffnet werden!
AboutWindowTitle=Opal - Über
AutoUpdate=Automatisch auf Aktualisierungen prüfen
Expand Down Expand Up @@ -94,3 +94,7 @@ AudioBalance=Audiobalance
Advanced=Erweitert
Seagulls=Möwen
Belltower=Glockenturm
SlowMetronome=Langsames Metronom
FastMetronome=Schnelles Metronom
PlayPause=Abspielen / Pause
PlayPauseError=Abspielen / Pause konnte nicht ausgeführt werden!
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
About=About
AboutText=Opal was created by DeadLine\n\nAudio: ZapSplat.com\nImages: Remix Icon\nTheme: AtlantaFX\nVersion: 1.2.0\n\nCopyright © 2023 CodeDead
AboutText=Opal was created by DeadLine\n\nAudio: ZapSplat.com\nImages: Remix Icon\nTheme: AtlantaFX\nVersion: 1.3.0\n\nCopyright © 2023 CodeDead
AboutWindowError=Unable to open the About Window!
AboutWindowTitle=Opal - About
AutoUpdate=Automatically check for updates
Expand Down Expand Up @@ -94,3 +94,7 @@ AudioBalance=Audio balance
Advanced=Advanced
Seagulls=Seagulls
Belltower=Bell tower
SlowMetronome=Metronome (slow)
FastMetronome=Metronome (fast)
PlayPause=Play / Pause
PlayPauseError=Unable to play / pause!
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
About=Acerca de
AboutText=Opal fue creado por DeadLine\n\nAudio: ZapSplat.com\nImágenes: Remix Icon\nTema: AtlantaFX\nVersión: 1.2.0\n\nCopyright © 2023 CodeDead
AboutText=Opal fue creado por DeadLine\n\nAudio: ZapSplat.com\nImágenes: Remix Icon\nTema: AtlantaFX\nVersión: 1.3.0\n\nCopyright © 2023 CodeDead
AboutWindowError=¡No se puede abrir la ventana Acerca de!
AboutWindowTitle=Opal - Acerca de
AutoUpdate=Buscar actualizaciones automáticamente
Expand Down Expand Up @@ -94,3 +94,7 @@ AudioBalance=Balance de audio
Advanced=Avanzado
Seagulls=Gaviotas
Belltower=Campanario
SlowMetronome=Metronomo lento
FastMetronome=Metronomo rápido
PlayPause=Reproducir / Pausa
PlayPauseError=¡No se puede reproducir / pausar el sonido!
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
About=À propos
AboutText=Opal a été créé par DeadLine\n\nAudio: ZapSplat.com\nImages: Remix Icon\nThème: AtlantaFX\nVersion: 1.2.0\n\nCopyright © 2023 CodeDead
AboutText=Opal a été créé par DeadLine\n\nAudio: ZapSplat.com\nImages: Remix Icon\nThème: AtlantaFX\nVersion: 1.3.0\n\nCopyright © 2023 CodeDead
AboutWindowError=Impossible d'ouvrir la fenêtre À propos!
AboutWindowTitle=Opal - À propos
AutoUpdate=Rechercher automatiquement les mises à jour
Expand Down Expand Up @@ -94,3 +94,7 @@ AudioBalance=Balance audio
Advanced=Avancé
Seagulls=Mouettes
Belltower=Clocher
SlowMetronome=Métronome lent
FastMetronome=Métronome rapide
PlayPause=Lecture / Pause
PlayPauseError=Impossible de lire / mettre en pause!
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
About=このアプリについて
AboutText=Opal は DeadLine によって作成されました\n\nオーディオ: ZapSplat.com\n画像: リミックス アイコン\nテーマ: AtlantaFX\nバージョン: 1.2.0\n\nCopyright © 2023 CodeDead
AboutText=Opal は DeadLine によって作成されました\n\nオーディオ: ZapSplat.com\n画像: リミックス アイコン\nテーマ: AtlantaFX\nバージョン: 1.3.0\n\nCopyright © 2023 CodeDead
AboutWindowError=バージョン情報ウィンドウを開けません!
AboutWindowTitle=Opal - このアプリについて
AutoUpdate=アップデートを自動的に確認する
Expand Down Expand Up @@ -94,3 +94,7 @@ AudioBalance=オーディオ バランス
Advanced=高度な設定
Seagulls=カモメ
Belltower=ベルタワー
SlowMetronome=遅いメトロノーム
FastMetronome=速いメトロノーム
PlayPause=再生/一時停止
PlayPauseError=再生/一時停止できません!
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
About=Over
AboutText=Opal is gemaakt door DeadLine\n\nAudio: ZapSplat.com\nAfbeeldingen: Remix Icon\nThema: AtlantaFX\nVersie: 1.2.0\n\nCopyright © 2023 CodeDead
AboutText=Opal is gemaakt door DeadLine\n\nAudio: ZapSplat.com\nAfbeeldingen: Remix Icon\nThema: AtlantaFX\nVersie: 1.3.0\n\nCopyright © 2023 CodeDead
AboutWindowError=Kan het Over venster niet openen!
AboutWindowTitle=Opal - Over
AutoUpdate=Automatisch controleren op updates
Expand Down Expand Up @@ -94,3 +94,7 @@ AudioBalance=Audio balans
Advanced=Geavanceerd
Seagulls=Meeuwen
Belltower=Klokkentoren
SlowMetronome=Metronoom (langzaam)
FastMetronome=Metronoom (snel)
PlayPause=Afspelen / Pauzeren
PlayPauseError=Kan niet afspelen / pauzeren!
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
About=О
AboutText=Opal был создан DeadLine\n\nАудио: ZapSplat.com\nИзображения: Remix Icon\nТема: AtlantaFX\nВерсия: 1.2.0\n\nАвторские права © 2023 CodeDead
AboutText=Opal был создан DeadLine\n\nАудио: ZapSplat.com\nИзображения: Remix Icon\nТема: AtlantaFX\nВерсия: 1.3.0\n\nАвторские права © 2023 CodeDead
AboutWindowError=Не удается открыть окно «О программе»!
AboutWindowTitle=Opal - О компании
AutoUpdate=Автоматически проверять наличие обновлений
Expand Down Expand Up @@ -94,3 +94,7 @@ AudioBalance=Баланс аудио
Advanced=Дополнительно
Seagulls=Чайки
Belltower=Колокольня
SlowMetronome=Медленный метроном
FastMetronome=Быстрый метроном
PlayPause=Воспроизведение / Пауза
PlayPauseError=Невозможно воспроизвести / приостановить воспроизведение!
Loading