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

Audio bell does not work in integrated terminal #47711

Closed
jhpratt opened this issue Apr 12, 2018 · 54 comments · Fixed by #160828
Closed

Audio bell does not work in integrated terminal #47711

jhpratt opened this issue Apr 12, 2018 · 54 comments · Fixed by #160828
Assignees
Labels
accessibility Keyboard, mouse, ARIA, vision, screen readers (non-specific) issues feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders terminal Integrated terminal issues verification-needed Verification of issue is requested verified Verification succeeded

Comments

@jhpratt
Copy link

jhpratt commented Apr 12, 2018

  • VSCode Version: 1.22.1 (commit 950b8b0d37a9b7061b6f0d291837ccc4015f5ecd)
  • OS Version: Ubuntu 17.10

Steps to Reproduce:

  1. Open an integrated terminal
  2. Type echo "\a"

Assuming your OS is configured to allow TTY, you should hear a bell. In a normal terminal, this works fine. In code's, it does not.

Does this issue occur when all extensions are disabled?: Yes

@vscodebot vscodebot bot added the terminal Integrated terminal issues label Apr 12, 2018
@Tyriar Tyriar added the bug Issue identified by VS Code Team member as probable bug label Apr 30, 2018
@Tyriar
Copy link
Member

Tyriar commented Apr 30, 2018

Looks like there's an issue with the bell in the packages version of VS Code (not in the dev build):

Uncaught (in promise) DOMException: Unable to decode audio data

@Tyriar
Copy link
Member

Tyriar commented Apr 30, 2018

This may be related to Electron https://bugs.chromium.org/p/chromium/issues/detail?id=409402, should verify after we upgrade to Electron 2.

@Tyriar Tyriar added the electron Issues and items related to Electron label Apr 30, 2018
@Tyriar Tyriar added this to the Backlog milestone Apr 30, 2018
@Tyriar Tyriar added upstream Issue identified as 'upstream' component related (exists outside of VS Code) and removed electron Issues and items related to Electron labels Sep 12, 2018
@Tyriar
Copy link
Member

Tyriar commented Sep 12, 2018

Not fixed in Electron 2?

@DrSensor
Copy link

DrSensor commented Mar 3, 2019

I have the same problem with this in my machine:

Version: 1.31.1
Commit: 1b8e8302e405050205e69b59abb3559592bb9e60
Date: 2019-02-12T02:19:29.629Z
Electron: 3.1.2
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Linux x64 4.19.13-1-MANJARO

(Plan to use this ASCII to ring some task when the compilation is finish 😹)
Maybe make the beep sound can be configured (like in KDE Konsole in my case) would fix it.

@kvharish
Copy link

kvharish commented Apr 21, 2019

Hi, any idea when this will be fixed?

I am trying to add a bell sound at the end of my grunt task. It works fine in default terminal but not in the vscode integrated terminal.

Version: 1.33.1 (1.33.1)
Commit: 51b0b28134d51361cf996d2f0a1c698247aeabd8
Date: 2019-04-11T08:14:39.158Z
OS - macOS High Sierra (10.13.6)

@jsejcksn
Copy link

I can also reproduce this issue in macOS with

echo -ne '\007'

VS Code: 1.34.0
macOS: 10.14.5

@matchu
Copy link

matchu commented Oct 7, 2019

I'm seeing this too.

Even with terminal.integrated.enableBell enabled, running printf "\a" in the VS Code Integrated Terminal triggers no sound, despite the same command triggering a sound in my OS terminal.

MacOS 10.14.5

@Tyriar Tyriar modified the milestones: Backlog, October 2019 Oct 8, 2019
@Tyriar
Copy link
Member

Tyriar commented Oct 10, 2019

This appears to work in the demo so I suspect it's actually a bug in vscode rather than an upstream issue.

@Tyriar Tyriar removed the upstream Issue identified as 'upstream' component related (exists outside of VS Code) label Oct 10, 2019
@Tyriar
Copy link
Member

Tyriar commented Oct 23, 2019

Works fine out of sources, in the product build I see this:

ERR Unable to decode audio data

Probably related to CSP

@Tyriar
Copy link
Member

Tyriar commented Oct 24, 2019

This is not related to CSP but because we strip out ffmpeg.

@Tyriar
Copy link
Member

Tyriar commented Oct 24, 2019

xtermjs/xterm.js#2506

@Tyriar Tyriar added upstream Issue identified as 'upstream' component related (exists outside of VS Code) upstream-issue-linked This is an upstream issue that has been reported upstream upstream-issue-fixed The underlying upstream issue has been fixed labels Oct 24, 2019
@Tyriar Tyriar closed this as completed in 9e80e5a Oct 25, 2019
@Tyriar Tyriar reopened this Oct 25, 2019
@Tyriar Tyriar removed upstream Issue identified as 'upstream' component related (exists outside of VS Code) upstream-issue-fixed The underlying upstream issue has been fixed labels Oct 26, 2019
@Tyriar
Copy link
Member

Tyriar commented Mar 30, 2022

@tjx666 it was never lacking shell integration, it's an issue with Electron sound. We seem to have worked around those since audio cues are now supported, this just needs someone to investigate and create a sound (which I've requested internally).

