@@ -61,9 +61,9 @@ public class ALAudioRenderer implements AudioRenderer, Runnable {
6161 private final ByteBuffer nativeBuf = BufferUtils .createByteBuffer (BUFFER_SIZE );
6262 private final byte [] arrayBuf = new byte [BUFFER_SIZE ];
6363 private int [] channels ;
64- private AudioSource [] chanSrcs ;
64+ private AudioSource [] channelSources ;
6565 private int nextChan = 0 ;
66- private final ArrayList <Integer > freeChans = new ArrayList <>();
66+ private final ArrayList <Integer > freeChannels = new ArrayList <>();
6767 private Listener listener ;
6868 private boolean audioDisabled = false ;
6969 private boolean supportEfx = false ;
@@ -116,7 +116,7 @@ private void initOpenAL() {
116116 }
117117
118118 ib = BufferUtils .createIntBuffer (channels .length );
119- chanSrcs = new AudioSource [channels .length ];
119+ channelSources = new AudioSource [channels .length ];
120120
121121 final String deviceName = alc .alcGetString (ALC .ALC_DEVICE_SPECIFIER );
122122
@@ -189,8 +189,8 @@ private void destroyOpenAL() {
189189 }
190190
191191 // stop any playing channels
192- for (int i = 0 ; i < chanSrcs .length ; i ++) {
193- if (chanSrcs [i ] != null ) {
192+ for (int i = 0 ; i < channelSources .length ; i ++) {
193+ if (channelSources [i ] != null ) {
194194 clearChannel (i );
195195 }
196196 }
@@ -643,8 +643,8 @@ private void setListenerParams(Listener listener) {
643643 }
644644
645645 private int newChannel () {
646- if (freeChans .size () > 0 ) {
647- return freeChans .remove (0 );
646+ if (freeChannels .size () > 0 ) {
647+ return freeChannels .remove (0 );
648648 } else if (nextChan < channels .length ) {
649649 return nextChan ++;
650650 } else {
@@ -656,7 +656,7 @@ private void freeChannel(int index) {
656656 if (index == nextChan - 1 ) {
657657 nextChan --;
658658 } else {
659- freeChans .add (index );
659+ freeChannels .add (index );
660660 }
661661 }
662662
@@ -817,8 +817,8 @@ private void attachAudioToSource(int sourceId, AudioData data, boolean looping)
817817
818818 private void clearChannel (int index ) {
819819 // make room at this channel
820- if (chanSrcs [index ] != null ) {
821- AudioSource src = chanSrcs [index ];
820+ if (channelSources [index ] != null ) {
821+ AudioSource src = channelSources [index ];
822822
823823 int sourceId = channels [index ];
824824 al .alSourceStop (sourceId );
@@ -837,7 +837,7 @@ private void clearChannel(int index) {
837837 }
838838 }
839839
840- chanSrcs [index ] = null ;
840+ channelSources [index ] = null ;
841841 }
842842 }
843843
@@ -891,7 +891,7 @@ public void updateInRenderThread(float tpf) {
891891 }
892892
893893 for (int i = 0 ; i < channels .length ; i ++) {
894- AudioSource src = chanSrcs [i ];
894+ AudioSource src = channelSources [i ];
895895
896896 if (src == null ) {
897897 continue ;
@@ -974,7 +974,7 @@ public void updateInDecoderThread(float tpf) {
974974 }
975975
976976 for (int i = 0 ; i < channels .length ; i ++) {
977- AudioSource src = chanSrcs [i ];
977+ AudioSource src = channelSources [i ];
978978
979979 if (src == null || !(src .getAudioData () instanceof AudioStream )) {
980980 continue ;
@@ -1080,7 +1080,7 @@ public void playSourceInstance(AudioSource src) {
10801080 // set parameters, like position and max distance
10811081 setSourceParams (sourceId , src , true );
10821082 attachAudioToSource (sourceId , src .getAudioData (), false );
1083- chanSrcs [index ] = src ;
1083+ channelSources [index ] = src ;
10841084
10851085 // play the channel
10861086 al .alSourcePlay (sourceId );
@@ -1116,7 +1116,7 @@ public void playSource(AudioSource src) {
11161116 updateAudioData (data );
11171117 }
11181118
1119- chanSrcs [index ] = src ;
1119+ channelSources [index ] = src ;
11201120 setSourceParams (channels [index ], src , false );
11211121 attachAudioToSource (channels [index ], data , src .isLooping ());
11221122 }
0 commit comments