mirror of
https://github.com/vale981/openAV-Luppp
synced 2025-03-05 09:01:39 -05:00
Time observers get reset upon change of jack transport to rolling, fixed issue
with jack transport and bars (bars are 1 based), removed debug code
This commit is contained in:
parent
86b309b17f
commit
97ae7fbec5
2 changed files with 8 additions and 8 deletions
|
@ -211,13 +211,6 @@ void LooperClip::record(int count, float* L, float* R)
|
|||
{
|
||||
_buffer->getData().at( _recordhead ) = *L++;
|
||||
_recordhead++;
|
||||
if(_recordhead>=90112)
|
||||
{
|
||||
char buffer [50];
|
||||
sprintf (buffer, "LooperClip t %i, s %i, recordhead %f\n",track, scene,_recordhead);
|
||||
EventGuiPrint e( buffer );
|
||||
//writeToGuiRingbuffer( &e );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -171,7 +171,14 @@ void TimeManager::setTransportState( TRANSPORT_STATE s )
|
|||
if(transportState == TRANSPORT_STOPPED)
|
||||
jack->transportRolling(false);
|
||||
else
|
||||
{
|
||||
jack->transportRolling(true);
|
||||
barCounter = 0;
|
||||
beatCounter = 0;
|
||||
beatFrameCountdown = -1;
|
||||
for(int i=0;i<observers.size();i++)
|
||||
observers[i]->resetTimeState();
|
||||
}
|
||||
}
|
||||
|
||||
void TimeManager::process(Buffers* buffers)
|
||||
|
@ -264,7 +271,7 @@ void TimeManager::process(Buffers* buffers)
|
|||
{
|
||||
buffers->transportPosition->valid = (jack_position_bits_t)(JackPositionBBT | JackTransportPosition);
|
||||
|
||||
buffers->transportPosition->bar = beatCounter / 4;
|
||||
buffers->transportPosition->bar = beatCounter / 4 + 1;// bars 1-based
|
||||
buffers->transportPosition->beat = (beatCounter % 4) + 1; // beats 1-4
|
||||
|
||||
float part = float( fpb-beatFrameCountdown) / fpb;
|
||||
|
|
Loading…
Add table
Reference in a new issue