2021年3月3日(水) 18:27 Gerd Hoffmann <kra...@redhat.com>:
>
>   Hi,
>
> >      status = coreaudio_get_voice(&core->outputDeviceID);
> >      if (status != kAudioHardwareNoError) {
> > -        coreaudio_logerr2 (status, typ,
> > -                           "Could not get default output Device\n");
> > -        return -1;
> > +        coreaudio_playback_logerr (status,
> > +                                   "Could not get default output 
> > Device\n");
> > +        return status;
>
> This "pass status code to caller" change can and should be splitted to a
> separate patch.
>
> Likewise with the logging changes.
>
> That makes the patch with the actual functional change to deal with the
> device changes smaller and easier to review.
>
> thanks,
>   Gerd
>

Actually the code was extracted from coreaudio_init_out to
init_out_device in this patch. init_out_device "passes status code to
caller", but coreaudio_init_out still doesn't. A new executor of the
procedure, handle_voice_change only uses the status code returned by
init_out_device.

Logging changes are alike; Now "playback" type logs are recorded by
both of coreaudio_init_out and handle_voice_change.
handle_voice_change is a function required only for device change.

Regards,
Akihiko Odaki

Reply via email to