Skip to contentSkip to conversation

coreaudio: Notify error in coreaudio_init_out

PATCH In review Akihiko Odaki 2 participants 3 messages Feb 26, 2022 – Mar 28, 2022

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 coreaudio: Notify error in coreaudio_init_out

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.

---
 audio/coreaudio.c | 2 ++
 1 file changed, 2 insertions(+)
audio/coreaudio.c +2 -0
index d8a21d3e507..d7cfdcc4fc4 100644
@@ -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;
Signature · 1 line
2.32.0 (Apple Git-132)
#2 lore raw
In reply to Akihiko Odaki
Quoted 15 lines · Akihiko Odaki

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.

---
  audio/coreaudio.c | 2 ++
  1 file changed, 2 insertions(+)
audio/coreaudio.c +0 -0
index d8a21d3e507..d7cfdcc4fc4 100644

audio/coreaudio.c static int coreaudio_init_out(HWVoiceOut *hw, struct audsettings *as, · line 611

Quoted 8 lines
audio/coreaudio.c +2 -0
@@ -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.