mirror of
https://github.com/vale981/openAV-Luppp
synced 2025-03-05 17:11:40 -05:00
-Bug in metering somewhere: some meters show amplitude of tracks beside it
This commit is contained in:
parent
21346b63c2
commit
0c196d14f3
2 changed files with 18 additions and 18 deletions
30
src/jack.cxx
30
src/jack.cxx
|
@ -142,10 +142,26 @@ int Jack::process (jack_nframes_t nframes)
|
||||||
for(uint i = 0; i < loopers.size(); i++)
|
for(uint i = 0; i < loopers.size(); i++)
|
||||||
loopers.at(i)->process( nframes, &buffers );
|
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
|
// mixdown tracks into master output buffer
|
||||||
float* output = buffers.audio[Buffers::MASTER_OUTPUT];
|
float* output = buffers.audio[Buffers::MASTER_OUTPUT];
|
||||||
|
|
||||||
|
|
||||||
for(int i = 0; i < nframes; i++)
|
for(int i = 0; i < nframes; i++)
|
||||||
{
|
{
|
||||||
float tmp = 0.f;
|
float tmp = 0.f;
|
||||||
|
@ -157,18 +173,6 @@ int Jack::process (jack_nframes_t nframes)
|
||||||
*output++ = tmp;
|
*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 );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -220,8 +220,6 @@ void Looper::bar()
|
||||||
playPoint = 0;
|
playPoint = 0;
|
||||||
endPoint = lastWrittenSampleIndex;
|
endPoint = lastWrittenSampleIndex;
|
||||||
|
|
||||||
|
|
||||||
int scene = 0;
|
|
||||||
EventLooperState e2( track, scene, STATE_PLAYING );
|
EventLooperState e2( track, scene, STATE_PLAYING );
|
||||||
writeToGuiRingbuffer( &e2 );
|
writeToGuiRingbuffer( &e2 );
|
||||||
}
|
}
|
||||||
|
@ -230,7 +228,6 @@ void Looper::bar()
|
||||||
EventGuiPrint e( "Looper Q->Recording" );
|
EventGuiPrint e( "Looper Q->Recording" );
|
||||||
writeToGuiRingbuffer( &e );
|
writeToGuiRingbuffer( &e );
|
||||||
|
|
||||||
int scene = 0;
|
|
||||||
EventLooperState e2( track, scene, STATE_RECORDING );
|
EventLooperState e2( track, scene, STATE_RECORDING );
|
||||||
writeToGuiRingbuffer( &e2 );
|
writeToGuiRingbuffer( &e2 );
|
||||||
|
|
||||||
|
@ -244,7 +241,6 @@ void Looper::bar()
|
||||||
EventGuiPrint e( "Looper Q->Stopped" );
|
EventGuiPrint e( "Looper Q->Stopped" );
|
||||||
writeToGuiRingbuffer( &e );
|
writeToGuiRingbuffer( &e );
|
||||||
|
|
||||||
int scene = 0;
|
|
||||||
EventLooperState e2( track, scene, STATE_STOPPED );
|
EventLooperState e2( track, scene, STATE_STOPPED );
|
||||||
writeToGuiRingbuffer( &e2 );
|
writeToGuiRingbuffer( &e2 );
|
||||||
|
|
||||||
|
@ -302,7 +298,7 @@ void Looper::pitchShift(int count, float* input, float* output)
|
||||||
float fTemp4 = (fSlow0 + fRec0[0]);
|
float fTemp4 = (fSlow0 + fRec0[0]);
|
||||||
int iTemp5 = int(fTemp4);
|
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 - ((
|
fVec0[(IOTA-int((int((1 + iTemp5)) & 65535)))&65535]) + ((0 - ((
|
||||||
fRec0[0] + fSlow3) - iTemp5)) * fVec0[(IOTA-int((iTemp5 & 65535)))
|
fRec0[0] + fSlow3) - iTemp5)) * fVec0[(IOTA-int((iTemp5 & 65535)))
|
||||||
&65535]))) + (fTemp3 * (((fRec0[0] - iTemp1) * fVec0[(IOTA-int((int(
|
&65535]))) + (fTemp3 * (((fRec0[0] - iTemp1) * fVec0[(IOTA-int((int(
|
||||||
|
|
Loading…
Add table
Reference in a new issue