Changeset 812
- Timestamp:
- 01/05/08 12:02:13 (13 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/api-cleanup/src/libstreaming/amdtp/AmdtpTransmitStreamProcessor.cpp
r811 r812 646 646 unsigned int position = p->getPosition(); 647 647 unsigned int location = p->getLocation(); 648 char byte; 649 648 650 649 quadlet_t *target_event; 651 650 quadlet_t tmpval; … … 670 669 if ( *buffer & 0xFF000000 ) // we can send a byte 671 670 { 672 byte = *buffer & 0xFF; 673 tmpval=htonl(IEC61883_AM824_SET_LABEL((byte)<<16, IEC61883_AM824_LABEL_MIDI_1X)); 674 675 // debugOutput ( DEBUG_LEVEL_ULTRA_VERBOSE, "MIDI port %s, pos=%d, loc=%d, nevents=%d, dim=%d\n", 676 // p->getName().c_str(), position, location, nevents, m_dimension ); 677 // debugOutput ( DEBUG_LEVEL_ULTRA_VERBOSE, "base=%p, target=%p, value=%08X\n", 678 // data, target_event, tmpval ); 671 tmpval = ((*buffer)<<16) & 0x00FF0000; 672 tmpval=IEC61883_AM824_SET_LABEL(tmpval, IEC61883_AM824_LABEL_MIDI_1X); 673 *target_event = htonl(tmpval); 674 675 // debugOutput ( DEBUG_LEVEL_VERBOSE, "MIDI port %s, pos=%u, loc=%u, nevents=%u, dim=%d\n", 676 // p->getName().c_str(), position, location, nevents, m_dimension ); 677 // debugOutput ( DEBUG_LEVEL_VERBOSE, "base=%p, target=%p, value=%08X\n", 678 // data, target_event, tmpval ); 679 679 } else { 680 680 // can't send a byte, either because there is no byte, 681 681 // or because this would exceed the maximum rate 682 tmpval=htonl(IEC61883_AM824_SET_LABEL(0, IEC61883_AM824_LABEL_MIDI_NO_DATA)); 682 // FIXME: this can be ifdef optimized since it's a constant 683 *target_event = htonl(IEC61883_AM824_SET_LABEL(0, IEC61883_AM824_LABEL_MIDI_NO_DATA)); 683 684 } 684 *target_event=tmpval;685 685 buffer+=8; 686 686 } branches/api-cleanup/tests/streaming/teststreaming3.cpp
r811 r812 355 355 ffado_streaming_set_playback_buffer_type(dev, i, ffado_buffer_type_midi); 356 356 ffado_streaming_set_playback_stream_buffer(dev, i, (char *)(audiobuffers_out[i])); 357 ffado_streaming_playback_stream_onoff(dev, i, 0);357 ffado_streaming_playback_stream_onoff(dev, i, 1); 358 358 default: 359 359 break; … … 448 448 } 449 449 } 450 } 451 450 for (i=0; i < nb_out_channels; i++) { 451 if (ffado_streaming_get_playback_stream_type(dev,i) == ffado_stream_type_midi) { 452 uint32_t *midievent = (uint32_t *)audiobuffers_out[i]; 453 *midievent = 0x010000FF; 454 break; 455 } 456 } 457 458 } 459 452 460 ffado_streaming_transfer_playback_buffers(dev); 453 461 454 462 nb_periods++; 455 463 frame_counter += arguments.period;