Unverified Commit a4c095a3 authored by Prabhat Roy's avatar Prabhat Roy Committed by GitHub
Browse files

Check unexpected effect name apply_effects_tensor (#1224)


Co-authored-by: default avatarPrabhat Roy <prabhatroy@fb.com>
parent 08f188b2
......@@ -258,7 +258,13 @@ void SoxEffectsChain::addEffect(const std::vector<std::string> effect) {
throw std::runtime_error(stream.str());
}
SoxEffect e(sox_create_effect(sox_find_effect(name.c_str())));
auto returned_effect = sox_find_effect(name.c_str());
if (!returned_effect) {
std::ostringstream stream;
stream << "Unsupported effect: " << name;
throw std::runtime_error(stream.str());
}
SoxEffect e(sox_create_effect(returned_effect));
const auto num_options = num_args - 1;
std::vector<char*> opts;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment