
|
April 2004 |
|
|
The code sample below describes how to play two sounds at the same time. This feature is supported by the Sony Ericsson V800, Z800, K750, W800 and K600 series of phones. In these phones the number of existing players is only limited by available memory, and you have the possibility to play more than one player at the same time. To do this you need to use one midi file and one wav file. The wav file must have a sample rate of 8 or 16 kHz. The code is straight-forward - just load the resource, create the player and start playing the file. Here's the sample:InputStream is = getClass().getResourceAsStream(file); player = Manager.createPlayer(is, " audio/midi"); player1 = Manager.createPlayer(is1, "audio/x-wav"); player.start(); | |
Copyright © 2001 - 2009 Sony Ericsson Mobile Communications AB. All Rights Reserved.