It's telling you that the number of channels is wrong, so go and look at the code you wrote that generates that number. Hint: your code is passing in uninitialised garbage to the function. I'm actually surprised the compiler didn't give you at least a warning about it.
