Esempio n. 1
0
File: Note.cpp Progetto: 63n/ardour
Note<Time>::Note(const Note<Time>& copy)
	: _on_event(copy._on_event, true)
	, _off_event(copy._off_event, true)
{
	set_id (copy.id());

	assert(_on_event.buffer());
	assert(_off_event.buffer());
	/*
	  assert(copy._on_event.size == 3);
	  _on_event.buffer = _on_event_buffer;
	  memcpy(_on_event_buffer, copy._on_event_buffer, 3);

	  assert(copy._off_event.size == 3);
	  _off_event.buffer = _off_event_buffer;
	  memcpy(_off_event_buffer, copy._off_event_buffer, 3);
	*/

	assert(time() == copy.time());
	assert(end_time() == copy.end_time());
	assert(length() == copy.length());
	assert(note() == copy.note());
	assert(velocity() == copy.velocity());
	assert(_on_event.channel() == _off_event.channel());
	assert(channel() == copy.channel());
}
Esempio n. 2
0
File: Note.cpp Progetto: 63n/ardour
const Note<Time>&
Note<Time>::operator=(const Note<Time>& other)
{
	_on_event = other._on_event;
	_off_event = other._off_event;

	assert(time() == other.time());
	assert(end_time() == other.end_time());
	assert(length() == other.length());
	assert(note() == other.note());
	assert(velocity() == other.velocity());
	assert(_on_event.channel() == _off_event.channel());
	assert(channel() == other.channel());

	return *this;
}