Allow PaAsio_ShowControlPanel to be called for open stream. Fix ASIOInit(..systemSpecific)
ASIOInit takes a "systemSpecific" parameter that's a Window handle on Windows. PaAsio_ShowControlPanel() allows the caller to specify the window handle, while Pa_OpenStream() always passes GetDesktopWindow() on Windows. This means that stream has to be closed and reopened to call PaAsio_ShowControlPanel() with the correct parameter.
One fix for this would be to allow a host-api-specific stream parameter for passing a window handle to Pa_OpenStream(). As the comment in PaAsio_ShowControlPanel says:
/*
In theory we could proceed if the currently open device was the same
one for which the control panel was requested, however because the
window pointer is not available until this function is called we
currently need to call ASIOInit() again here, which of course can't be
done safely while a stream is open.
*/
One fix for this would be to allow a host-api-specific stream parameter for passing a window handle to Pa_OpenStream(). As the comment in PaAsio_ShowControlPanel says:
/*
In theory we could proceed if the currently open device was the same
one for which the control panel was requested, however because the
window pointer is not available until this function is called we
currently need to call ASIOInit() again here, which of course can't be
done safely while a stream is open.
*/
Leave a comment
Old TODO item was: provide an asio-specific method for setting the systems specific value (aka main window handle) - check that this matches the value passed to PaAsio_ShowControlPanel, or remove it entirely from PaAsio_ShowControlPanel. - this would allow PaAsio_ShowControlPanel to be called for the currently open stream (at present all streams must be closed).