mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-17 04:06:26 +01:00
* enabled some debugging output :|
git-svn-id: svn://localhost/ardour2/branches/3.0@3321 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
8c0e27928a
commit
98e653714e
2 changed files with 8 additions and 7 deletions
|
|
@ -161,18 +161,18 @@ const MidiModel::const_iterator& MidiModel::const_iterator::operator++()
|
||||||
assert((_event.is_note() || _event.is_cc() || _event.is_pgm_change() || _event.is_pitch_bender() || _event.is_channel_aftertouch()));
|
assert((_event.is_note() || _event.is_cc() || _event.is_pgm_change() || _event.is_pitch_bender() || _event.is_channel_aftertouch()));
|
||||||
|
|
||||||
// Increment past current control event
|
// Increment past current control event
|
||||||
if (!_event.is_note() && _control_iter != _control_iters.end() && _control_iter->automation_list) {
|
if (!_event.is_note() && _control_iter != _control_iters.end() && _control_iter->automation_list.get()) {
|
||||||
double x, y;
|
double x = 0.0, y = 0.0;
|
||||||
cerr << "control_iter x:" << _control_iter->x << " y:" << _control_iter->y << endl;
|
|
||||||
const bool ret = _control_iter->automation_list->rt_safe_earliest_event_unlocked(
|
const bool ret = _control_iter->automation_list->rt_safe_earliest_event_unlocked(
|
||||||
_control_iter->x, DBL_MAX, x, y, false);
|
_control_iter->x, DBL_MAX, x, y, false);
|
||||||
|
cerr << "control_iter x:" << _control_iter->x << " y:" << _control_iter->y << endl;
|
||||||
|
|
||||||
if (ret) {
|
if (ret) {
|
||||||
//cerr << "Incremented " << _control_iter->automation_list->parameter().id() << " to " << x << endl;
|
cerr << "Incremented " << _control_iter->automation_list->parameter().id() << " to " << x << endl;
|
||||||
_control_iter->x = x;
|
_control_iter->x = x;
|
||||||
_control_iter->y = y;
|
_control_iter->y = y;
|
||||||
} else {
|
} else {
|
||||||
//cerr << "Hit end of " << _control_iter->automation_list->parameter().id() << endl;
|
cerr << "Hit end of " << _control_iter->automation_list->parameter().id() << endl;
|
||||||
_control_iter->automation_list.reset();
|
_control_iter->automation_list.reset();
|
||||||
_control_iter->x = DBL_MAX;
|
_control_iter->x = DBL_MAX;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -195,6 +195,7 @@ SMFSource::seek_to_footer_position()
|
||||||
// lets check if there is a track end marker at the end of the data
|
// lets check if there is a track end marker at the end of the data
|
||||||
fseek(_fd, -4, SEEK_END);
|
fseek(_fd, -4, SEEK_END);
|
||||||
size_t read_bytes = fread(buffer, sizeof(uint8_t), 4, _fd);
|
size_t read_bytes = fread(buffer, sizeof(uint8_t), 4, _fd);
|
||||||
|
cerr << "SMFSource::seek_to_footer_position: read size: " << read_bytes << endl;
|
||||||
if( (read_bytes == 4) &&
|
if( (read_bytes == 4) &&
|
||||||
buffer[0] == 0x00 &&
|
buffer[0] == 0x00 &&
|
||||||
buffer[1] == 0xFF &&
|
buffer[1] == 0xFF &&
|
||||||
|
|
@ -352,11 +353,11 @@ SMFSource::read_event(uint32_t* delta_t, uint32_t* size, Byte** buf) const
|
||||||
if (event_size > 1)
|
if (event_size > 1)
|
||||||
fread((*buf) + 1, 1, *size - 1, _fd);
|
fread((*buf) + 1, 1, *size - 1, _fd);
|
||||||
|
|
||||||
/*printf("SMFSource %s read event: delta = %u, size = %u, data = ", _name.c_str(), *delta_t, *size);
|
printf("SMFSource %s read event: delta = %u, size = %u, data = ", _name.c_str(), *delta_t, *size);
|
||||||
for (size_t i=0; i < *size; ++i) {
|
for (size_t i=0; i < *size; ++i) {
|
||||||
printf("%X ", (*buf)[i]);
|
printf("%X ", (*buf)[i]);
|
||||||
}
|
}
|
||||||
printf("\n"); */
|
printf("\n");
|
||||||
|
|
||||||
return (int)*size;
|
return (int)*size;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue