Loading Voice Files | developer.brewmp.com Loading Voice Files | developer.brewmp.com

Developer

Loading Voice Files

Forums:

I would like to know if there is anyway to put a voice file (with a lot of smalls speeches) into T720 using BREW 1.1. Only WAV or MP3? Any other option?

Thank´s...

Daniel

one more thing: what I have to do to play *.MMF files with BREW 1.1?

one more thing: what I have to do to play *.MMF files with BREW 1.1?

ssh,
You can embed .wav files using .mmf format. Try reading this thread for more information on loading mmf files on the T720:
http://brewforums.qualcomm.com/showthread.php?s=&threadid=423
As far as I know, only wav is supported on T720 using mmf format. On the version of T720 that I have, it says that its MP3 capable, whatever that means.
asic

ssh,
You can embed .wav files using .mmf format. Try reading this thread for more information on loading mmf files on the T720:
http://brewforums.qualcomm.com/showthread.php?s=&threadid=423
As far as I know, only wav is supported on T720 using mmf format. On the version of T720 that I have, it says that its MP3 capable, whatever that means.
asic

The voice i want is to put into a game that i am developing and, if i´m not wrong mmf files are ring tones, so ins´t an option. I was looking and i believe that i could resolve this using mp3 files but i´m trying to loading mp3 files using ISOUNDPLAYER and isn´t working (midi files i´m loading without any problem).
Could somyone give a tip??
Daniel
PS: (Sorry about my english)

The voice i want is to put into a game that i am developing and, if i´m not wrong mmf files are ring tones, so ins´t an option. I was looking and i believe that i could resolve this using mp3 files but i´m trying to loading mp3 files using ISOUNDPLAYER and isn´t working (midi files i´m loading without any problem).
Could somyone give a tip??
Daniel
PS: (Sorry about my english)

hi ssh,
I'm using .mmf files as background and other music for the games so you can also consider the mmf format for music. And plz. remember to use mmf on device you should use the SDT_BUFFER option with ISOUNDPLAYER.
Hope it helps.
Regards,
Ali Naqvi

hi ssh,
I'm using .mmf files as background and other music for the games so you can also consider the mmf format for music. And plz. remember to use mmf on device you should use the SDT_BUFFER option with ISOUNDPLAYER.
Hope it helps.
Regards,
Ali Naqvi

hi ssh,
I'm using .mmf files as background and other music for the games so you can also consider the mmf format for music. And plz. remember to use mmf on device you should use the SDT_BUFFER option with ISOUNDPLAYER.
Hope it helps.
Regards,
Ali Naqvi

hi ssh,
I'm using .mmf files as background and other music for the games so you can also consider the mmf format for music. And plz. remember to use mmf on device you should use the SDT_BUFFER option with ISOUNDPLAYER.
Hope it helps.
Regards,
Ali Naqvi

I never used SDT_BUFFER to play a music, only ISOUNDPLAYER_SetStream...
could you give a example how to use ISOUNDPLAYER using the set unction with SDT_BUFFER
Tks..
Daniel

I never used SDT_BUFFER to play a music, only ISOUNDPLAYER_SetStream...
could you give a example how to use ISOUNDPLAYER using the set unction with SDT_BUFFER
Tks..
Daniel

Hi,
Actually we stored our music files in Resource file because the Service Provider we develop for has some limits on files submitted. Below is code snippet
Quote:
l_pBuffer = (byte*)ISHELL_LoadResData(pData->m_app.m_pIShell,resFile, SOUND_ID,RESTYPE_IMAGE) ;
if(!l_pBuffer)
return;
l_dwSize = GET_DWORD_FROM_PTR(l_pBuffer+RES_HEADER_SIZE + SIZE_INFO_OFFSET ) + MMF_HEADER_SIZE;
pData->m_pBuffer = (byte*) MALLOC(l_dwSize);
if(!pData->m_pBuffer){
ISHELL_FreeResData(pData->m_app.m_pIShell, l_pBuffer);
return;

MEMCPY(pData->m_pBuffer, l_pBuffer + RES_HEADER_SIZE, l_dwSize);
ISHELL_FreeResData(pData->m_app.m_pIShell, l_pBuffer);
ISOUNDPLAYER_Set(pData->m_pISoundPayer, SDT_BUFFER,pData->m_pBuffer);
ISOUNDPLAYER_Play(pData->m_pISoundPayer);
Hope it helps.
Regards,
Ali Naqvi

Hi,
Actually we stored our music files in Resource file because the Service Provider we develop for has some limits on files submitted. Below is code snippet
Quote:
l_pBuffer = (byte*)ISHELL_LoadResData(pData->m_app.m_pIShell,resFile, SOUND_ID,RESTYPE_IMAGE) ;
if(!l_pBuffer)
return;
l_dwSize = GET_DWORD_FROM_PTR(l_pBuffer+RES_HEADER_SIZE + SIZE_INFO_OFFSET ) + MMF_HEADER_SIZE;
pData->m_pBuffer = (byte*) MALLOC(l_dwSize);
if(!pData->m_pBuffer){
ISHELL_FreeResData(pData->m_app.m_pIShell, l_pBuffer);
return;

MEMCPY(pData->m_pBuffer, l_pBuffer + RES_HEADER_SIZE, l_dwSize);
ISHELL_FreeResData(pData->m_app.m_pIShell, l_pBuffer);
ISOUNDPLAYER_Set(pData->m_pISoundPayer, SDT_BUFFER,pData->m_pBuffer);
ISOUNDPLAYER_Play(pData->m_pISoundPayer);
Hope it helps.
Regards,
Ali Naqvi

The above snippet uses: GET_DWORD_FROM_PTR
What does this macro do? Where can I find a definition of it? It's not in BREW as near as I can tell.
If it is a custom macro, what is it's purpose? I'm interested in using this snippet, but I can't figure it out.
Thanks,
Darci

The above snippet uses: GET_DWORD_FROM_PTR
What does this macro do? Where can I find a definition of it? It's not in BREW as near as I can tell.
If it is a custom macro, what is it's purpose? I'm interested in using this snippet, but I can't figure it out.
Thanks,
Darci

Hi Darci,
GET_DWORD_FROM_PTR is a custom macro which we use to get the actual size of file stored in resource file as bitmap.
Note: when we store files in resource as image; BREW resource editor automatically add the custom header of 12 bytes in the beginning.
Regards,
Ali Naqvi

Hi Darci,
GET_DWORD_FROM_PTR is a custom macro which we use to get the actual size of file stored in resource file as bitmap.
Note: when we store files in resource as image; BREW resource editor automatically add the custom header of 12 bytes in the beginning.
Regards,
Ali Naqvi

So it just returns a pointer to the soundfile data at "start + 12 bytes" ?
What are RES_HEADER_SIZE, SIZE_INFO_OFFSET, MMF_HEADER_SIZE set to?
And better yet, how did you figure them out?
Thanks,
Darci

So it just returns a pointer to the soundfile data at "start + 12 bytes" ?
What are RES_HEADER_SIZE, SIZE_INFO_OFFSET, MMF_HEADER_SIZE set to?
And better yet, how did you figure them out?
Thanks,
Darci

Does this have something to do with RESBLOB_DATA() which is a macro in Brew to read into the AEEResBlob structure. ?

Does this have something to do with RESBLOB_DATA() which is a macro in Brew to read into the AEEResBlob structure. ?

Hi Darci,
No it doesn't return the pointer but it returns the length as uint32 type. Below are the constants declarations
#define RES_HEADER_SIZE 12
#define MMF_HEADER_SIZE 9
#define SIZE_INFO_OFFSET 4
And Shonali45 the code snippet provided by me has no relation with BREW defined macro. As you can see the code snippet in my previous posts we are simply using the ISHELL_LoadResData BREW API function to get the actual work done.
Best Regards,
Ali Naqvi

Hi Darci,
No it doesn't return the pointer but it returns the length as uint32 type. Below are the constants declarations
#define RES_HEADER_SIZE 12
#define MMF_HEADER_SIZE 9
#define SIZE_INFO_OFFSET 4
And Shonali45 the code snippet provided by me has no relation with BREW defined macro. As you can see the code snippet in my previous posts we are simply using the ISHELL_LoadResData BREW API function to get the actual work done.
Best Regards,
Ali Naqvi

Thanks Ali!

Thanks Ali!