How to playback 3gp files in Java?
I have a java program开发者_如何学Python that receives a 3gp audio file (single file, not stream) sent from the sender in an array of bytes (byte [])
Now, either I need to play this file or, I should be able to save it in 3gp format
Example:
byte[] Audiobytes = received3GPAudioFlie();
Now I want to be able to deal with this Audiobytes in the example. I have two separate goals,
I want to save it as a 3GP file
I want to be able to play it as audio file. Thanks.
Please help!
If by handle you mean
1) Write bytes to file (save the file) then you can do it as follows:
fileOutputStream fos = new FileOutputStream(strFilePath);
fos.write(AudioBytes);
2) Play the file Playing audio files in Java
精彩评论