Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7554319
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T11:18:24+00:00 2026-05-30T11:18:24+00:00

How do I mute sound using C? Is there an ALSA function call? Are

  • 0
  • How do I mute sound using C? Is there an ALSA function call?

  • Are there any other function calls/APIs that can MUTE the microphone?

  • I have written some code to do audio playback using ALSA, and I have noticed a DELAY before the sound starts playing … how do I reduce DELAY or LATENCY on sound playback?

x

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T11:18:25+00:00Added an answer on May 30, 2026 at 11:18 am
    #include <alsa/asoundlib.h>
    
    void SetAlsaMasterMute()
    {
        long min, max;
        snd_mixer_t *handle;
        snd_mixer_selem_id_t *sid;
        const char *card = "default";
        const char *selem_name = "Master";
    
        snd_mixer_open(&handle, 0);
        snd_mixer_attach(handle, card);
        snd_mixer_selem_register(handle, NULL, NULL);
        snd_mixer_load(handle);
    
        snd_mixer_selem_id_alloca(&sid);
        snd_mixer_selem_id_set_index(sid, 0);
        snd_mixer_selem_id_set_name(sid, selem_name);
        snd_mixer_elem_t* elem = snd_mixer_find_selem(handle, sid);
    
        if (snd_mixer_selem_has_playback_switch(elem)) {
            snd_mixer_selem_set_playback_switch_all(elem, 0);
        }
    
        snd_mixer_close(handle);
    }
    

    references: here and official api here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any way to mute other flash objects on the same page with
Hi there I have an app that play short sound clips as the main
I made a program to mute microphone using WinAPI and it seems to work
I am playing a video using MediaPlayer . Now there is a mute/unmute button.
Trying to write a PowerShell cmdlet that will mute the sound at start, unless
How can i mute | unmute a windows mobile pocket pc device (i'm using
I have built a simple tour on my website that will be coded using
$(#mute).click(function(){ $(#audioplayer)[0].muted = $(#audioplayer)[0].muted; $(#message).text(Volume muted); }) What I need to achieve is when
Is there way to mute an audio stream or at least control the volume?
Can someone please help quickly mute or unmute the stage volume in Flash CS3

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.