1

I have some audio files of different types -- .mp3, .amr -- saved on my BlackBerry and I want to alter them. I want to make the music or voice recorded sound different.

What can I do to change the audio? Maybe get the file as a stream of bytes and change them byte by byte? Is it possible? Any other suggestions?

Michael Donohue
  • 11,776
  • 5
  • 31
  • 44
gop
  • 2,150
  • 5
  • 26
  • 54

2 Answers2

0

If you mean alter by mixing different media files then you can take the following code. Second sond file will play only if your device support mixing. First file is the main sound file. Second one is usually a small duration sound effect file.

Player musicPl = Manager.createPlayer("file:///SDCard/BlackBerry/Music/musicfile.mp3");
Player soundPl = Manager.createPlayer("file:///SDCard/BlackBerry/Music/soundfile.amr");
musicPl.realize();
soundPl.realize();
musicPl.start();
if (System.getProperty("supports.mixing").equals("true"))
{
for (int i = 0; i < 10; ++i)
{
soundPl.start();
Thread.sleep(500);
soundPl.stop();
}
}

NOTE:- Above sample will not alter any file. Just mix multiple sound file.

Jomy John
  • 6,308
  • 4
  • 28
  • 32
  • Thanks but this is not what I am looking for. I want something which would allow me to apply sound effects to an existing sound file. I am not aware of such API provided by RIM. Also I don't know of anything open source existing. – gop Apr 06 '11 at 07:35
0

No such APIs were found. Maybe something from other j2me platforms could be ported but for bb such framework is not currently available.

gop
  • 2,150
  • 5
  • 26
  • 54