Giter Club home page Giter Club logo

go-jack's People

Contributors

andrepxx avatar angadn avatar bhechinger avatar boomlinde avatar gethiox avatar munshkr avatar padster avatar ryosukecla avatar ugur-zongur avatar xthexder avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

go-jack's Issues

midipassthrough SuspendRefNum error

I'm unable to run the midi pass through example. First of all it was segfaulting but I resolved the by moving the port registration lines as per issue #13.

Now I am getting SuspendRefNum error.

Anyway the client creates and then crashes. Here is the output from the terminal:

[Running] go run "/home/john/go/src/github.com/xthexder/go-jack/example/midipassthrough.go"
Jack: JackClient::SetupDriverSync driver sem in flush mode
Jack: JackLinuxFutex::Connect name = jack_sem.1000_default_Go Midi Passthrough
Jack: Clock source : system clock via clock_gettime
Jack: JackLibClient::Open name = Go Midi Passthrough refnum = 5
Jack: JackClient::PortRegister ref = 5 name = Go Midi Passthrough:midi_in type = 8 bit raw midi port_index = 45
Jack: JackClient::PortRegister ref = 5 name = Go Midi Passthrough:midi_out type = 8 bit raw midi port_index = 46
Jack: JackClient::Activate
Jack: JackPosixThread::StartImp : create non RT thread
Jack: JackPosixThread::ThreadHandler : start
Jack: JackClient::kBufferSizeCallback buffer_size = 128
Jack: JackClient::Init : period = 2666 computation = 300 constraint = 2666
Jack: JackPosixThread::AcquireRealTimeImp priority = 1
Jack: JackClient::ClientNotify ref = 5 name = Go Midi Passthrough notify = 2
Jack: JackClient::kActivateClient name = Go Midi Passthrough ref = 5

Jack: JackClient::ClientNotify ref = 5 name = Go Midi Passthrough notify = 18
Jack: JackClient::ClientNotify ref = 5 name = Go Midi Passthrough notify = 18
Jack: JackClient::ClientNotify ref = 5 name = Go Midi Passthrough notify = 18
Jack: JackClient::ClientNotify ref = 5 name = Go Midi Passthrough notify = 18
SuspendRefNum error
JackClient::Execute error name = Go Midi Passthrough
Jack: JackLibClient::ShutDown
Jack: JackClient::ShutDown
Jack: JackPosixThread::Terminate
Jack: jack_client_close
Jack: JackClient::Close ref = 5
Jack: JackClient::Deactivate
Jack: JackSocketClientChannel::Stop
Jack: JackPosixThread::Kill
Jack: JackClientSocket::Close
Jack: JackClientSocket::Close
Jack: JackLibClient::~JackLibClient
Jack: JackShmReadWritePtr1::~JackShmReadWritePtr1 4
Jack: Succeeded in unlocking 426 byte memory area
Jack: JackLibGlobals Destroy 150fad0
Jack: ~JackLibGlobals
Jack: no message buffer overruns
Server is not running
Jack: JackPosixThread::Stop
Jack: JackPosixThread::ThreadHandler : exit
Jack: JackShmReadWritePtr::~JackShmReadWritePtr 1
Jack: Succeeded in unlocking 1187 byte memory area
Jack: JackShmReadWritePtr::~JackShmReadWritePtr 0
Jack: Succeeded in unlocking 107341338 byte memory area
Jack: jack_client_close res = -1

[Done] exited with code=0 in 1.782 seconds

Segmentation fault when trying to run example/midipassthrough.go

When I'm trying to run the midipassthrough.go example, I frequently get the following error especially when jackd period is set to small frame numbers e.g. -p128:

[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x9231c]

goroutine 17 [running, locked to thread]:
github.com/xthexder/go-jack.(*Port).GetMidiEvents(0x0, 0x100, 0x17284, 0x418130, 0x0)
        /home/chip/go/src/github.com/xthexder/go-jack/jack.go:361 +0x28
main.process(0x100, 0x442160)
        /home/chip/go/src/github.com/xthexder/go-jack/example/midipassthrough.go:15 +0x28
