OK, the main idea behind the whole struct iaxc_audio_driver
structure was to abstract the driver interface, which is
only broken by the XXX_initialize functions. So, I don't
like adding a new driver-specific function like this, unless
it can't be avoided.
(someday, we might want to dynamically load these drivers,
in which case the XXX_initialize functions would be the only
entry point into the shared library, etc).
So, it would be cleaner to do this either:
(a) Just have pa_destroy call pa_terminate (and make
pa_terminate static), or have pa_destroy do all the things
pa_terminate does. This seems like it would be the cleanest
way to do this, OR
(b) if the calling pattern for destroy and terminate need to
be different (I'm not sure why you'd need to call one and
not the other, though), then add a new delegator to the
audio_driver struct for the terminate function, set it to
pa_destroy in the pa_driver, and make a dummy function for
the file driver (the only other extant audio driver at the
moment)..
Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
patch for pa_terminate in portaudio.c/h
Logged In: YES
user_id=129849
OK, the main idea behind the whole struct iaxc_audio_driver
structure was to abstract the driver interface, which is
only broken by the XXX_initialize functions. So, I don't
like adding a new driver-specific function like this, unless
it can't be avoided.
(someday, we might want to dynamically load these drivers,
in which case the XXX_initialize functions would be the only
entry point into the shared library, etc).
So, it would be cleaner to do this either:
(a) Just have pa_destroy call pa_terminate (and make
pa_terminate static), or have pa_destroy do all the things
pa_terminate does. This seems like it would be the cleanest
way to do this, OR
(b) if the calling pattern for destroy and terminate need to
be different (I'm not sure why you'd need to call one and
not the other, though), then add a new delegator to the
audio_driver struct for the terminate function, set it to
pa_destroy in the pa_driver, and make a dummy function for
the file driver (the only other extant audio driver at the
moment)..
Thanks!