Skip to content

Conversation

@Cabbache
Copy link

This is a WIP based on the poc by @yume-chan to add the feature requested in #3880

@Cabbache Cabbache changed the title [Draft] Forward client microphone [Draft] Forward client audio Oct 21, 2025
@Cabbache Cabbache marked this pull request as draft October 23, 2025 10:39

int read_mic(void *data) {
sc_socket mic_socket = *(sc_socket*)data;
const char *input_format_name = "alsa";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this is only available on Linux? Can SDL be used instead?

Copy link
Author

@Cabbache Cabbache Nov 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yume-chan it should work on other platforms if you change alsa to something appropriate? We might want input_format_name to be passed as an argument.

It's possible to list the available input devices with

const AVInputFormat *fmt = NULL;
fmt = av_input_audio_device_next(NULL);
while (fmt) {
  printf("%s: %s\n",
    fmt->name,
    fmt->long_name ? fmt->long_name : "(no description)"
   );
   fmt = av_input_audio_device_next(fmt);
}

This is what I see on linux:

alsa: ALSA audio input
jack: JACK Audio Connection Kit
lavfi: Libavfilter virtual input device
oss: OSS (Open Sound System) capture
pulse: Pulse audio input

@Hideman85
Copy link

Looking forward to this feature, would be really good in phone call experience while working for instance.

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

Successfully merging this pull request may close these issues.

4 participants