github.com/xthexder/go-jack.goProcess(0x100, 0x15e290, 0x4003c8)
        /home/chip/go/src/github.com/xthexder/go-jack/callbacks.go:19 +0x4c
github.com/xthexder/go-jack._cgoexpwrap_c157c22331d8_goProcess(0x100, 0x15e290, 0xb6f48e97)
        _cgo_gotypes.go:624 +0x24
exit status 2

I think it's because the client.SetProcessCallback(process) is called before the assignment of portIn is done.

Difficult building on Windows

When I first tried building one of the examples on Windows 10 (with mingw-w64), I go this compile error:
image

To get around this issue, I modified the jack.go that was installed from the Go module, adding flags with the path for JACK2 libraries and headers:
image

After that the example built fine. Maybe I was doing something wrong before? Or maybe jack.go can be more platform-independent by using pkg-config?

Implement additional API calls for controlling latency / buffer size?

This is not a bug report, but a feature request.

Seeing you already implement ...

jack_nframes_t jack_get_sample_rate(jack_client_t*)

... could you perhaps also implement the following API calls.

jack_nframes_t jack_get_buffer_size(jack_client_t*)
int jack_set_buffer_size(jack_client_t*, jack_nframes_t)

It would be really cool if I was able to control JACK latency "on-the-fly" from within my application.

This would allow the user to increase latency when performing more "sophisticated" processing and reduce latency again when performing "simpler" processing, without leaving the application.

[question] Go and jackd

How mature is this library? There is not too much activity lately right?

A bit offtopic, but how well suited is Go for developing proaudio applications (with jackd)?

Does the language being used influence the latency for instance, or is that the concern of jackd?

Compile errors on macOS 10.13.6

When I try to run the passthrough example on my macbook I get the following:

