Skip to content

Commit 35556e8

Browse files
committed
code rabbit feedback
1 parent 0aaeadb commit 35556e8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

examples/agent/websocket/simple/Program.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,14 @@ await agentClient.Subscribe(new EventHandler<ErrorResponse>((sender, e) =>
224224
// Stop the connection
225225
await agentClient.Stop();
226226

227+
// Stop and dispose PortAudio output stream
228+
if (_outputStream != null)
229+
{
230+
_outputStream.Stop();
231+
_outputStream.Dispose();
232+
_outputStream = null;
233+
}
234+
227235
// Terminate Libraries
228236
Deepgram.Microphone.Library.Terminate();
229237
Deepgram.Library.Terminate();

0 commit comments

Comments
 (0)