Fix seeking for SCVA.
This commit is contained in:
parent
3ff4892a1a
commit
3cd248f126
4 changed files with 14 additions and 0 deletions
|
@ -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++)
|
for (i = 0; i < stream_start; i++)
|
||||||
{
|
{
|
||||||
if (me[i].m_event)
|
if (me[i].m_event)
|
||||||
|
{
|
||||||
send_event(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);
|
void Seek(unsigned long sample);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
virtual bool send_event_needs_time() { return false; }
|
||||||
virtual void send_event(uint32_t b) {}
|
virtual void send_event(uint32_t b) {}
|
||||||
virtual void render(float * out, unsigned long count) {}
|
virtual void render(float * out, unsigned long count) {}
|
||||||
|
|
||||||
|
|
|
@ -336,3 +336,8 @@ unsigned int SCPlayer::get_playing_note_count()
|
||||||
|
|
||||||
return total;
|
return total;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool SCPlayer::send_event_needs_time()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
|
@ -34,6 +34,7 @@ public:
|
||||||
void set_sccore_path(const char * path);
|
void set_sccore_path(const char * path);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
virtual bool send_event_needs_time();
|
||||||
virtual void send_event(uint32_t b);
|
virtual void send_event(uint32_t b);
|
||||||
virtual void render(float * out, unsigned long count);
|
virtual void render(float * out, unsigned long count);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue