Skip to content

Commit

Permalink
MtsClient: remove special aarch64 handling
Browse files Browse the repository at this point in the history
  • Loading branch information
greatest-ape committed Mar 18, 2024
1 parent 22f07d2 commit c34464f
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions octasine/src/plugin/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,7 @@ impl MtsClient {
let midi_note = c_char::from_ne_bytes(midi_note.min(127).to_ne_bytes());
let midi_channel = midi_channel
.map(|midi_channel| c_char::from_ne_bytes(midi_channel.min(15).to_ne_bytes()))
.unwrap_or_else(|| {
// Try to account for the fact that ARM c_char is unsigned,
// while the API wants to be passed -1 to indicate "no
// particular channel"
#[cfg(any(target_arch = "aarch64", target_arch = "arm"))]
{
u8::from_ne_bytes((-1i8).to_ne_bytes())
}
#[cfg(not(any(target_arch = "aarch64", target_arch = "arm")))]
{
-1i8
}
});
.unwrap_or(-1i8);

MTS_NoteToFrequency(self.0, midi_note, midi_channel)
}
Expand Down

0 comments on commit c34464f

Please sign in to comment.