Skip to main content

Can any body help me on MMIP

3 replies [Last post]
kuladeep18k
Offline
Joined: 2010-06-16

(1) Is there an API to play WAV files as a stream in the S40 platform ? i.e. the APIs should take partial buffers of the WAV file as input and not the filename of the WAV file. The WAV file will be about 2 MB. We should be able to read 256 bytes from the file and play the 256 bytes. Then again read another 256 and play and so on. ?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
romanz
Offline
Joined: 2006-10-16

If you are speaking about MMAPI (JSR-135), then you should use either Manager.createPlayer(InputStream stream, String type) or Manager.createPlayer(DataSource source) with your own InputStream or DataSource that would provide the data when requested by the implementation.
To find out whether certain media data ("audio/x-wav" in your case) can be streamed by the implementation, you should check "streamable.contents" system property - see JSR-135 spec for detailed description.

truptidalia
Offline
Joined: 2010-07-29

Hi romanz,

an you tell abou how to do the same with the code below :

try {
VideoControl vc;

// Create Player
player = Manager.createPlayer(url);
player.addPlayerListener(this);
//realize the player
player.realize();
vc = (VideoControl)player.getControl("VideoControl");
if (vc != null) {
Item video = (Item)vc.initDisplayMode(vc.USE_GUI_PRIMITIVE, null);
Form v = new Form("Playing Video..");
StringItem si = new StringItem("Status: ", "Playing...");
v.append(si);
v.append(video);
display.setCurrent(v);
}
player.prefetch();
player.start();
} catch (Throwable t) {
reset();
}

url is an http:// link, If I have to use Manager.createPlayer(InputStream is, String type) or with datasource, then how do I end up with the above. Will it read data and display and read and display ?

I really want and need to know this.

Thanks

Hinkmond Wong

phonemeadvanced@mobileandembedded.org wrote:
> (1) Is there an API to play WAV files as a stream in the S40 platform ? i.e. the APIs should take partial buffers of the WAV file as input and not the filename of the WAV file. The WAV file will be about 2 MB. We should be able to read 256 bytes from the file and play the 256 bytes. Then again read another 256 and play and so on. ?
> [Message sent by forum member 'kuladeep18k'

Hi Kuladeep,

Do you mean a Java API in MIDP or a Symbian native API in S40?

(If you mean MIDP, I cc'd the feature@phoneme.dev.java.net mail alias
which handles MIDP questions)

Thanks,
Hinkmond

---------------------------------------------------------------------
To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
For additional commands, e-mail: advanced-help@phoneme.dev.java.net