goxr3plus / java-stream-player

🌌Java Advanced Audio Controller Library (WAV, AU, AIFF, MP3, OGG VORBIS, FLAC, MONKEY's AUDIO and SPEEX audio formats )
GNU General Public License v3.0
147 stars 33 forks source link

setEqualizer doesn't work? #58

Open HelgeStenstrom opened 4 years ago

HelgeStenstrom commented 4 years ago

https://github.com/goxr3plus/java-stream-player/blob/6a00a79f32bf324f7d6232182d93745da64bee0b/src/main/java/com/goxr3plus/streamplayer/stream/StreamPlayer.java#L1250-L1257

I can't see that this method has any side effect, desired or not. It copies an array passed to it, into a local variable, and when the method goes out of scope, the copy is lost.

What is the intention with the method? If it never has worked as intended, maybe it should be removed.

goxr3plus commented 4 years ago

Well it does but in a strange way i haven't fully understood , you can see it working in XR3Player . I have 16 filters which change the audio .

How it works ?.... You can have a look on this class how i use it in XR3Player ...

https://github.com/goxr3plus/XR3Player/blob/1e2c23a84fcd02fcc14cb262f5aaa5b7116451d4/src/main/java/com/goxr3plus/xr3player/controllers/xplayer/XPlayerEqualizer.java#L72-L85

It really works but i am not fully aware how internally.

HelgeStenstrom commented 4 years ago

I can't see that setEqualizer is used in the lines you are referring to, but it's called at line 375. I still don't see what happens. When you say "It really works but i am not fully aware how internally", what do you mean by internally?

Is there any way to validate this code, other that running it, and listening to the result?