commit ac9c92df2d0d96209fc114f1c22c277dd61b042f parent 3010e0f63589390dc106d12c60a48c64a7fb4484 Author: Alexander Kojevnikov <alexander@kojevnikov.com> Date: Tue, 5 Apr 2016 22:01:13 -0700 Don't show window size and function on stream error Diffstat:
M | src/spek-pipeline.cc | | | 38 | ++++++++++++++++++++------------------ |
1 file changed, 20 insertions(+), 18 deletions(-)
diff --git a/src/spek-pipeline.cc b/src/spek-pipeline.cc @@ -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())); - - 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("Blackman–Harris"); - break; - default: - assert(false); - } - if (window_function_name.size()) { - items.push_back("F:" + window_function_name); + 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("Blackman–Harris"); + break; + default: + assert(false); + } + if (window_function_name.size()) { + items.push_back("F:" + window_function_name); + } } std::string desc;