Fix seeking for SCVA.

CQTexperiment
Christopher Snowhill 2016-12-20 16:59:44 -08:00
parent 3ff4892a1a
commit 3cd248f126
4 changed files with 14 additions and 0 deletions

View File

@ -291,11 +291,18 @@ void MIDIPlayer::Seek(unsigned long sample)
}
}
}
float temp[32];
bool needs_time = send_event_needs_time();
for (i = 0; i < stream_start; i++)
{
if (me[i].m_event)
{
send_event(me[i].m_event);
if (needs_time)
render(temp, 16);
}
}
}
}

View File

@ -27,6 +27,7 @@ public:
void Seek(unsigned long sample);
protected:
virtual bool send_event_needs_time() { return false; }
virtual void send_event(uint32_t b) {}
virtual void render(float * out, unsigned long count) {}

View File

@ -336,3 +336,8 @@ unsigned int SCPlayer::get_playing_note_count()
return total;
}
bool SCPlayer::send_event_needs_time()
{
return true;
}

View File

@ -34,6 +34,7 @@ public:
void set_sccore_path(const char * path);
protected:
virtual bool send_event_needs_time();
virtual void send_event(uint32_t b);
virtual void render(float * out, unsigned long count);