@FreTimmerman
Copy link

FreTimmerman commented Apr 22, 2022

FYI: it's not just the sound
in a normal terminal on macOS, the command printf "\a" or echo "\a" will (besides beeping) make the terminal icon jump up in the dock, and add a notification bubble to it.

the built-in vscode terminal does none of those.

another "fun" workaround would be to use say beep on macOs 😅

@Bauxitedev
Copy link

Bauxitedev commented May 4, 2022

On Windows you can use this as a workaround:

powershell.exe '[console]::beep(261.6,700)'

This will play a short beep sound, even when you're remoting into WSL.

E.g. for my Rust webserver, I use this command to auto-compile the project whenever any file changes. If the compilation succeeds, the webserver starts and I hear a short beep. If the compilation fails, I hear a longer, lower beep.

cargo watch -d 0.1 -s "cargo build --release && powershell.exe '[console]::beep(1000,100)' && cargo run --release || powershell.exe '[console]::beep(400,700)'" 

@tjx666
Copy link
Contributor

tjx666 commented Jul 12, 2022

I see last release of vscode fix some accessbility issues, the audio bell should also be a accessbility issue. I think this is a welcome feature but not hard to implement. Any plan to implement it?

@Tyriar

@Tyriar Tyriar added the accessibility Keyboard, mouse, ARIA, vision, screen readers (non-specific) issues label Jul 12, 2022
@Tyriar
Copy link
Member

Tyriar commented Jul 12, 2022

@tjx666 I agree, this was mislabeled. I was waiting on sounds from another MS team before continuing which seems to have stalled so I pinged them again.

@Tyriar Tyriar modified the milestones: Backlog, September 2022 Aug 30, 2022
meganrogge added a commit that referenced this issue Sep 13, 2022
@VSCodeTriageBot VSCodeTriageBot added the unreleased Patch has not yet been released in VS Code Insiders label Sep 15, 2022
@bobmagicii
Copy link

bobmagicii commented Sep 15, 2022

it's been a long road. getting from there to here.
-rest of the enterprise theme song-

@VSCodeTriageBot VSCodeTriageBot added insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Sep 16, 2022
@nnWhisperer
Copy link

Thank you. How long would it take to have it in the main Vscode version(not insiders) ?

@meganrogge
Copy link
Contributor

we will release this version in a few weeks @nnWhisperer

@meganrogge meganrogge added the verification-needed Verification of issue is requested label Sep 26, 2022
@mjbvz mjbvz added the verified Verification succeeded label Sep 27, 2022
@jivanpal
Copy link

Is this supposed to be resolved as of 1.72.2 (commit d045a5e)? If so, it is not working for me on macOS 10.15.7; running printf '\a' in the VSCode terminal does nothing.

@meganrogge
Copy link
Contributor

You need to opt in w the setting for it to work (it's off by default)

@0xDECAFC0FFEE
Copy link

The audio bell works on my computer!
Thanks for your work - this has been a huge pain point for my workflow for years.

@matthewpoer
Copy link

Found myself on Version: 1.72.2 and can confirm that enabling the setting does in fact give you a bell sound :D

Enable with Cmd + Shift + P, search/select Preferences: Open Settings (UI), search for "bell" and check on the "Terminal > Integrated: Enable Bell" toggle.

screenshot of settings

Can also use

"terminal.integrated.enableBell": true

Moving forward printf '\a' will give you a chime.

@jivanpal
Copy link

jivanpal commented Oct 26, 2022

Thanks all, it's working now. However, it doesn't use the alert sound I have configured on my Mac ("Glass" ding in System Sounds), and the "bloop" sound that VSCode uses is much too quiet; I have to turn my volume up to 100% for it to be at the same level as the Glass sound at 25%. Is there a way to adjust the volume level and/or the audio file that is played?

@denishowew
Copy link

My old work-around on mac was: osascript -e "beep beep beep".

@FreTimmerman
Copy link

FreTimmerman commented Oct 27, 2022

i can confirm printf '\a' or echo '\a' will give a chime. BUT:

it is NOT the system chime, NOR does it bump the VSCode icon in the dock, NOR does it add a notification icon to VSCode in the dock. (terminal does all this, see icon attached)
image

to reproduce in terminal, you might have to test it using a sleep, so you have time to unfocus the terminal before it rings the bell:

sleep 5 && printf '\a' and then quickly focus another app within 5 seconds

@jivanpal
Copy link

@denishowew For getting notified when a command/script finishes, I've been using say for some time, as suggested by others here. However, the chime/alert sound plays in many other situations, too, such as when a tab-autocomplete or history reverse-search (^R) fails.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 31, 2022
lemanschik pushed a commit to code-oss-dev/code that referenced this issue Nov 25, 2022
Diff: xtermjs/xterm.js@d9f58c0...f30c38f

- Fix edge case in text decoder
- mp3 sound, fixes microsoft#47711
- New column sequences
- Limit parse buffer size
- -1 disposed markers
- Remove obsolete mouse encodings
- Refine IViewportRange
- Apply scrollSensitivity to fast scroll

xterm-addon-search@0.3.0
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accessibility Keyboard, mouse, ARIA, vision, screen readers (non-specific) issues feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders terminal Integrated terminal issues verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet