Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solves "Synchronization on a non-final field 'audioLock'" #46

Merged
merged 1 commit into from
Sep 16, 2019

Conversation

HelgeStenstrom
Copy link
Collaborator

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.

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.
@goxr3plus
Copy link
Owner

goxr3plus commented Sep 16, 2019

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.

@goxr3plus goxr3plus merged commit cbc3bf1 into goxr3plus:master Sep 16, 2019
@goxr3plus
Copy link
Owner

Please check => #47

@HelgeStenstrom HelgeStenstrom deleted the audioLock branch September 16, 2019 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants