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

reworked AudioBuffer #12

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

LeanderK
Copy link

Hi,
i tested RPlay on the Raspberry pi and noticed that the Audiobuffer was a common source for failure.
The problem was related to how the Audiobuffer calculated the buffered elements to restart getNextFrame() after an underrun. Also the performance was not very good because of some inefficient locks.
I also entangled the Source code a bit and converted the AudioData to a "right" class instead of some proved C construct.
It now performs much better on the raspberry pi. :)

@bencall
Copy link
Owner

bencall commented Jan 31, 2015

Hi,

Thanks for improving RPlay!
I developed it long time ago and, indeed, my code isn't really efficient.

However, there seems to be a problem with your code.
I get this error message:
"...
Waiting
Exception in thread "Thread-18" java.lang.NullPointerException
at AudioBuffer.calculateActualBufferSize(AudioBuffer.java:178)
at AudioBuffer.putPacketInBuffer(AudioBuffer.java:135)
at AudioServer.packetReceived(AudioServer.java:120)
at UDPListener.run(UDPListener.java:35)"

It looks like "audioBuffer[i]" returns null.
I'll try to look into it tomorrow ;-)

@LeanderK
Copy link
Author

i have made some other changes...maybe i forgot to copy something

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.

None yet

2 participants