On Sonntag, 6. März 2022 11:54:00 CET Akihiko Odaki wrote: > On 2022/03/06 19:49, Christian Schoenebeck wrote: > > On Sonntag, 6. März 2022 07:39:49 CET Akihiko Odaki wrote: > >> MacOSX.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHar > >> dwa re.h > >> > >> says: > >>> The return value is currently unused and should always be 0. > > > > Where does it say that, about which macOS functions? There are quite a > > bunch of macOS functions involved in init_out_device(), and they all have > > error pathes in init_out_device(), and they still will have them after > > this patch. > > > > And again, I'm missing: this as an improvement because? Is this a user > > invisible improvement (e.g. removing redundant branches), or is this a > > user > > visible improvement, i.e. does it fix a misbehaviour? In case of the > > latter, which misbehaviour did you encounter? > > handle_voice_change itself is a callback. > It is invisible for a user since "the return value is currently unused".
Then the commit log should be more specific and say something like: " handle_voice_change() is a CoreAudio callback function as of CoreAudio type 'AudioObjectPropertyListenerProc', and for the latter MacOSX.sdk/System/ Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h says 'The return value is currently unused and should always be 0.'. " Nevertheless, personally I would not change that, but I won't object either. I read it like "The CoreAudio subsystem of macOS currently ignores the result of your callback, and for that reason simply return 0 for now.". It does not say "you must not return anything else than 0". ATM it simply does not matter what you return here. Best regards, Christian Schoenebeck