± go run passthrough.go
# github.com/xthexder/go-jack
Undefined symbols for architecture x86_64:
  "_jack_activate", referenced from:
      __cgo_c2d4f1e0b1b0_Cfunc_jack_activate in _x004.o
     (maybe you meant: __cgo_c2d4f1e0b1b0_Cfunc_jack_activate)
  "_jack_client_close", referenced from:
      __cgo_c2d4f1e0b1b0_Cfunc_jack_client_close in _x004.o
     (maybe you meant: __cgo_c2d4f1e0b1b0_Cfunc_jack_client_close)
  "_jack_client_name_size", referenced from:
      __cgo_c2d4f1e0b1b0_Cfunc_jack_client_name_size in _x004.o
     (maybe you meant: __cgo_c2d4f1e0b1b0_Cfunc_jack_client_name_size)
  "_jack_client_open", referenced from:
      _jack_client_open_go in _x004.o
      __cgo_c2d4f1e0b1b0_Cfunc_jack_client_open_go in _x004.o
     (maybe you meant: __cgo_c2d4f1e0b1b0_Cfunc_jack_client_open_go, _jack_client_open_go )
  "_jack_connect", referenced from:
      __cgo_c2d4f1e0b1b0_Cfunc_jack_connect in _x004.o
     (maybe you meant: __cgo_c2d4f1e0b1b0_Cfunc_jack_connect)
  "_jack_disconnect", referenced from:
      __cgo_c2d4f1e0b1b0_Cfunc_jack_disconnect in _x004.o
     (maybe you meant: __cgo_c2d4f1e0b1b0_Cfunc_jack_disconnect)
  "_jack_free", referenced from:
      __cgo_c2d4f1e0b1b0_Cfunc_jack_free in _x004.o
     (maybe you meant: __cgo_c2d4f1e0b1b0_Cfunc_jack_free)
  "_jack_get_buffer_size", referenced from:
      __cgo_c2d4f1e0b1b0_Cfunc_jack_get_buffer_size in _x004.o
     (maybe you meant: __cgo_c2d4f1e0b1b0_Cfunc_jack_get_buffer_size)
  "_jack_get_client_name", referenced from:
      __cgo_c2d4f1e0b1b0_Cfunc_jack_get_client_name in _x004.o
     (maybe you meant: __cgo_c2d4f1e0b1b0_Cfunc_jack_get_client_name)
  "_jack_get_ports", referenced from:
      __cgo_c2d4f1e0b1b0_Cfunc_jack_get_ports in _x004.o
     (maybe you meant: __cgo_c2d4f1e0b1b0_Cfunc_jack_get_ports)
  "_jack_get_sample_rate", referenced from:
      __cgo_c2d4f1e0b1b0_Cfunc_jack_get_sample_rate in _x004.o
     (maybe you meant: __cgo_c2d4f1e0b1b0_Cfunc_jack_get_sample_rate)
  "_jack_is_realtime", referenced from:
      __cgo_c2d4f1e0b1b0_Cfunc_jack_is_realtime in _x004.o
     (maybe you meant: __cgo_c2d4f1e0b1b0_Cfunc_jack_is_realtime)
  "_jack_midi_clear_buffer", referenced from:
      __cgo_c2d4f1e0b1b0_Cfunc_jack_midi_clear_buffer in _x004.o
     (maybe you meant: __cgo_c2d4f1e0b1b0_Cfunc_jack_midi_clear_buffer)
  "_jack_midi_event_get", referenced from:
      __cgo_c2d4f1e0b1b0_Cfunc_jack_midi_event_get in _x004.o
     (maybe you meant: __cgo_c2d4f1e0b1b0_Cfunc_jack_midi_event_get)
  "_jack_midi_event_write", referenced from:
      __cgo_c2d4f1e0b1b0_Cfunc_jack_midi_event_write in _x004.o
     (maybe you meant: __cgo_c2d4f1e0b1b0_Cfunc_jack_midi_event_write)
  "_jack_midi_get_event_count", referenced from:
      __cgo_c2d4f1e0b1b0_Cfunc_jack_midi_get_event_count in _x004.o
     (maybe you meant: __cgo_c2d4f1e0b1b0_Cfunc_jack_midi_get_event_count)
  "_jack_on_shutdown", referenced from:
      _jack_on_shutdown_go in _x004.o
      __cgo_c2d4f1e0b1b0_Cfunc_jack_on_shutdown_go in _x004.o
     (maybe you meant: __cgo_c2d4f1e0b1b0_Cfunc_jack_on_shutdown_go, _jack_on_shutdown_go )
  "_jack_port_by_id", referenced from:
      __cgo_c2d4f1e0b1b0_Cfunc_jack_port_by_id in _x004.o
     (maybe you meant: __cgo_c2d4f1e0b1b0_Cfunc_jack_port_by_id)
  "_jack_port_by_name", referenced from:
      __cgo_c2d4f1e0b1b0_Cfunc_jack_port_by_name in _x004.o
     (maybe you meant: __cgo_c2d4f1e0b1b0_Cfunc_jack_port_by_name)
  "_jack_port_get_buffer", referenced from:
      __cgo_c2d4f1e0b1b0_Cfunc_jack_port_get_buffer in _x004.o
     (maybe you meant: __cgo_c2d4f1e0b1b0_Cfunc_jack_port_get_buffer)
  "_jack_port_get_connections", referenced from:
      __cgo_c2d4f1e0b1b0_Cfunc_jack_port_get_connections in _x004.o
     (maybe you meant: __cgo_c2d4f1e0b1b0_Cfunc_jack_port_get_connections)
  "_jack_port_is_mine", referenced from:
      __cgo_c2d4f1e0b1b0_Cfunc_jack_port_is_mine in _x004.o
     (maybe you meant: __cgo_c2d4f1e0b1b0_Cfunc_jack_port_is_mine)
  "_jack_port_name", referenced from:
      __cgo_c2d4f1e0b1b0_Cfunc_jack_port_name in _x004.o
     (maybe you meant: __cgo_c2d4f1e0b1b0_Cfunc_jack_port_name)
  "_jack_port_register", referenced from:
      __cgo_c2d4f1e0b1b0_Cfunc_jack_port_register in _x004.o
     (maybe you meant: __cgo_c2d4f1e0b1b0_Cfunc_jack_port_register)
  "_jack_port_short_name", referenced from:
      __cgo_c2d4f1e0b1b0_Cfunc_jack_port_short_name in _x004.o
     (maybe you meant: __cgo_c2d4f1e0b1b0_Cfunc_jack_port_short_name)
  "_jack_port_type", referenced from:
      __cgo_c2d4f1e0b1b0_Cfunc_jack_port_type in _x004.o
     (maybe you meant: __cgo_c2d4f1e0b1b0_Cfunc_jack_port_type)
  "_jack_port_unregister", referenced from:
      __cgo_c2d4f1e0b1b0_Cfunc_jack_port_unregister in _x004.o
     (maybe you meant: __cgo_c2d4f1e0b1b0_Cfunc_jack_port_unregister)
  "_jack_set_buffer_size_callback", referenced from:
      _jack_set_buffer_size_callback_go in _x004.o
      __cgo_c2d4f1e0b1b0_Cfunc_jack_set_buffer_size_callback_go in _x004.o
     (maybe you meant: __cgo_c2d4f1e0b1b0_Cfunc_jack_set_buffer_size_callback_go, _jack_set_buffer_size_callback_go )
  "_jack_set_error_function", referenced from:
      _jack_set_error_function_go in _x004.o
      __cgo_c2d4f1e0b1b0_Cfunc_jack_set_error_function_go in _x004.o
     (maybe you meant: __cgo_c2d4f1e0b1b0_Cfunc_jack_set_error_function_go, _jack_set_error_function_go )
  "_jack_set_info_function", referenced from:
      _jack_set_info_function_go in _x004.o
      __cgo_c2d4f1e0b1b0_Cfunc_jack_set_info_function_go in _x004.o
     (maybe you meant: __cgo_c2d4f1e0b1b0_Cfunc_jack_set_info_function_go, _jack_set_info_function_go )
  "_jack_set_port_connect_callback", referenced from:
      _jack_set_port_connect_callback_go in _x004.o
      __cgo_c2d4f1e0b1b0_Cfunc_jack_set_port_connect_callback_go in _x004.o
     (maybe you meant: __cgo_c2d4f1e0b1b0_Cfunc_jack_set_port_connect_callback_go, _jack_set_port_connect_callback_go )
  "_jack_set_port_registration_callback", referenced from:
      _jack_set_port_registration_callback_go in _x004.o
      __cgo_c2d4f1e0b1b0_Cfunc_jack_set_port_registration_callback_go in _x004.o
     (maybe you meant: __cgo_c2d4f1e0b1b0_Cfunc_jack_set_port_registration_callback_go, _jack_set_port_registration_callback_go )
  "_jack_set_port_rename_callback", referenced from:
      _jack_set_port_rename_callback_go in _x004.o
      __cgo_c2d4f1e0b1b0_Cfunc_jack_set_port_rename_callback_go in _x004.o
     (maybe you meant: __cgo_c2d4f1e0b1b0_Cfunc_jack_set_port_rename_callback_go, _jack_set_port_rename_callback_go )
  "_jack_set_process_callback", referenced from:
      _jack_set_process_callback_go in _x004.o
      __cgo_c2d4f1e0b1b0_Cfunc_jack_set_process_callback_go in _x004.o
     (maybe you meant: __cgo_c2d4f1e0b1b0_Cfunc_jack_set_process_callback_go, _jack_set_process_callback_go )
  "_jack_set_sample_rate_callback", referenced from:
      _jack_set_sample_rate_callback_go in _x004.o
      __cgo_c2d4f1e0b1b0_Cfunc_jack_set_sample_rate_callback_go in _x004.o
     (maybe you meant: __cgo_c2d4f1e0b1b0_Cfunc_jack_set_sample_rate_callback_go, _jack_set_sample_rate_callback_go )
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
# github.com/xthexder/go-jack
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:11:9: warning: 'EAGAIN' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:129:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:12:9: warning: 'EWOULDBLOCK' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:130:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:36:9: warning: 'EDEADLK' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:98:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:37:9: warning: 'ENAMETOOLONG' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:181:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:38:9: warning: 'ENOLCK' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:208:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:39:9: warning: 'ENOSYS' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:209:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:40:9: warning: 'ENOTEMPTY' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:188:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:41:9: warning: 'ELOOP' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:180:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:42:9: warning: 'ENOMSG' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:234:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:43:9: warning: 'EIDRM' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:233:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:60:9: warning: 'ENOSTR' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:245:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:61:9: warning: 'ENODATA' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:242:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:62:9: warning: 'ETIME' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:247:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:63:9: warning: 'ENOSR' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:244:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:66:9: warning: 'EREMOTE' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:200:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:67:9: warning: 'ENOLINK' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:243:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:71:9: warning: 'EPROTO' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:246:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:72:9: warning: 'EMULTIHOP' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:241:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:74:9: warning: 'EBADMSG' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:240:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:75:9: warning: 'EOVERFLOW' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:221:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:84:9: warning: 'EILSEQ' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:235:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:87:9: warning: 'EUSERS' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:193:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:88:9: warning: 'ENOTSOCK' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:135:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:89:9: warning: 'EDESTADDRREQ' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:136:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:90:9: warning: 'EMSGSIZE' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:137:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:91:9: warning: 'EPROTOTYPE' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:138:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:92:9: warning: 'ENOPROTOOPT' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:139:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:93:9: warning: 'EPROTONOSUPPORT' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:140:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:94:9: warning: 'ESOCKTNOSUPPORT' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:142:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:95:9: warning: 'EOPNOTSUPP' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:251:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:96:9: warning: 'EPFNOSUPPORT' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:158:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:97:9: warning: 'EAFNOSUPPORT' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:160:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:98:9: warning: 'EADDRINUSE' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:161:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:99:9: warning: 'EADDRNOTAVAIL' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:162:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:100:9: warning: 'ENETDOWN' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:165:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:101:9: warning: 'ENETUNREACH' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:166:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:102:9: warning: 'ENETRESET' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:167:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:103:9: warning: 'ECONNABORTED' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:168:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:104:9: warning: 'ECONNRESET' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:169:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:105:9: warning: 'ENOBUFS' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:170:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:106:9: warning: 'EISCONN' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:171:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:107:9: warning: 'ENOTCONN' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:172:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:108:9: warning: 'ESHUTDOWN' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:174:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:109:9: warning: 'ETOOMANYREFS' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:175:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:110:9: warning: 'ETIMEDOUT' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:177:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:111:9: warning: 'ECONNREFUSED' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:178:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:112:9: warning: 'EHOSTDOWN' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:185:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:113:9: warning: 'EHOSTUNREACH' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:187:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:114:9: warning: 'EALREADY' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:132:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:115:9: warning: 'EINPROGRESS' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:131:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:116:9: warning: 'ESTALE' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:198:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:122:9: warning: 'EDQUOT' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:195:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:125:9: warning: 'ECANCELED' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:231:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:130:9: warning: 'EOWNERDEAD' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:258:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:131:9: warning: 'ENOTRECOVERABLE' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:257:9: note: previous definition is here
In file included from cgo-gcc-prolog:21:
src/github.com/xthexder/go-jack/errno.h:134:9: warning: 'ENOTSUP' macro redefined [-Wmacro-redefined]
/usr/include/sys/errno.h:144:9: note: previous definition is here

