Help needed in Media Playing..

Hi everyone.

I am trying to develop a application which plays the audio(.amr files) for mobile phones...

I am trying to read data in chunk and then trying to play that chunk and simultaneously recieving another chunk. The problem i am facing is while i try to play secod chunk seoeratly , it gives me an exception which is "javax.microedition.MediaException: start failed".

I think the reason behind that was i had created the player with the second chunk not with the combination of first and second chunk. Can anyone please tell me whether here i am right or wrong?

Then i tried to create player with first and second chunk. Then by doing that i was able to play the media but after playing first chunk it gives a beep sound instead of playing second chunk.

Can anyone please help me to figure out this stuff?

Here is the code where i combine the first chunk with second one and create player with the final chunk:

System.arraycopy(mainByteArray,0,temporary,0,lengthOfMainByteArray);

int tempLength = temp.length;

System.arraycopy(temp,0,temporary,lengthOfMainByteArray, tempLength);

temp = null;

mainByteArray = null;

mainByteArray = temporary;

And now i create player of main byte array.

Thanx

Adeesh

[1301 byte] By [Wirklea] at [2007-10-3 3:56:06]
# 1

Hi Wirlke,

I don抰 know how your development environment is setup.

But if you are using Sun WTK:

Be aware that the content type 揂udio Multi-Rate?(mapped to MIME-type audio/ amr) is supported ONLY by WTK 2.5 Beta (not by other WTK versions).

It is recommended before creating an instance of Player, using the following useful methods of class 揗anger?to determine the multimedia capabilities, supported by MMAPI-implementation:

String[ ] getSupportedContentTypes (String protocol)

Return the list of supported content types for the given protocol.

String[ ] getSupportedProtocols (String content_type)

Return the list of supported protocols given the content type.

bye,

Asghar

Asghara at 2007-7-14 21:54:16 > top of Java-index,Java Mobility Forums,Java ME Technologies...