| 237 | // In order to correct for bogus midi channel numbers |
---|
| 238 | // we redefine the location parameter to the order the |
---|
| 239 | // channels appear in the specification |
---|
| 240 | int midichannel=0; |
---|
| 241 | for (c=0;c<dev->nb_connections_capture;c++) { |
---|
| 242 | midichannel=0; |
---|
| 243 | int s; |
---|
| 244 | freebob_connection_t *connection= &(dev->connections[c]); |
---|
| 245 | for (s=0;s<connection->spec.stream_info->nb_streams;s++) { |
---|
| 246 | if(connection->spec.stream_info->streams[s]->format == IEC61883_STREAM_TYPE_MIDI) { |
---|
| 247 | connection->spec.stream_info->streams[s]->location=midichannel++; |
---|
| 248 | } |
---|
| 249 | } |
---|
| 250 | } |
---|
| 251 | for (c=0;c<dev->nb_connections_playback;c++) { |
---|
| 252 | midichannel=0; |
---|
| 253 | int s; |
---|
| 254 | freebob_connection_t *connection= &(dev->connections[c+dev->nb_connections_capture]); |
---|
| 255 | for (s=0;s<connection->spec.stream_info->nb_streams;s++) { |
---|
| 256 | if(connection->spec.stream_info->streams[s]->format == IEC61883_STREAM_TYPE_MIDI) { |
---|
| 257 | connection->spec.stream_info->streams[s]->location=midichannel++; |
---|
| 258 | } |
---|
| 259 | } |
---|
| 260 | } |
---|
| 261 | |
---|