Couple of questions here:

  1. What version of Jack did you write this wrapper for?
  2. What system did you write this on?

Example code frequently fails with error "SuspendRefNum"

I've been trying to use this library for a small project, but upon investigating issues with my code, I noticed that it, and the pass-through example code for this library both fail on approximately 9/10 executions with the error:

SuspendRefNum error
JackClient::Execute error name = AudioStreamer

I've tried quite a number of workarounds, jackd settings and even a different computer (both running close to stock ubuntu studio). Does anyone have any ideas of what the cause may be? I'm utterly perplexed that sometimes it will just work fine.

cgo compile error when trying to build with go-jack as dependency

When I try to build the example/passthrough.go file.
I get the following error:

# github.com/xthexder/go-jack
_cgo_export.c: In function ‘goPortRegistration’:
_cgo_export.c:81:38: error: parameter name omitted
   81 | void goPortRegistration(GoUint port, GoInt register, void* arg)
      |                                      ^~~~~~~~~~~~~~
_cgo_export.c:90:14: error: expected expression before ‘register’
   90 |  _cgo_a.p1 = register;
      |              ^~~~~~~~

I've installed go-jack using go get github.com/xthexder/go-jack
And tried building the passthough file using the makefile and using go-jack

My specs are:
OS: Arch Linux
Kernel: 5.7.12-arch1-1
Jackd Version: 1.9.14
Go version: 1.15

