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

Developer

Forums

Forums:

We having an issue playing .pmd (just .qcp sound wrapped inside it) in the emulator.
The same code plays perfectly in the device, without any problem.

I have checked out all the following:

1. Installed CMX-player from the brew website (QAudioFX_Extension_v1.1.0.exe)

2. Check the return code for Imedia_setMediaData() and Imedia_play() - both return success. [Even tried using AEEMediaUtil_CreateMedia() - same problem].

3. Checked the media player example, put the .pmd that I play from the buffer, into the \media directory and tried it out. It plays in the Mediaplayer application. :confused:

I am using a 2.0 emulator for this application and also for mediaplayer example.

Does anyone have any idea why this strange behaviour is exhibited. ?

Is playing pmd file from the buffer is what causes the problem?

Does this problem gets solved by installing older version of cmx player (with cmx.dll, etc, etc). If so can anyone provide me the link to download it?

Will this issue cause us to fail TBT?

Any help is highly appreciated.

Thanks,
R.Pradeep

no responses yet ???? :confused:
Has anyone here succeeded in playing a pmd file from the buffer in the emulator??

no responses yet ???? :confused:
Has anyone here succeeded in playing a pmd file from the buffer in the emulator??

The reason for this issue would be that the "dwSize" in AEEMediaData isn't communicated properly to the SDK (or the extension). The extension would return success and set media object's state to READY state if there is a media buffer which is non empty. The IMEDIA_Play() returns success and would play nothing if extension interprets as having no data (since dwSize isn't set!).
Please check if the dwSize is set for the media data which you are sending through IMEDIA_SetMediaData()

The reason for this issue would be that the "dwSize" in AEEMediaData isn't communicated properly to the SDK (or the extension). The extension would return success and set media object's state to READY state if there is a media buffer which is non empty. The IMEDIA_Play() returns success and would play nothing if extension interprets as having no data (since dwSize isn't set!).
Please check if the dwSize is set for the media data which you are sending through IMEDIA_SetMediaData()

Thanks Prashant Kumar for the reply.
Yes I have already set "dwSize" to the sound size, but still no sound is played in the emulator. But the sounds are played perfectly in the device.
Can't find a reason why it is so :confused:

Thanks Prashant Kumar for the reply.
Yes I have already set "dwSize" to the sound size, but still no sound is played in the emulator. But the sounds are played perfectly in the device.
Can't find a reason why it is so :confused:

When you say "sound size" is it the size of the total pmd file or just the size of qcp sound which is embedded in it? Since any mismatch with the actual file size may also fail the playback...

When you say "sound size" is it the size of the total pmd file or just the size of qcp sound which is embedded in it? Since any mismatch with the actual file size may also fail the playback...

Its the size of the pmd file. Even if there is any size mismatch, it is more likely to fail in the devices too. As mentioned earlier, the sounds play perfectly in the devices.

Its the size of the pmd file. Even if there is any size mismatch, it is more likely to fail in the devices too. As mentioned earlier, the sounds play perfectly in the devices.

Did you try your code in SDK v3.1.5 Simulator? Are you facing the same issue in 3.1.5?
Also is it possible to share your code to look at what's going wrong?

Did you try your code in SDK v3.1.5 Simulator? Are you facing the same issue in 3.1.5?
Also is it possible to share your code to look at what's going wrong?

I used mp3 for 3.x, which will be auto detected at runtime.
We opted out of pmd and dumped the code long ago. Was just curious about solution for that problem. :)
It was something like this
AEEMediaData md;
.....
md.clsData = MMD_BUFFER;
md.pData = pme->pMediaBuffer; // media buffer
md.dwSize = pme->dwMediaBufferSize; // buffer size
if(IMEDIA_SetMediaData(pme->pIMedia, &md) == SUCCESS)
{
returnFlag = IMEDIA_Play(pme->m_pIMedia);
}
.....

I used mp3 for 3.x, which will be auto detected at runtime.
We opted out of pmd and dumped the code long ago. Was just curious about solution for that problem. :)
It was something like this
AEEMediaData md;
.....
md.clsData = MMD_BUFFER;
md.pData = pme->pMediaBuffer; // media buffer
md.dwSize = pme->dwMediaBufferSize; // buffer size
if(IMEDIA_SetMediaData(pme->pIMedia, &md) == SUCCESS)
{
returnFlag = IMEDIA_Play(pme->m_pIMedia);
}
.....

Being curious about the solution, I just checked with a code snippet which plays PMD from the buffer in a 3.x simulator.
It does not create an instance of Imedia with AEECLSID_MEDIAPMD, the createInstance() call returns ECLASSNOTSUPPORT in the 3.x simulator.
[AEECLSID_MEDIAMP3 - works fine if I use that]
But the same code creates an Imedia instance in 2.x emulator without any problems, but still the sound is not heard and everything return from the api's is success.
But as I said earlier, the code runs in the device perfectly.
I cant find a solution till now. Will post any solution if found. :)

Being curious about the solution, I just checked with a code snippet which plays PMD from the buffer in a 3.x simulator.
It does not create an instance of Imedia with AEECLSID_MEDIAPMD, the createInstance() call returns ECLASSNOTSUPPORT in the 3.x simulator.
[AEECLSID_MEDIAMP3 - works fine if I use that]
But the same code creates an Imedia instance in 2.x emulator without any problems, but still the sound is not heard and everything return from the api's is success.
But as I said earlier, the code runs in the device perfectly.
I cant find a solution till now. Will post any solution if found. :)