mamruoc
asked on
Need a FIFO in Java
Hi!
I've a audio stream whichI get via udp....
When the stream arrives as packet in 400 bytes, I need a FIFO where I can put more into it in the same time as I can playback it... Anybody got a solution for that???
I've a audio stream whichI get via udp....
When the stream arrives as packet in 400 bytes, I need a FIFO where I can put more into it in the same time as I can playback it... Anybody got a solution for that???
Use two threads. One to play the audio and the other to store it in an ArrayList or another collection object.
use one of the list implementation... putting more on the same or playback, you have to implement on your own.
There is no built in support of that in Java as I know
There is no built in support of that in Java as I know
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks again...
Maybe you should be the person how's doing this Java application.. :D
Maybe you should be the person how's doing this Java application.. :D
8-)
ASKER
Hi!!
Hope you're still there...
Can your FIFO store binary data?
Seems like it don't play back that well... But if I send a file with content:
\x0A, it seems to store and playback well....
regards
Hope you're still there...
Can your FIFO store binary data?
Seems like it don't play back that well... But if I send a file with content:
\x0A, it seems to store and playback well....
regards
>>Can your FIFO store binary data?
Yes, as you can see, i assumed using a byte[]. Playback is another thing of course ...
Yes, as you can see, i assumed using a byte[]. Playback is another thing of course ...
ASKER
Well,,
I just dropped using ArrayList and used Vector, seems like Vetor is more efficient....
I just dropped using ArrayList and used Vector, seems like Vetor is more efficient....