Closed HelgeStenstrom closed 5 years ago
This needs to be tested with XR3Player which can pause, resume, play and skip all from different Threads. I am merging for now, this change has a big importance.
Probably we change all together synchronized blocks with something more recent like Atomic locks or something.
I have saw some guys implementing their own version of StreamPlayer which had very big performance boost.
I can't find their library on bit bucket.
It was a Java media player on SourceForge and they had their code published on Bitbucket.
They have an amazing implementation of StreamPlayer and new Spectrum Analyzer API.
I have to find it... Like literally I was impressed but I didn't had the knowledge back then.
Please check => #47
as reported by IntelliJ: Analyze --> Inspect Code...
This shouldn't change any actual behavior, since there are no write operations on audioLock. So effectivly, it was already final and non-volatile. This change explicitly forbids write operations on audioLock.
Tested, of course.