Update dependencies and fix MidiMessage data handling

Bumped library version to 0.3.1 and updated dependency `typed-byte-arrays` to 0.2.8 in `build.gradle.kts`. Adjusted `MidiMessage` constructor to avoid direct vararg usage by introducing an intermediate `ByteArray` for clarity and consistency.
This commit is contained in:
2024-12-17 20:41:45 +01:00
parent a592e91882
commit cd7d63807e
2 changed files with 4 additions and 4 deletions

View File

@@ -8,7 +8,7 @@ plugins {
} }
group = "nl.astraeus" group = "nl.astraeus"
version = "0.3.0" version = "0.3.1"
repositories { repositories {
mavenCentral() mavenCentral()
@@ -25,7 +25,7 @@ kotlin {
sourceSets { sourceSets {
val commonMain by getting { val commonMain by getting {
dependencies { dependencies {
api("nl.astraeus:typed-byte-arrays:0.2.6") api("nl.astraeus:typed-byte-arrays:0.2.8")
} }
} }
val commonTest by getting { val commonTest by getting {

View File

@@ -42,7 +42,6 @@ class MidiDataMessage() : MidiMessage(
this.data = MutableByteArrayHandler(data) this.data = MutableByteArrayHandler(data)
} }
} }
class TimedMidiMessage() : MidiMessage( class TimedMidiMessage() : MidiMessage(
@@ -69,7 +68,8 @@ class TimedMidiMessage() : MidiMessage(
vararg data: Byte vararg data: Byte
): this() { ): this() {
this.timeToPlay = timeToPlay this.timeToPlay = timeToPlay
this.midi = SlicedByteArray(data) val ba: ByteArray = data
this.midi = SlicedByteArray(ba)
} }
} }