Bugfix: serialization of DeviceInfo contained errors

This commit is contained in:
Anne de Jong 2021-05-14 10:37:52 +02:00
parent bd4961710e
commit 28e935e93b
1 changed files with 10 additions and 9 deletions

View File

@ -131,9 +131,9 @@ class DeviceInfo {
operator string() const {
std::stringstream str;
str << api.apiname + " " << api_specific_devindex
<< " number of input channels: " << ninchannels
<< " number of output channels: " << noutchannels;
str << api.apiname + " " << api_specific_devindex << endl
<< " number of input channels: " << ninchannels << endl
<< " number of output channels: " << noutchannels << endl;
return str.str();
}
@ -216,13 +216,8 @@ class DeviceInfo {
dtype.is_floating = bool(nexti());
devinfo.availableDataTypes.push_back(dtype);
}
devinfo.prefDataTypeIndex = nexti();
N = us(nexti());
for(us i=0;i<N; i++) {
devinfo.availableSampleRates.push_back(nextf());
}
devinfo.prefSampleRateIndex = nexti();
devinfo.prefDataTypeIndex = nexti();
N = us(nexti());
for(us i=0;i<N; i++) {
@ -236,6 +231,12 @@ class DeviceInfo {
}
devinfo.prefFramesPerBlockIndex = nexti();
N = us(nexti());
for(us i=0;i<N; i++) {
devinfo.availableInputRanges.push_back(nexti());
}
devinfo.prefInputRangeIndex = nexti();
devinfo.ninchannels = nexti();
devinfo.noutchannels = nexti();
devinfo.hasInputIEPE = bool(nexti());