@@ -17,9 +17,6 @@ import lime.utils.UInt8Array;
1717@:access (lime.media. AudioBuffer )
1818class NativeAudioSource
1919{
20- private static var hasDirectChannelsExt : Null <Bool >;
21- private static var hasALSoftLatencyExt : Null <Bool >;
22-
2320 private var completed : Bool ;
2421 private var dataLength : Int ;
2522 private var format : Int ;
@@ -62,16 +59,6 @@ class NativeAudioSource
6259
6360 public function init (): Void
6461 {
65- if (hasALSoftLatencyExt == null )
66- {
67- hasALSoftLatencyExt = AL .isExtensionPresent (" AL_SOFT_source_latency" );
68- }
69-
70- if (hasDirectChannelsExt == null )
71- {
72- hasDirectChannelsExt = AL .isExtensionPresent (" AL_SOFT_direct_channels" ) && AL .isExtensionPresent (" AL_SOFT_direct_channels_remix" );
73- }
74-
7562 format = 0 ;
7663
7764 switch (parent .buffer .dataFormat )
@@ -110,7 +97,7 @@ class NativeAudioSource
11097
11198 AL .sourcei (handle , AL .BUFFER , parent .buffer .__srcBuffer );
11299
113- if (hasDirectChannelsExt )
100+ if (AudioManager . __directChannelsExtSupported )
114101 {
115102 AL .sourcei (handle , AL .DIRECT_CHANNELS_SOFT , AL .REMIX_UNMATCHED_SOFT );
116103 }
@@ -345,7 +332,7 @@ class NativeAudioSource
345332
346333 public function getLatency (): Float
347334 {
348- if (hasALSoftLatencyExt )
335+ if (AudioManager . __latencyExtSupported )
349336 {
350337 var offsets = AL .getSourcedvSOFT (handle , AL .SEC_OFFSET_LATENCY_SOFT , 2 );
351338
0 commit comments