Re: [LAD] Segfault when trying to dereference __midi_event.buffer (c++ newbie question)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Shani Hadiyanto Pribadi <shanipribadi@...>
Cc: <linux-audio-dev@...>
Date: Wednesday, November 21, 2012 - 12:49 pm

On Wed, Nov 21, 2012 at 06:54:03PM +0700, Shani Hadiyanto Pribadi wrote:

> jack_midi_event_get(&in_event, midi_buf, event_index);

You should test the return value of jack_midi_event_get().
The contents of in_event are valid only if that is zero,
which means there actually was an event to be read.

Ciao,

--
FA

A world of exhaustive, reliable metadata would be an utopia.
It's also a pipe-dream, founded on self-delusion, nerd hubris
and hysterically inflated market opportunities. (Cory Doctorow)

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[LAD] Segfault when trying to dereference __midi_event.buffe..., Shani Hadiyanto Pribadi, (Wed Nov 21, 11:54 am)
Re: [LAD] Segfault when trying to dereference __midi_event.b..., Fons Adriaensen, (Wed Nov 21, 12:49 pm)
Re: [LAD] Segfault when trying to dereference __midi_event.b..., Shani Hadiyanto Pribadi, (Wed Nov 21, 12:49 pm)
Re: [LAD] Segfault when trying to dereference __midi_event.b..., Harry van Haaren, (Wed Nov 21, 12:14 pm)