Comments (10)
Can you try running the code with theGODEBUG=cgocheck=2
environment variable set?
from portmidi.
@kisielk Tried that and got the same error.
from portmidi.
Okay, but you didn't get any messages from the Go runtime? Also, which version of Go are you using?
from portmidi.
go version go1.7.4 linux/amd64
Didn't notice any extra messages from the Go runtime.
from portmidi.
Also here is pacman -Qi portmidi
Name : portmidi
Version : 217-5
Description : Platform independent library for real-time MIDI input/output
Architecture : x86_64
URL : http://portmedia.sourceforge.net/
Licenses : GPL
Groups : None
Provides : None
Depends On : alsa-lib
Optional Deps : java-runtime: for using pmdefaults
Required By : None
Optional For : None
Conflicts With : None
Replaces : None
Installed Size : 154.00 KiB
Packager : Eric Belanger <[email protected]>
Build Date : Sat 26 Oct 2013 12:14:09 PM CDT
Install Date : Sat 14 Jan 2017 04:26:42 PM CST
Install Reason : Explicitly installed
Install Script : No
Validated By : Signature
from portmidi.
Reviewing the cgo docs it says that the GODEBUG checks are sidestepped by code that uses package unsafe, and the code that is crashing in this case does use unsafe. I wonder if it's possible to not use unsafe?
from portmidi.
Looks like we have to use unsafe.Pointer since PortMidiStream is void
from portmidi.
FWIW I started playing with an alternative midi implementation https://github.com/scgolang/midi seems pretty stable on linux so far, haven't used it on mac much yet
from portmidi.
@briansorahan cool, I will check it out. One thing I'm struggling with in PortMIDI is to have an efficient way to have channels for incoming MIDI events implemented in an efficient way, preferably without polling. Seems like using ALSA might solve that.
from portmidi.
@kisielk Writing that package has been interesting so far. The linux part took me maybe two hours and resulted in a beautiful tiny interface which basically just had Open, Read, Write, and Close. Read would block until I sent data from the device, which seemed just perfect to me since consumers of the package can easily type go
to make it nonblocking.
Wrapping coremidi caused me to rewrite the linux code though because in order to get data from the device you register a callback.
So now I return a channel for reading in both the linux and darwin code.
from portmidi.
Related Issues (19)
- Event buffers are causing much garbage, improve if there is a latency problem HOT 1
- Channel filtering doesn't look right ... HOT 1
- Why "portmidi.CountDevices()" always return 0?
- 'portmidi.h' file not found HOT 4
- Event struct doesn't expose entire Message slice HOT 4
- How to install libportmidi on OSX? HOT 16
- Could not determine kind of name HOT 1
- no debian package for version 217 available HOT 9
- Distribute portmidi and porttime headers as a part of the repo
- Golang MIDI collaboration HOT 3
- go signal killed when running example
- Duplicate symbol messages on Apple Mac HOT 2
- Segv when reading and writing a storm of events HOT 1
- Listen() has no stop mechanism.
- Issue sending midi messages on Mac OS Montery HOT 4
- Read(max int) errors on system real time messages
- How to send output and have the timestamps be honored?
- Using ch := in.Listen() seems to lose data HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from portmidi.