@@ -34,7 +34,6 @@ import { SelectionService } from 'browser/services/SelectionService';
3434import * as Browser from 'common/Platform' ;
3535import { addDisposableDomListener } from 'browser/Lifecycle' ;
3636import * as Strings from 'browser/LocalizableStrings' ;
37- import { SoundService } from 'browser/services/SoundService' ;
3837import { MouseZoneManager } from 'browser/MouseZoneManager' ;
3938import { AccessibilityManager } from './AccessibilityManager' ;
4039import { ITheme , IMarker , IDisposable , ISelectionPosition , ILinkProvider , IDecorationOptions , IDecoration } from 'xterm' ;
@@ -45,7 +44,7 @@ import { EventEmitter, IEvent, forwardEvent } from 'common/EventEmitter';
4544import { DEFAULT_ATTR_DATA } from 'common/buffer/BufferLine' ;
4645import { ColorManager } from 'browser/ColorManager' ;
4746import { RenderService } from 'browser/services/RenderService' ;
48- import { ICharSizeService , IRenderService , IMouseService , ISelectionService , ISoundService , ICoreBrowserService , ICharacterJoinerService } from 'browser/services/Services' ;
47+ import { ICharSizeService , IRenderService , IMouseService , ISelectionService , ICoreBrowserService , ICharacterJoinerService } from 'browser/services/Services' ;
4948import { CharSizeService } from 'browser/services/CharSizeService' ;
5049import { IBuffer } from 'common/buffer/Types' ;
5150import { MouseService } from 'browser/services/MouseService' ;
@@ -89,7 +88,6 @@ export class Terminal extends CoreTerminal implements ITerminal {
8988 private _renderService : IRenderService | undefined ;
9089 private _characterJoinerService : ICharacterJoinerService | undefined ;
9190 private _selectionService : ISelectionService | undefined ;
92- private _soundService : ISoundService | undefined ;
9391
9492 /**
9593 * Records whether the keydown event has already been handled and triggered a data event, if so
@@ -174,7 +172,7 @@ export class Terminal extends CoreTerminal implements ITerminal {
174172 this . _instantiationService . setService ( IDecorationService , this . _decorationService ) ;
175173
176174 // Setup InputHandler listeners
177- this . register ( this . _inputHandler . onRequestBell ( ( ) => this . bell ( ) ) ) ;
175+ this . register ( this . _inputHandler . onRequestBell ( ( ) => this . _onBell . fire ( ) ) ) ;
178176 this . register ( this . _inputHandler . onRequestRefreshRows ( ( start , end ) => this . refresh ( start , end ) ) ) ;
179177 this . register ( this . _inputHandler . onRequestSendFocus ( ( ) => this . _reportFocus ( ) ) ) ;
180178 this . register ( this . _inputHandler . onRequestReset ( ( ) => this . reset ( ) ) ) ;
@@ -537,8 +535,6 @@ export class Terminal extends CoreTerminal implements ITerminal {
537535 // Performance: Add viewport and helper elements from the fragment
538536 this . element . appendChild ( fragment ) ;
539537
540- this . _soundService = this . _instantiationService . createInstance ( SoundService ) ;
541- this . _instantiationService . setService ( ISoundService , this . _soundService ) ;
542538 this . _mouseService = this . _instantiationService . createInstance ( MouseService ) ;
543539 this . _instantiationService . setService ( IMouseService , this . _mouseService ) ;
544540
@@ -1285,26 +1281,6 @@ export class Terminal extends CoreTerminal implements ITerminal {
12851281 return false ;
12861282 }
12871283
1288- /**
1289- * Ring the bell.
1290- * Note: We could do sweet things with webaudio here
1291- */
1292- public bell ( ) : void {
1293- if ( this . _soundBell ( ) ) {
1294- this . _soundService ?. playBellSound ( ) ;
1295- }
1296-
1297- this . _onBell . fire ( ) ;
1298-
1299- // if (this._visualBell()) {
1300- // this.element.classList.add('visual-bell-active');
1301- // clearTimeout(this._visualBellTimer);
1302- // this._visualBellTimer = window.setTimeout(() => {
1303- // this.element.classList.remove('visual-bell-active');
1304- // }, 200);
1305- // }
1306- }
1307-
13081284 /**
13091285 * Resizes the terminal.
13101286 *
@@ -1422,18 +1398,6 @@ export class Terminal extends CoreTerminal implements ITerminal {
14221398 ev . stopPropagation ( ) ;
14231399 return false ;
14241400 }
1425-
1426- private _visualBell ( ) : boolean {
1427- return false ;
1428- // return this.options.bellStyle === 'visual' ||
1429- // this.options.bellStyle === 'both';
1430- }
1431-
1432- private _soundBell ( ) : boolean {
1433- return this . options . bellStyle === 'sound' ;
1434- // return this.options.bellStyle === 'sound' ||
1435- // this.options.bellStyle === 'both';
1436- }
14371401}
14381402
14391403/**
0 commit comments