Fix seeking for SCVA.
parent
3ff4892a1a
commit
3cd248f126
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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) {}
|
||||
|
||||
|
|
|
@ -336,3 +336,8 @@ unsigned int SCPlayer::get_playing_note_count()
|
|||
|
||||
return total;
|
||||
}
|
||||
|
||||
bool SCPlayer::send_event_needs_time()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue