开发者

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,

  1. I want to save it as a 3GP file

  2. 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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