Quote:
Originally Posted by Xenakios
Maybe Track_GetPeakInfo API function wasn't imported properly?
|
I've solved this issue by checking if the track, for which I'm requesting peak level, is actually exists in the project.
Code:
else // Live VU meters
{
for (int i = 0; i < 8; i++)
{
int tid = (i + 1) + (bankTrackSel * 8);
if (tid <= CountTracks(0))
{
MediaTrack *tr = CSurf_TrackFromID(tid, false);
double curVU = volToChar(Track_GetPeakInfo(tr, 0));
if (ledE[i] != curVU)
{
midi_out->Send(0xBF, slR[i], ledRing(curVU, 0), -1);
ledE[i] = curVU;
}
}
else
{
if (ledE[i] != 0)
{
midi_out->Send(0xBF, slR[i], 0, -1);
ledE[i] = 0;
}
}
}
}
The
if (tid <= CountTracks(0)) part.