@@ -181,11 +181,11 @@ var LibraryOpenAL = {
181181
182182 audioSrc . connect ( src . gain ) ;
183183
184- if ( typeof ( audioSrc . start ) !== 'undefined' ) {
184+ if ( typeof audioSrc . start !== 'undefined' ) {
185185 // Sample the current time as late as possible to mitigate drift
186186 startTime = Math . max ( startTime , src . context . audioCtx . currentTime ) ;
187187 audioSrc . start ( startTime , startOffset ) ;
188- } else if ( typeof ( audioSrc . noteOn ) !== 'undefined' ) {
188+ } else if ( typeof audioSrc . noteOn !== 'undefined' ) {
189189 startTime = Math . max ( startTime , src . context . audioCtx . currentTime ) ;
190190 audioSrc . noteOn ( startTime ) ;
191191#if OPENAL_DEBUG
@@ -2079,7 +2079,7 @@ var LibraryOpenAL = {
20792079 }
20802080 }
20812081
2082- if ( typeof ( AudioContext ) !== 'undefined' || typeof ( webkitAudioContext ) !== 'undefined' ) {
2082+ if ( typeof AudioContext !== 'undefined' || typeof webkitAudioContext !== 'undefined' ) {
20832083 var deviceId = AL . newId ( ) ;
20842084 AL . deviceRefCounts [ deviceId ] = 0 ;
20852085 return deviceId ;
@@ -2202,7 +2202,7 @@ var LibraryOpenAL = {
22022202 autoResumeAudioContext ( ac ) ;
22032203
22042204 // Old Web Audio API (e.g. Safari 6.0.5) had an inconsistently named createGainNode function.
2205- if ( typeof ( ac . createGain ) === 'undefined' ) {
2205+ if ( typeof ac . createGain === 'undefined' ) {
22062206 ac . createGain = ac . createGainNode ;
22072207 }
22082208
@@ -2428,16 +2428,16 @@ var LibraryOpenAL = {
24282428 ret = 'Out of Memory' ;
24292429 break ;
24302430 case 0x1004 /* ALC_DEFAULT_DEVICE_SPECIFIER */ :
2431- if ( typeof ( AudioContext ) !== 'undefined' ||
2432- typeof ( webkitAudioContext ) !== 'undefined' ) {
2431+ if ( typeof AudioContext !== 'undefined' ||
2432+ typeof webkitAudioContext !== 'undefined' ) {
24332433 ret = AL . DEVICE_NAME ;
24342434 } else {
24352435 return 0 ;
24362436 }
24372437 break ;
24382438 case 0x1005 /* ALC_DEVICE_SPECIFIER */ :
2439- if ( typeof ( AudioContext ) !== 'undefined' ||
2440- typeof ( webkitAudioContext ) !== 'undefined' ) {
2439+ if ( typeof AudioContext !== 'undefined' ||
2440+ typeof webkitAudioContext !== 'undefined' ) {
24412441 ret = AL . DEVICE_NAME . concat ( '\0' ) ;
24422442 } else {
24432443 ret = '\0' ;
0 commit comments