Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

Hi There,

I'm attempting to play simultaneously some background MIDI music and the occasional sound effect (WAV / PMD / QCP etc...). But unfortunately whenever I attempt to play the sound effect the MIDI stops. Now i've read in the forum threads that it is possible to do this on some handsets (i.e. VX6000). Here is a short description of the code i'm using...

1) Creation of an AEECLSID_MEDIAMIDI for the MIDI file (with setting of the buffered data)
2) Creation of an AEECLSID_MEDIAPMD for the PMD file (with setting of the buffered data)
3) Play the Midi Music (IMEDIA_Play)
4) when the user presses a key play the PMD (IMEDIA_Play)

I've read that you can set these to certain output paths (IMEDIA_SetAudioPath) to the correct device. The SDK help doesn't help with this function as all it tells me is....

Audio path can take following values:

MM_APATH_LOCAL: Playback to: ear-piece, speaker, etc. Record from: Mic
MM_APATH_LOCAL_RINGER: Playback to: Ringer
MM_APATH_REMOTE: Playback to: ReverseLink(over-the-air). Record from: ForwardLink.
MM_APATH_BOTH: Playback [to]: Both MM_APATH_LOCAL and MM_APATH_TX.

So what do I pass in to the function to set each of the AEECLSID_MEDIA*'s to the correct output paths?

A couple of other questions are...
1) Should I be creating two IMEDIA interfaces (AEECLSID_MEDIA)? or one and using IMEDIA_SetMediaDataEx with two buffers. If so how do i playback each buffer?
2) Should I be setting IMEDIA_SetParm(--, MM_PARM_CHANNEL_SHARE, ---) If so how?

Thanks in advance
- Skavenger.

The AEECLSID_MEDIAMIDIOUTQCP interface is supposed to work for this, though I've not found a handset that supports it, yet.

The AEECLSID_MEDIAMIDIOUTQCP interface is supposed to work for this, though I've not found a handset that supports it, yet.

Hi,
First of Create Instance of the Sound Type that you would like to play simultaneoulsly i.e .midi/mmf files
then create instance of AEEMediaData
i.e AEEMediaData pmd
Then set the Values of
pmd.clsData = MMD_FILE_NAME;
pmd.pData = "File Name with extension";
pmd.dwSize = File Size ;
set the values for multiple files using multiple objects of AEEMediaData
then set the audio path either to the speaker/ringer as you know about it
and then play using IMedia_Play(IMedia *)
I have played it on LG 6000 using .MIDI Files and on Sanyo W22SA (Japanese) using .MMF Files
Hope this works for you also
Regards,
Successor

Hi,
First of Create Instance of the Sound Type that you would like to play simultaneoulsly i.e .midi/mmf files
then create instance of AEEMediaData
i.e AEEMediaData pmd
Then set the Values of
pmd.clsData = MMD_FILE_NAME;
pmd.pData = "File Name with extension";
pmd.dwSize = File Size ;
set the values for multiple files using multiple objects of AEEMediaData
then set the audio path either to the speaker/ringer as you know about it
and then play using IMedia_Play(IMedia *)
I have played it on LG 6000 using .MIDI Files and on Sanyo W22SA (Japanese) using .MMF Files
Hope this works for you also
Regards,
Successor