Skip to content

Commit af757eb

Browse files
committed
refactor: Log input start on macOS
Related to #316
1 parent 7fbf48c commit af757eb

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/core/afv/audio/input.cpp

+3-6
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,8 @@ namespace swift::core::afv::audio
106106
CMacOSMicrophoneAccess::AuthorizationStatus status = m_micAccess.getAuthorizationStatus();
107107
if (status == CMacOSMicrophoneAccess::Authorized)
108108
{
109-
m_audioInput->start(m_audioInputBuffer);
110-
connect(m_audioInputBuffer, &CAudioInputBuffer::frameAvailable, this, &CInput::audioInDataAvailable);
111-
m_started = true;
112-
return;
109+
// void
110+
// Audio start will be handled below
113111
}
114112
else if (status == CMacOSMicrophoneAccess::NotDetermined)
115113
{
@@ -123,11 +121,10 @@ namespace swift::core::afv::audio
123121
CLogMessage(this).error(u"Microphone access not granted. Voice input will not work.");
124122
return;
125123
}
126-
#else
124+
#endif
127125
m_audioInput->start(m_audioInputBuffer);
128126
connect(m_audioInputBuffer, &CAudioInputBuffer::frameAvailable, this, &CInput::audioInDataAvailable);
129127
m_started = true;
130-
#endif
131128
const QString format = toQString(m_inputFormat);
132129
CLogMessage(this).info(u"Starting: '%1' with: %2") << selectedDevice.description() << format;
133130
}

0 commit comments

Comments
 (0)