Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Windows calls have sound artifact #39

Closed
Psayker opened this issue Apr 3, 2024 · 2 comments
Closed

[Bug] Windows calls have sound artifact #39

Psayker opened this issue Apr 3, 2024 · 2 comments

Comments

@Psayker
Copy link

Psayker commented Apr 3, 2024

When make calls from windows outgoing audio steam can have sound artifact.

@igsha
Copy link
Collaborator

igsha commented Apr 17, 2024

DirectSound

The root of the problem is a directsound element from GStreamer that produce sound artifacts by itself. It can be reproduce by audio recodring and playback (num-buffers=2000 - is about 20 seconds):

$ gst-launch-1.0 -e directsoundsrc num-buffers=2000 ! audioconvert ! audioresample ! opusenc ! oggmux ! filesink location=out.ogg
$ gst-launch-1.0 filesrc location=out.ogg ! decodebin ! audioconvert ! audioresample ! autoaudiosink

Currently DirectSound is depretected. It seems no one is interested to fix this problem in gstreamer.

Wasapi

The successor of directsound element is wasapi - wasapisrc and wasapisink. The pipeline to test wasapisrc audio recording:

$ gst-launch-1.0 -e wasapisrc num-buffers=2000 ! audioconvert ! audioresample ! opusenc ! oggmux ! filesink location=out.ogg

There is no sound issues with this element. But capabilities are very limited. Also it is impossible to change volume level of the microphone directly from gstreamer.

Wasapi2

The more advanced successor is a wasapi2src element. But it is not available in mingw environment and I don't know all characteristics. It is available starting from Windows 10.

Comparison

The comparison of different audio recording elements from gstreamer:

characteristic directsoundsrc wasapisrc wasapi2src
format caps S16LE only F32LE both F32LE and S16LE
rate caps any only 44100 any
channels caps 1 or 2 only 2 any
can gstreamer change microphone volume level yes no yes
sound artifacts yes no unknown

@mxlgv
Copy link
Owner

mxlgv commented May 2, 2024

Fixed: #54

@mxlgv mxlgv closed this as completed May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants