Don't show window size and function on stream error

This commit is contained in:
Alexander Kojevnikov 2016-04-05 22:01:13 -07:00
parent 3010e0f635
commit ac9c92df2d

View File

@ -205,24 +205,26 @@ std::string spek_pipeline_desc(const struct spek_pipeline *pipeline)
));
}
items.push_back(std::string(wxString::Format(wxT("W:%i"), pipeline->nfft).utf8_str()));
if (pipeline->file->get_error() == AudioError::OK) {
items.push_back(std::string(wxString::Format(wxT("W:%i"), pipeline->nfft).utf8_str()));
std::string window_function_name;
switch (pipeline->window_function) {
case WINDOW_HANN:
window_function_name = std::string("Hann");
break;
case WINDOW_HAMMING:
window_function_name = std::string("Hamming");
break;
case WINDOW_BLACKMAN_HARRIS:
window_function_name = std::string("BlackmanHarris");
break;
default:
assert(false);
}
if (window_function_name.size()) {
items.push_back("F:" + window_function_name);
std::string window_function_name;
switch (pipeline->window_function) {
case WINDOW_HANN:
window_function_name = std::string("Hann");
break;
case WINDOW_HAMMING:
window_function_name = std::string("Hamming");
break;
case WINDOW_BLACKMAN_HARRIS:
window_function_name = std::string("BlackmanHarris");
break;
default:
assert(false);
}
if (window_function_name.size()) {
items.push_back("F:" + window_function_name);
}
}
std::string desc;