Skip to content

reworked AudioBuffer#12

Open
LeanderK wants to merge 4 commits intobencall:masterfrom
LeanderK:AudioBuffer
Open

reworked AudioBuffer#12
LeanderK wants to merge 4 commits intobencall:masterfrom
LeanderK:AudioBuffer

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.

2 participants