2 ISoundPlayers? | developer.brewmp.com 2 ISoundPlayers? | developer.brewmp.com

Developer

2 ISoundPlayers?

Forums:

In BREW 1.1, is it possible to create 2 ISoundPlayers? One for the background music and one for sound effects?

If that's not possible, I would appreciate suggestions for possible approaches.

Thank-you.
Acco

My understanding is that you can only play one sound at a time. To achieve what you are trying, you would have to pause the background music, play the sound effect and restart the background music again.
Hope that helps
Roshan

My understanding is that you can only play one sound at a time. To achieve what you are trying, you would have to pause the background music, play the sound effect and restart the background music again.
Hope that helps
Roshan

Hello accolade,
u can use the CMX studio.... for the same...

Hello accolade,
u can use the CMX studio.... for the same...

I just want to know,will u play the files created by CMX in the same way u play midi files.
Will there be any break while u loop the file.
Thnk u.

I just want to know,will u play the files created by CMX in the same way u play midi files.
Will there be any break while u loop the file.
Thnk u.

Hello Gladiator,
u can play the pmd files generated by cmx studio same way u paly the midi file but you have to change the classID or u can use the IMediaPMD Interface...

Hello Gladiator,
u can play the pmd files generated by cmx studio same way u paly the midi file but you have to change the classID or u can use the IMediaPMD Interface...

Thts fine Kumar,
I'm gettin a break while i loop a midi file,can i able to avoid this if i play a pmd file with IMediaPMD Interface.
Thnk U.

Thts fine Kumar,
I'm gettin a break while i loop a midi file,can i able to avoid this if i play a pmd file with IMediaPMD Interface.
Thnk U.

If u are playing the pmd file in a loop then avoid loading the file each time instead you can read teh file in a buffer then use the buffer to play contents in the buffer it may help u.

If u are playing the pmd file in a loop then avoid loading the file each time instead you can read teh file in a buffer then use the buffer to play contents in the buffer it may help u.

Does that actually work reliably?
I mean, is it possible to create 2 ISoundPlayer instances, use one to play a background tune, pause it, then use the 2nd one to play a sfx, then resume the first one?
Has anyone tried this on real phones?
Thanks,
Acco
Quote:Originally posted by roshweb
My understanding is that you can only play one sound at a time. To achieve what you are trying, you would have to pause the background music, play the sound effect and restart the background music again.
Hope that helps
Roshan

Does that actually work reliably?
I mean, is it possible to create 2 ISoundPlayer instances, use one to play a background tune, pause it, then use the 2nd one to play a sfx, then resume the first one?
Has anyone tried this on real phones?
Thanks,
Acco
Quote:Originally posted by roshweb
My understanding is that you can only play one sound at a time. To achieve what you are trying, you would have to pause the background music, play the sound effect and restart the background music again.
Hope that helps
Roshan

CMX in Brew 1.1 phones?
Thanks...
Quote:Originally posted by skumar_rao
Hello accolade,
u can use the CMX studio.... for the same...

CMX in Brew 1.1 phones?
Thanks...
Quote:Originally posted by skumar_rao
Hello accolade,
u can use the CMX studio.... for the same...

Yes, it is possible to do so. However, some phones have some limitations (bugs?), for example you cant create more than 8 ISoundPlayer on a vx6000 (as far as i remember), and you can't create more than *1* ISoundPlayer on a z710i (the second instanciation works, but you can't do anything with it..)
/kUfa

Yes, it is possible to do so. However, some phones have some limitations (bugs?), for example you cant create more than 8 ISoundPlayer on a vx6000 (as far as i remember), and you can't create more than *1* ISoundPlayer on a z710i (the second instanciation works, but you can't do anything with it..)
/kUfa

Hey Kufa,thts quite good information,
Any idea how many ISoundPlayers can be created for Kyocera devices like KZ850,KX434.
Thnk U.

Hey Kufa,thts quite good information,
Any idea how many ISoundPlayers can be created for Kyocera devices like KZ850,KX434.
Thnk U.

kUfa,
Are you aware of techniques where one can pass in midi data and an offset to allow the ISoundPlayer to continue at the offset?
I figure one could keep a data array hanging somewhere instead of creating multiple ISoundPlayers...
Thanks!
Quote:Originally posted by kUfa
Yes, it is possible to do so. However, some phones have some limitations (bugs?), for example you cant create more than 8 ISoundPlayer on a vx6000 (as far as i remember), and you can't create more than *1* ISoundPlayer on a z710i (the second instanciation works, but you can't do anything with it..)
/kUfa

kUfa,
Are you aware of techniques where one can pass in midi data and an offset to allow the ISoundPlayer to continue at the offset?
I figure one could keep a data array hanging somewhere instead of creating multiple ISoundPlayers...
Thanks!
Quote:Originally posted by kUfa
Yes, it is possible to do so. However, some phones have some limitations (bugs?), for example you cant create more than 8 ISoundPlayer on a vx6000 (as far as i remember), and you can't create more than *1* ISoundPlayer on a z710i (the second instanciation works, but you can't do anything with it..)
/kUfa

Gladiator: nope, sorry, no idea, haven't got those phones..
Accolade: i wouldn't use offsets in a midi file, for two reasons: my musicians will hate me, and if i really do not want to create several ISoundPlayers i can use only one, and a good use of ISOUNDPLAYER_SetInfo will do the job.
/kUfa

Gladiator: nope, sorry, no idea, haven't got those phones..
Accolade: i wouldn't use offsets in a midi file, for two reasons: my musicians will hate me, and if i really do not want to create several ISoundPlayers i can use only one, and a good use of ISOUNDPLAYER_SetInfo will do the job.
/kUfa

kUfa,
That is what I mean. If you don't want to use multiple ISoundPlayers because it may not be "portable", you would have to use SetInfo. A look at the data structure seems to indicate that you indeed needs a "current index" to track where the background music is, so that you can resume it after you have played the sound effect, no ?!?
typedef struct
{
AEESoundPlayerInput eInput;
void * pData;
uint32 dwSize;
AEESoundPlayerInfo;
Quote:Originally posted by kUfa
Gladiator: nope, sorry, no idea, haven't got those phones..
Accolade: i wouldn't use offsets in a midi file, for two reasons: my musicians will hate me, and if i really do not want to create several ISoundPlayers i can use only one, and a good use of ISOUNDPLAYER_SetInfo will do the job.
/kUfa

kUfa,
That is what I mean. If you don't want to use multiple ISoundPlayers because it may not be "portable", you would have to use SetInfo. A look at the data structure seems to indicate that you indeed needs a "current index" to track where the background music is, so that you can resume it after you have played the sound effect, no ?!?
typedef struct
{
AEESoundPlayerInput eInput;
void * pData;
uint32 dwSize;
AEESoundPlayerInfo;
Quote:Originally posted by kUfa
Gladiator: nope, sorry, no idea, haven't got those phones..
Accolade: i wouldn't use offsets in a midi file, for two reasons: my musicians will hate me, and if i really do not want to create several ISoundPlayers i can use only one, and a good use of ISOUNDPLAYER_SetInfo will do the job.
/kUfa