@@ -181,11 +181,11 @@ var LibraryOpenAL = {
181
181
182
182
audioSrc . connect ( src . gain ) ;
183
183
184
- if ( typeof ( audioSrc . start ) !== 'undefined' ) {
184
+ if ( typeof audioSrc . start !== 'undefined' ) {
185
185
// Sample the current time as late as possible to mitigate drift
186
186
startTime = Math . max ( startTime , src . context . audioCtx . currentTime ) ;
187
187
audioSrc . start ( startTime , startOffset ) ;
188
- } else if ( typeof ( audioSrc . noteOn ) !== 'undefined' ) {
188
+ } else if ( typeof audioSrc . noteOn !== 'undefined' ) {
189
189
startTime = Math . max ( startTime , src . context . audioCtx . currentTime ) ;
190
190
audioSrc . noteOn ( startTime ) ;
191
191
#if OPENAL_DEBUG
@@ -2079,7 +2079,7 @@ var LibraryOpenAL = {
2079
2079
}
2080
2080
}
2081
2081
2082
- if ( typeof ( AudioContext ) !== 'undefined' || typeof ( webkitAudioContext ) !== 'undefined' ) {
2082
+ if ( typeof AudioContext !== 'undefined' || typeof webkitAudioContext !== 'undefined' ) {
2083
2083
var deviceId = AL . newId ( ) ;
2084
2084
AL . deviceRefCounts [ deviceId ] = 0 ;
2085
2085
return deviceId ;
@@ -2202,7 +2202,7 @@ var LibraryOpenAL = {
2202
2202
autoResumeAudioContext ( ac ) ;
2203
2203
2204
2204
// 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' ) {
2206
2206
ac . createGain = ac . createGainNode ;
2207
2207
}
2208
2208
@@ -2428,16 +2428,16 @@ var LibraryOpenAL = {
2428
2428
ret = 'Out of Memory' ;
2429
2429
break ;
2430
2430
case 0x1004 /* ALC_DEFAULT_DEVICE_SPECIFIER */ :
2431
- if ( typeof ( AudioContext ) !== 'undefined' ||
2432
- typeof ( webkitAudioContext ) !== 'undefined' ) {
2431
+ if ( typeof AudioContext !== 'undefined' ||
2432
+ typeof webkitAudioContext !== 'undefined' ) {
2433
2433
ret = AL . DEVICE_NAME ;
2434
2434
} else {
2435
2435
return 0 ;
2436
2436
}
2437
2437
break ;
2438
2438
case 0x1005 /* ALC_DEVICE_SPECIFIER */ :
2439
- if ( typeof ( AudioContext ) !== 'undefined' ||
2440
- typeof ( webkitAudioContext ) !== 'undefined' ) {
2439
+ if ( typeof AudioContext !== 'undefined' ||
2440
+ typeof webkitAudioContext !== 'undefined' ) {
2441
2441
ret = AL . DEVICE_NAME . concat ( '\0' ) ;
2442
2442
} else {
2443
2443
ret = '\0' ;
0 commit comments