Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
Torchaudio
Commits
a4c095a3
Unverified
Commit
a4c095a3
authored
Feb 02, 2021
by
Prabhat Roy
Committed by
GitHub
Feb 02, 2021
Browse files
Check unexpected effect name apply_effects_tensor (#1224)
Co-authored-by:
Prabhat Roy
<
prabhatroy@fb.com
>
parent
08f188b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
torchaudio/csrc/sox/effects_chain.cpp
torchaudio/csrc/sox/effects_chain.cpp
+7
-1
No files found.
torchaudio/csrc/sox/effects_chain.cpp
View file @
a4c095a3
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment