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

Developer

Forums

Forums:

I'm having a problem on a Japanese KDDI phone (W44S) trying to play back ADPCM sounds.

I've got code that successfully plays back sounds by creating an IMEDIA interface, using IMEDIA_SetMediaData to point at the area of memory containing the ADPCM sample data, and then calling IMEDIA_Play to set it going.

The first four individual sound samples I try to play will work fine. Indeed I can play the same sound sample multiple times with no problems at all. However, when I come to play the fifth sound sample, the IMEDIA_SetMediaData function returns with error code 6 (EUNABLETOLOAD I believe).

I've tried releasing and recreating the IMEDIA instance, but the problem remains. I've also tried enabling the MM_PARM_CHANNEL_SHARE feature, but this appears to be unsupported (error code 20 returned)

I find it a bit of a coincidence that the hardware supports playing 4 sound channels at once. Anyone got any bright ideas?

OK, I think I found the solution. Seems that if you don't call IMEDIA_Stop and IMEDIA_Release when a sound finishes playing (detected via a callback) then you can't submit new sounds to be played.
Has anyone seen this on other devices, or is this peculiar to KDDI devices such as the W44S?

OK, I think I found the solution. Seems that if you don't call IMEDIA_Stop and IMEDIA_Release when a sound finishes playing (detected via a callback) then you can't submit new sounds to be played.
Has anyone seen this on other devices, or is this peculiar to KDDI devices such as the W44S?