Skip to content

Commit

Permalink
AlsaMidiAccess: go back to snd_seq_open() w/o lconf which never worked.
Browse files Browse the repository at this point in the history
  • Loading branch information
atsushieno committed Aug 29, 2024
1 parent 544672f commit 85e1275
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
2 changes: 1 addition & 1 deletion external/rtmidi-javacpp
Original file line number Diff line number Diff line change
Expand Up @@ -420,22 +420,9 @@ class AlsaSequencer(

const val QueueDirect = 253

private val config: snd_config_t

val DEFAULT_ALSA_CONF_PATHS = "/usr/local/share/alsa/alsa.conf:/usr/share/alsa/alsa.conf"
val ALSA_CONF_PATHS = System.getenv("ALSAKT_CONFIG_PATH")
?: System.getenv("ALSA_CONFIG_PATH")
?: DEFAULT_ALSA_CONF_PATHS

init {
Loader.load(snd_seq_t::class.java) // FIXME: this should not be required...

val cfg = snd_config_t()
Alsa.snd_config_top(cfg)
val upd = snd_config_update_t()
Alsa.snd_config_update_r(cfg, upd, ALSA_CONF_PATHS)
config = cfg

seq_evt_size = sizeof(snd_seq_event_t::class.java)
seq_evt_off_source_port =
snd_seq_event_t.offsetof(snd_seq_event_t::class.java, "source") +
Expand All @@ -452,7 +439,7 @@ class AlsaSequencer(

init {
val ptr = snd_seq_t()
val err = Alsa.snd_seq_open_lconf(ptr, driverName, ioType, ioMode, config)
val err = Alsa.snd_seq_open(ptr, driverName, ioType, ioMode)
if (err != 0)
throw AlsaException(err)
seq = ptr
Expand Down

0 comments on commit 85e1275

Please sign in to comment.