This repository has been archived by the owner on Sep 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v0.3: now it bundles libasound.so 1.2.10 for MIDI 2.0 support.
It should work with earlier versions of ALSA (IIUC libasound is designed as such, and the our libjniAlsa.so is just a thin wrapper). This introduces the whole build structure changes up to GitHub Actions setup.
- Loading branch information
1 parent
ecf35b1
commit 38d2380
Showing
12 changed files
with
77 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
.idea | ||
build | ||
alsakt-javacpp/src/main/java/dev/atsushieno/alsakt/javacpp | ||
alsa-dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "external/alsa-lib"] | ||
path = external/alsa-lib | ||
url = https://github.com/alsa-project/alsa-lib.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
alsakt/src/main/kotlin/dev/atsushieno/alsakt/AlsaVersion.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package dev.atsushieno.alsakt | ||
|
||
import dev.atsushieno.alsakt.javacpp.global.Alsa | ||
|
||
object AlsaVersion { | ||
val versionString = Alsa.snd_asoundlib_version().string | ||
private val versionTokens = versionString.split('.') | ||
val major = if (versionTokens.size > 0) versionTokens[0].toInt() else 0 | ||
val minor = if (versionTokens.size > 1) versionTokens[1].toInt() else 0 | ||
val revision = if (versionTokens.size > 2) versionTokens[2].toInt() else 0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
alsakt/src/test/kotlin/dev/atsushieno/alsakt/AlsaVersionTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package dev.atsushieno.alsakt | ||
|
||
import org.junit.jupiter.api.Test | ||
|
||
class AlsaVersionTest { | ||
@Test | ||
fun getVersion() { | ||
val ver = AlsaVersion.versionString | ||
assert(ver.length > 0) | ||
assert(AlsaVersion.major > 0) // it would not be version 0... | ||
assert(AlsaVersion.minor >= 0) // it would be non-negative | ||
assert(AlsaVersion.revision >= 0) // it would be non-negative | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
|
||
cd external/alsa-lib | ||
./gitcompile --prefix=`pwd`/../../alsa-dist | ||
make install | ||
cd ../.. | ||
mkdir -p alsa-dist/lib-no-symlink | ||
cp alsa-dist/lib/libasound.so alsa-dist/lib-no-symlink | ||
find alsa-dist/lib-no-symlink | ||
|