Bug 68006 - Macros: Beep emits sound even if playback device is muted
Summary: Macros: Beep emits sound even if playback device is muted
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
4.2.0.0.alpha0+ Master
Hardware: Other Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-12 07:22 UTC by Miklos Vajna
Modified: 2013-08-13 07:28 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Miklos Vajna 2013-08-12 07:22:06 UTC
Problem description: 

Basic's Beep emits sound even if the sound mixer is muted.

Steps to reproduce:
1. Open e.g. Writer
2. Select Tools -> Macros -> Organize macris -> LibreOffice Basic
3. Select Main, and click Edit
4. Type "Beep" inside Sub Main
5. Mute system sound using the OS's mixer

Current behavior:

The beep is audible.

Expected behavior:

The beep should be silenced by the mute setting.

I don't think this ever worked, so not a regression.
Operating System: openSUSE
Version: 4.2.0.0.alpha0+ Master
Comment 1 Caolán McNamara 2013-08-12 07:52:50 UTC
Nothing to do with libreoffice really, that beep should route to either of these two beep impls...

//gtk
void GtkSalFrame::Beep()
{
    gdk_display_beep( getGdkDisplay() );
}

//generic
void SalDisplay::Beep() const
{
    XBell( pDisp_, 100 );
}

where presumably gtk just calls XBell as well, see if the following beeps for you as well...

#include <X11/Xlib.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main()
{
    Display *display;
    Window window;

    /* open connection with the server */
    display = XOpenDisplay(NULL);
    if (display == NULL)
    {
        fprintf(stderr, "Cannot open display\n");
        exit(1);
    }

    XBell(display, 100);

    /* close connection to server */
    XCloseDisplay(display);

    return 0;
}
Comment 2 Miklos Vajna 2013-08-13 07:28:52 UTC
Oh, indeed. Yes, the above beeps as well. And tweaking pulseaudio to capture XBell is possible:

https://bugzilla.redhat.com/show_bug.cgi?id=607393#c15

So not a bug on our side.