Compiles with warnings

On Go 1.8.3, the library compiles with warnings.

# github.com/xthexder/go-jack
../github.com/xthexder/go-jack/jack.go: In Funktion »jack_set_port_rename_callback_go«:
../github.com/xthexder/go-jack/jack.go:38:47: Warnung: Übergabe des Arguments 2 von »jack_set_port_rename_callback« von inkompatiblem Zeigertyp [-Wincompatible-pointer-types]
  return jack_set_port_rename_callback(client, goPortRename, callback);
                                               ^~~~~~~~~~~~
In file included from ../github.com/xthexder/go-jack/jack.go:6:0:
/usr/include/jack/jack.h:523:5: Anmerkung: »JackPortRenameCallback {alias int (*)(unsigned int,  const char *, const char *, void *)}« erwartet, aber Argument hat Typ »void (*)(jack_port_id_t,  const char *, const char *, void *) {alias void (*)(unsigned int,  const char *, const char *, void *)}«
 int jack_set_port_rename_callback (jack_client_t *client,
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

It still compiles and works properly, but it would be nice to have this pointer corrected so that it compiles without warnings. It's a bit of a hassle when using this library inside a larger project, since one always has to look twice at the compiler output to check if there's actually something wrong with the code or if it's "just the usual warnings from the go-jack bindings".

Passthrough exemple not working depending on the input

Hello, I tried to use the pass-through example. If it is working when I am routing the sound from my yeti, but it is not working for any other sources (firefox, discord, scream, ...). Is it a known problem or do anyone have a clue where I should look for solving this ?

I am using pipewire on linux and haven't modified the example.

On Go 1.8 : cgo argument has Go pointer to Go pointer

Here is my go version go1.8.1 linux/amd64

My program compile fine, but then it crashes with this error.
Just to warn you, I am investigating...

go run main.go

2017/06/11 20:00:17 [START] Server 127.0.0.1:1234
Jack: JackClient::SetupDriverSync driver sem in flush mode
Jack: JackPosixSemaphore::Connect name = jack_sem.1000_default_test
Jack: JackPosixSemaphore::Connect sem_getvalue 0
Jack: Clock source : system clock via clock_gettime
Jack: JackLibClient::Open name = test refnum = 6

panic: runtime error: cgo argument has Go pointer to Go pointer

goroutine 5 [running]:
github.com/xthexder/go-jack.(*Client).SetProcessCallback.func1(0x7f7c4800d2f0, 0xc4200f8048, 0x593d8501)
	/home/ohohleo/projects/go/src/github.com/xthexder/go-jack/jack.go:141 +0xe4
github.com/xthexder/go-jack.(*Client).SetProcessCallback(0xc4200f8040, 0xc4200fa010, 0xb15120)
	/home/ohohleo/projects/go/src/github.com/xthexder/go-jack/jack.go:141 +0x51
github.com/ohohleo/violin/input.NewAudio(0x777440, 0x4, 0x0, 0x0, 0x0)
	/home/ohohleo/projects/go/src/github.com/ohohleo/violin/input/audio.go:122 +0x2e8
main.main.func1(0xc420014e10)
	/home/ohohleo/violin/src/go/main.go:62 +0x48
created by main.main
	/home/ohohleo/violin/src/go/main.go:79 +0xb7
exit status 2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.