You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello all, I'm fairly new to the world of SIP and I'm running into a bit of a bind with this library. My goal is fairly straightforward, I want to create a little .NET service that sends audio to SIP endpoints. I'm trying to use a WindowsAudioEndpoint declared like it is in the SIPExamples project Play Sounds.
var windowsAudio = new WindowsAudioEndPoint(new AudioEncoder());
windowsAudio.RestrictFormats(format => format.Codec == AudioCodecsEnum.G722);
var voipMediaSession = new VoIPMediaSession(windowsAudio.ToMediaEndPoints());
This is a result of trying to improve the audio quality produced by a VoIPMediaSession declared like this:
VoIPMediaSession voipMediaSession = new VoIPMediaSession(null, formats => formats.Codec == AudioCodecsEnum.G722);
The audio coming out of my softphone and speakers is much more consistent and clear with the former declaration rather than the latter. The latter is basically unlistenable for some reason?
Now the problem is, and this is a problem even running the stock PlaySounds example against my endpoints, that an exception is thrown while the call task is awaited.
The debugger takes me to line 141 of WindowsAudioEndPoint.cs: if (!_disableSource && _waveSourceFormat.SampleRate != _audioFormatManager.SelectedFormat.ClockRate)
where it seems like _waveSourceFormat is null.
The naïve fix I'm using is to add a null conditional operator to said _waveSourceFormat on line 141 and on line 143.
Any help or advice would be much appreciated, thanks!
The text was updated successfully, but these errors were encountered:
Hello all, I'm fairly new to the world of SIP and I'm running into a bit of a bind with this library. My goal is fairly straightforward, I want to create a little .NET service that sends audio to SIP endpoints. I'm trying to use a WindowsAudioEndpoint declared like it is in the SIPExamples project Play Sounds.
This is a result of trying to improve the audio quality produced by a VoIPMediaSession declared like this:
The audio coming out of my softphone and speakers is much more consistent and clear with the former declaration rather than the latter. The latter is basically unlistenable for some reason?
Now the problem is, and this is a problem even running the stock PlaySounds example against my endpoints, that an exception is thrown while the call task is awaited.
The debugger takes me to line 141 of WindowsAudioEndPoint.cs:
if (!_disableSource && _waveSourceFormat.SampleRate != _audioFormatManager.SelectedFormat.ClockRate)
where it seems like _waveSourceFormat is null.
The naïve fix I'm using is to add a null conditional operator to said _waveSourceFormat on line 141 and on line 143.
Any help or advice would be much appreciated, thanks!
The text was updated successfully, but these errors were encountered: