mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-05 15:30:00 +01:00
BugFix Set media player speed on session load
and Rewind (allows start with negative playspeed)
This commit is contained in:
@@ -1156,10 +1156,13 @@ void SessionLoader::visit (MediaSource& s)
|
||||
// set config media player
|
||||
s.mediaplayer()->accept(*this);
|
||||
|
||||
// add a callback to activate play speed
|
||||
// read source play speed from media player SessionLoader::visit
|
||||
double r = s.mediaplayer()->playSpeed();
|
||||
s.mediaplayer()->setRate(1.0); // reset to normal speed
|
||||
s.call( new PlaySpeed( r, 100 ) );
|
||||
// reset media player to normal speed
|
||||
s.mediaplayer()->setRate(1.0);
|
||||
// add a callback to activate source play speed and rewind
|
||||
s.call( new PlaySpeed( r ) );
|
||||
s.call( new RePlay( ) );
|
||||
}
|
||||
|
||||
void SessionLoader::visit (SessionFileSource& s)
|
||||
|
||||
@@ -541,7 +541,7 @@ void RePlay::update(Source *s, float dt)
|
||||
SourceCallback::update(s, dt);
|
||||
|
||||
// apply when ready
|
||||
if ( status_ == READY ){
|
||||
if ( status_ == READY && s->ready()){
|
||||
|
||||
// call replay function
|
||||
s->replay();
|
||||
|
||||
Reference in New Issue
Block a user