Page 1 of 1
Suppressed: For Input String: "6ch"
Posted: 04 Dec 2021, 11:52
by jchh
Hi,
What am I doing wrong with this snippet?
I get the error:
Suppressed: For Input String: "6ch"
I have also tried:
Code: Select all
{if (bitdepth==/6ch/) ''}
{af.matches(/6ch/) ? " [$af]":""}
thanks!
Re: Suppressed: For Input String:
Posted: 04 Dec 2021, 13:06
by rednoah
e.g. check channel count:
e.g. check String match
Re: Suppressed: For Input String:
Posted: 04 Dec 2021, 13:21
by jchh
thanks!
To clarify, both of the following integer checks work:
Code: Select all
{af == 6 ? '6ch' : null}
{af ==~ 6 ? '6ch' : null}
But only the 'not' check works for strings?
Re: Suppressed: For Input String:
Posted: 04 Dec 2021, 13:33
by rednoah
af is not a
String value. It's a
ChannelCount value which behaves as if it was an
Integer value, except for it's
String representation.
The
==~ regex-match operator automatically treats the left and the right as String regardless of type.
== is different and my work differently depending on the type. The
== operator for the
ChannelCount type currently only works for
Integer type values, and seems to fails when comparing to a non-number String value.
I'm not sure what you're trying to do. I guess one of these two things?
e.g. add
6ch for files that have exactly 6 audio channels:
e.g. add
6ch,
8ch, etc for files where there are 3 or more audio channels:
Re: Suppressed: For Input String:
Posted: 04 Dec 2021, 13:37
by jchh
agh, got it - thanks!
yes, I was trying to do the 2nd thing:
...and learn at the same time