diff mbox series

[v2] coreaudio: Notify error in coreaudio_init_out

Message ID 20220226115953.60335-1-akihiko.odaki@gmail.com
State New
Headers show
Series [v2] coreaudio: Notify error in coreaudio_init_out | expand

Commit Message

Akihiko Odaki Feb. 26, 2022, 11:59 a.m. UTC
Otherwise, the audio subsystem tries to use the voice and
eventually aborts due to the maximum number of samples in the
buffer is not set.

Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
Reviewed-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
---
 audio/coreaudio.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Philippe Mathieu-Daudé March 1, 2022, midnight UTC | #1
On 26/2/22 12:59, Akihiko Odaki wrote:
> Otherwise, the audio subsystem tries to use the voice and
> eventually aborts due to the maximum number of samples in the
> buffer is not set.
> 
> Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
> Reviewed-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
> ---
>   audio/coreaudio.c | 2 ++
>   1 file changed, 2 insertions(+)

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Philippe Mathieu-Daudé March 28, 2022, 6:50 p.m. UTC | #2
On 26/2/22 12:59, Akihiko Odaki wrote:
> Otherwise, the audio subsystem tries to use the voice and
> eventually aborts due to the maximum number of samples in the
> buffer is not set.
> 
> Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
> Reviewed-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
> ---
>   audio/coreaudio.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/audio/coreaudio.c b/audio/coreaudio.c
> index d8a21d3e507..d7cfdcc4fc4 100644
> --- a/audio/coreaudio.c
> +++ b/audio/coreaudio.c
> @@ -604,6 +604,8 @@ static int coreaudio_init_out(HWVoiceOut *hw, struct audsettings *as,
>               coreaudio_playback_logerr(status,
>                                         "Could not remove voice property change listener\n");
>           }
> +
> +        return -1;
>       }
>   
>       return 0;

Merged as commit bd7819de22.
diff mbox series

Patch

diff --git a/audio/coreaudio.c b/audio/coreaudio.c
index d8a21d3e507..d7cfdcc4fc4 100644
--- a/audio/coreaudio.c
+++ b/audio/coreaudio.c
@@ -604,6 +604,8 @@  static int coreaudio_init_out(HWVoiceOut *hw, struct audsettings *as,
             coreaudio_playback_logerr(status,
                                       "Could not remove voice property change listener\n");
         }
+
+        return -1;
     }
 
     return 0;