This commit is contained in:
TonyChyi 2018-03-20 09:23:58 +08:00
parent 739da893cd
commit 7c30d38607
3 changed files with 4 additions and 5 deletions

View File

@ -13,7 +13,7 @@ int new_client(char* client_name) {
return 2<<16|status;
}
status = snd_seq_client_name(seq_handle, client_name);
status = snd_seq_set_client_name(seq_handle, client_name);
if (status < 0) {
return 3<<16|status;
}
@ -23,7 +23,7 @@ int new_client(char* client_name) {
}
int new_port(char* port_name) {
seq_port = snd_seq_create_simple_port(seq_handle, portname,
seq_port = snd_seq_create_simple_port(seq_handle, port_name,
SND_SEQ_PORT_CAP_READ|SND_SEQ_PORT_CAP_SUBS_READ,
SND_SEQ_PORT_TYPE_MIDI_GENERIC|SND_SEQ_PORT_TYPE_APPLICATION);
if (seq_port < 0) {

View File

@ -3,10 +3,9 @@ package backend
/*
#ifndef ARREMI
#define ARREMI
#cgo CFLAGS: -Ialsa_wrapper
#cgo LDFLAGS: -lasound
#include <stdlib.h>
#include "alsa_wrapper/alsa_wrapper.h"
#include "alsa_wrapper.h"
#endif
*/
import "C"
@ -88,6 +87,6 @@ func (midiDev *MIDIDevice) AllNoteOff() {
}
}
func resolveErrCode(int code) (int, int) {
func resolveErrCode(code int) (int, int) {
return code >> 16, code & 0xffff
}