Index: branches/libfreebob-1.0/configure.ac =================================================================== --- branches/libfreebob-1.0/configure.ac (revision 468) +++ branches/libfreebob-1.0/configure.ac (revision 513) @@ -24,5 +24,5 @@ m4_define(freebob_major_version, 1) m4_define(freebob_minor_version, 0) -m4_define(freebob_micro_version, 3) +m4_define(freebob_micro_version, 4) m4_define(freebob_version, freebob_major_version.freebob_minor_version.freebob_micro_version) Index: branches/libfreebob-1.0/src/libfreebobstreaming/freebob_connections.c =================================================================== --- branches/libfreebob-1.0/src/libfreebobstreaming/freebob_connections.c (revision 328) +++ branches/libfreebob-1.0/src/libfreebobstreaming/freebob_connections.c (revision 513) @@ -197,4 +197,5 @@ err=0; + int midi_channel=0; for (s=0;snb_streams;s++) { err=freebob_streaming_init_stream(dev,&connection->streams[s],connection->spec.stream_info->streams[s]); Index: branches/libfreebob-1.0/src/libfreebobstreaming/freebob_streaming.c =================================================================== --- branches/libfreebob-1.0/src/libfreebobstreaming/freebob_streaming.c (revision 431) +++ branches/libfreebob-1.0/src/libfreebobstreaming/freebob_streaming.c (revision 513) @@ -226,5 +226,4 @@ dev->connections=calloc(dev->nb_connections_playback+dev->nb_connections_capture, sizeof(freebob_connection_t)); - for (c=0;cnb_connections_capture;c++) { memcpy(&dev->connections[c].spec, libfreebob_capture_connections->connections[c], sizeof(freebob_connection_spec_t)); @@ -236,4 +235,29 @@ } + // In order to correct for bogus midi channel numbers + // we redefine the location parameter to the order the + // channels appear in the specification + int midichannel=0; + for (c=0;cnb_connections_capture;c++) { + midichannel=0; + int s; + freebob_connection_t *connection= &(dev->connections[c]); + for (s=0;sspec.stream_info->nb_streams;s++) { + if(connection->spec.stream_info->streams[s]->format == IEC61883_STREAM_TYPE_MIDI) { + connection->spec.stream_info->streams[s]->location=midichannel++; + } + } + } + for (c=0;cnb_connections_playback;c++) { + midichannel=0; + int s; + freebob_connection_t *connection= &(dev->connections[c+dev->nb_connections_capture]); + for (s=0;sspec.stream_info->nb_streams;s++) { + if(connection->spec.stream_info->streams[s]->format == IEC61883_STREAM_TYPE_MIDI) { + connection->spec.stream_info->streams[s]->location=midichannel++; + } + } + } + /* Figure out a master connection. * Either it is given in the spec libfreebob