Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
gi0e5b06 committed Oct 30, 2017
1 parent d8fb40c commit 5af6d95
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
5 changes: 5 additions & 0 deletions include/Song.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ class EXPORT Song : public TrackContainer
return m_elapsedMilliSeconds;
}

inline void setToTime( int millis )
{
m_elapsedMilliSeconds = millis;
}

inline void setToTime( MidiTime const & midiTime )
{
m_elapsedMilliSeconds = midiTime.getTimeInMilliseconds(getTempo());
Expand Down
3 changes: 2 additions & 1 deletion src/core/MemoryManagerArray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ MemoryManagerArray MemoryManagerArray::S480 ( 256, 480);
MemoryManagerArray MemoryManagerArray::S496 ( 64, 496);
MemoryManagerArray MemoryManagerArray::S512 ( 64, 512);
MemoryManagerArray MemoryManagerArray::S552 ( 512, 552);
//968
MemoryManagerArray MemoryManagerArray::S1024( 64,1024);
MemoryManagerArray MemoryManagerArray::S1056( 768,1056);
MemoryManagerArray MemoryManagerArray::S1392( 128,1392);
MemoryManagerArray MemoryManagerArray::S2048( 128,2048,"Buffer");
MemoryManagerArray MemoryManagerArray::S2048( 256,2048,"Buffer");
MemoryManagerArray MemoryManagerArray::S2464( 64,2464);
//2760
//4096
Expand Down
2 changes: 1 addition & 1 deletion src/core/Song.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ void Song::playSong()

savePos();

qWarning("Playing song...");
//qWarning("Playing song...");

emit playbackStateChanged();
}
Expand Down
14 changes: 7 additions & 7 deletions src/core/audio/AudioJack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -338,13 +338,6 @@ void AudioJack::transport()
jack_transport_state_t ts=jack_transport_query(m_client, &pos);
Song* song=Engine::getSong();

if(song->getFrames()!=pos.frame)
{
song->getPlayPos(song->playMode()).setTicks(pos.frame/Engine::framesPerTick());
song->setToTimeByTicks(pos.frame/Engine::framesPerTick());
song->getPlayPos(song->playMode()).setCurrentFrame( 0 );
}

if((ts==JackTransportRolling) && !song->isPlaying())
{
if(song->isPaused()) song->togglePause();
Expand All @@ -355,6 +348,13 @@ void AudioJack::transport()
{
song->togglePause();
}

if(song->isPlaying()&&(song->getFrames()!=pos.frame))
{
song->getPlayPos(song->playMode()).setTicks(pos.frame/Engine::framesPerTick());
song->setToTimeByTicks(pos.frame/Engine::framesPerTick());
song->getPlayPos(song->playMode()).setCurrentFrame( 0 );
}
}


Expand Down

0 comments on commit 5af6d95

Please sign in to comment.