Log in

View Full Version : OPT_UseWaveExtensible and functions


hamsterstyle
4th December 2013, 01:01
Say I want to create the below function. I only want to activate Extensible wave format = true when the avisynth script I'm creating has 6 channels of audio.

function AutoOpt(clip c) {
c = AudioChannels(c) == 6 ? Eval("""OPT_UseWaveExtensible = true"""):Eval("""OPT_UseWaveExtensible = false""")
}

However this does not work. Any thoughts on how I could make it work?

Gavino
4th December 2013, 10:37
function AutoOpt(clip c) {
global OPT_UseWaveExtensible = (AudioChannels(c) == 6)
return c
}

hamsterstyle
4th December 2013, 18:00
Thanks a ton, now I know who to ask avisynth questions.

tebasuna51
5th December 2013, 10:43
I'm curious for what you need this function.