-Bug in metering somewhere: some meters show amplitude of tracks beside it

This commit is contained in:
Harry van Haaren 2013-07-26 02:26:12 +01:00
parent 21346b63c2
commit 0c196d14f3
2 changed files with 18 additions and 18 deletions

View file

@ -142,10 +142,26 @@ int Jack::process (jack_nframes_t nframes)
for(uint i = 0; i < loopers.size(); i++)
loopers.at(i)->process( nframes, &buffers );
// get DB readings, and send to UI
for(int n = 0; n < NTRACKS; n++)
{
// needs to be setup to handle stereo instead of mono
float* buf = buffers.audio[Buffers::TRACK_0 + n];
dbMeters.at(n).process( nframes, buf, buf );
if (uiUpdateCounter > uiUpdateConstant )
{
EventTrackSignalLevel e( n, dbMeters.at(n).getLeftDB(), dbMeters.at(n).getRightDB() );
//EventTrackSignalLevel e( n, n / 8.f, n / 8.f );
writeToGuiRingbuffer( &e );
}
}
// mixdown tracks into master output buffer
float* output = buffers.audio[Buffers::MASTER_OUTPUT];
for(int i = 0; i < nframes; i++)
{
float tmp = 0.f;
@ -157,18 +173,6 @@ int Jack::process (jack_nframes_t nframes)
*output++ = tmp;
}
// get DB readings, and send to UI
for(int n = 0; n < NTRACKS; n++)
{
// needs to be setup to handle stereo instead of mono
dbMeters.at(n).process( nframes, buffers.audio[Buffers::TRACK_0 + n], buffers.audio[Buffers::TRACK_0 + n]);
if (uiUpdateCounter > uiUpdateConstant )
{
EventTrackSignalLevel e( n, dbMeters.at(n).getLeftDB(), dbMeters.at(n).getRightDB() );
writeToGuiRingbuffer( &e );
}
}

View file

@ -220,8 +220,6 @@ void Looper::bar()
playPoint = 0;
endPoint = lastWrittenSampleIndex;
int scene = 0;
EventLooperState e2( track, scene, STATE_PLAYING );
writeToGuiRingbuffer( &e2 );
}
@ -230,7 +228,6 @@ void Looper::bar()
EventGuiPrint e( "Looper Q->Recording" );
writeToGuiRingbuffer( &e );
int scene = 0;
EventLooperState e2( track, scene, STATE_RECORDING );
writeToGuiRingbuffer( &e2 );
@ -244,7 +241,6 @@ void Looper::bar()
EventGuiPrint e( "Looper Q->Stopped" );
writeToGuiRingbuffer( &e );
int scene = 0;
EventLooperState e2( track, scene, STATE_STOPPED );
writeToGuiRingbuffer( &e2 );
@ -302,7 +298,7 @@ void Looper::pitchShift(int count, float* input, float* output)
float fTemp4 = (fSlow0 + fRec0[0]);
int iTemp5 = int(fTemp4);
output0[i] += (float)(((1 - fTemp3) * (((fTemp4 - iTemp5) *
*output++ += (float)(((1 - fTemp3) * (((fTemp4 - iTemp5) *
fVec0[(IOTA-int((int((1 + iTemp5)) & 65535)))&65535]) + ((0 - ((
fRec0[0] + fSlow3) - iTemp5)) * fVec0[(IOTA-int((iTemp5 & 65535)))
&65535]))) + (fTemp3 * (((fRec0[0] - iTemp1) * fVec0[(IOTA-int((int(