Skip to content

Commit

Permalink
Call AudioSink and AudioSource start/close methods (#977)
Browse files Browse the repository at this point in the history
Previously, only the AudioSource start and close were called, this was working with the cxurrent implementation of WindowsAudioEndpoint which grouped audiosink and source in the audiosource methods, but this does not work if only the audiosink is used.
This requires also a change in WindowsAudioEndpoint were the code for the audiosink is moved at the right place (the placeholders do exist but are empty)
  • Loading branch information
fred-peters authored Oct 2, 2023
1 parent c27a197 commit c9bba57
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/app/Media/VoIPMediaSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,10 @@ public async override Task Start()
{
await Media.AudioSource.StartAudio().ConfigureAwait(false);
}
if (Media.AudioSink != null)
{
await Media.AudioSink.StartAudioSink().ConfigureAwait(false);
}
}

if (HasVideo)
Expand Down Expand Up @@ -255,6 +259,11 @@ public async override void Close(string reason)
await Media.AudioSource.CloseAudio().ConfigureAwait(false);
}

if (Media.AudioSink != null)
{
await Media.AudioSink.CloseAudioSink().ConfigureAwait(false);
}

if (Media.VideoSource != null)
{
await Media.VideoSource.CloseVideo().ConfigureAwait(false);
Expand Down

0 comments on commit c9bba57

Please sign in to comment.