Error handling in ASIOAudioIODevice::open

Hi Jules,

I've noticed that the open method for an ASIO device doesn't flag an error when the ASIO API opens fewer channels than requested (I'm using 2.1.8 audio routines in combination with 3.0.4 for the rest because of a previously posted bug, but I've checked this with the latest version and it's the same). 

What happens is that the in line 478 the number of buffers (and therefore channels) is determined by resetBuffers, which ignores requested channel numbers not in the range recognised by the driver.  

My question - is this by design or is it an oversight?

You may ask - how can this happen in the first place? In my case it happens when restoring a saved setup after a device has been unplugged. I was using a failure of the initialisation to flag this condition which works fine except for ASIO

It's by design - you ask a device for the channels you want, and it opens as many as possible, which may be fewer than you requested. You can check afterwards whether it opened enough and take action if you're not happy with it.

This means, for example, that if you just want to open all the channels that a device supports, you can just ask it to open 256, and then work with the number that it actually returns.

Thanks. I'll put the checks in then.