- fix pvqa wrapper for latest PVQA builds
This commit is contained in:
parent
7d3ed94d57
commit
98bf80ca7b
|
|
@ -331,7 +331,7 @@ SevanaPVQA::DetectorsList SevanaPVQA::getDetectorsNames(const std::string& repor
|
|||
return result;
|
||||
}
|
||||
|
||||
float SevanaPVQA::getResults(std::string& report, const EchoData** echo, int samplerate, Codec codec)
|
||||
float SevanaPVQA::getResults(std::string& report, EchoData** echo, int samplerate, Codec codec)
|
||||
{
|
||||
if (!mContext)
|
||||
{
|
||||
|
|
@ -389,8 +389,19 @@ float SevanaPVQA::getResults(std::string& report, const EchoData** echo, int sam
|
|||
names.push_back(locName);
|
||||
|
||||
// Get values for echo detector
|
||||
*echo = PVQA_GetProcessorValuesList(mContext, PVQA_ECHO_DETECTOR_NAME, 0, mProcessedMilliseconds, "values", &errCode);
|
||||
|
||||
PVQA_Array2D* array = PVQA_GetProcessorValuesList(mContext, PVQA_ECHO_DETECTOR_NAME, 0, mProcessedMilliseconds, "values", &errCode);
|
||||
if (array)
|
||||
{
|
||||
*echo = new std::vector<std::vector<float>>();
|
||||
for (int r = 0; r < array->rows; r++)
|
||||
{
|
||||
std::vector<float> row;
|
||||
for (int c = 0; c < array->columns; c++)
|
||||
row.push_back(array->data[r * array->columns + c]);
|
||||
(*echo)->push_back(row);
|
||||
}
|
||||
PVQA_ReleaseArray2D(array); array = nullptr;
|
||||
}
|
||||
// For debugging only
|
||||
/*if (*echo)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ namespace MT
|
|||
OPUS
|
||||
};
|
||||
|
||||
float getResults(std::string& report, const EchoData** echo, int samplerate, Codec codec);
|
||||
float getResults(std::string& report, EchoData** echo, int samplerate, Codec codec);
|
||||
|
||||
// Report is interval report. Names are output detector names. startIndex is column's start index in interval report of first detector.
|
||||
struct DetectorsList
|
||||
|
|
|
|||
Loading…
Reference in New Issue