Has anyone streamed audio successfully? | developer.brewmp.com Has anyone streamed audio successfully? | developer.brewmp.com

Developer

Has anyone streamed audio successfully?

Forums:

OK, I have searched these forums, the FAQ and the knowledge base and have seen lots of people asking for help streaming (from buffers, not from a complete file) audio using IMediaPlayer and ISoundPlayer. Mostly it seems folks are complaining about short gaps between "buffers" of audio. I was wondering if anybody has successfully, cleanly streamed audio. I haven't seen any sign that any of these issues were resolved, which leads me to believe that so far nobody has done this. If you did do it successfully, would you be so kind as to indicate which handset you used and which audio format (eg mp3, aac, etc)?. Thank you in advance:)

There are issues with BREW API which is very friendly to streaming audio, at least not as of now.

There are issues with BREW API which is very friendly to streaming audio, at least not as of now.

I’ve been able to successfully stream using the IVocoder interface. I’m in the process of completing a sample application to post to the developer extranet. Just construct a packet including rate, length, and data. Feed this data to the IVocoder interface when a device receives this packet. This should work for any device who has implemented the IVocoder interface. More info can be found in the API.

I’ve been able to successfully stream using the IVocoder interface. I’m in the process of completing a sample application to post to the developer extranet. Just construct a packet including rate, length, and data. Feed this data to the IVocoder interface when a device receives this packet. This should work for any device who has implemented the IVocoder interface. More info can be found in the API.

It would be much convenient to developer, if BREW adds real streaming audio support in IMedia/ISound interface, allow access to decoded data buffer (say PCM decoded data buffer of MP3 audio data). It is normal to expect that IMedia/ISound interface support streaming audio without much complicacy. For example you can see WinCE sound streaming API.

It would be much convenient to developer, if BREW adds real streaming audio support in IMedia/ISound interface, allow access to decoded data buffer (say PCM decoded data buffer of MP3 audio data). It is normal to expect that IMedia/ISound interface support streaming audio without much complicacy. For example you can see WinCE sound streaming API.

Jonathan, thanks for your reply. I forgot to mention that my interest is in playing music and so the vocoder API is not sufficient. Ideally I would have a pair of PCM double buffers that I could keep filling and playing, responding to callbacks. This is how most sound APIs (like the Windows waveout API for example) seem to work. While ISoundPlayer and IMediaPlayer seem to be able to play from a file, this prohibits, for example, other codecs to be implemented since only certain file formats are supported. True, I could decode to WAV and then use ISoundPlayer to play the WAV, but WAV files get very large (especially 44KHz 16 bit stereo WAV files). This is simply not practical.

Jonathan, thanks for your reply. I forgot to mention that my interest is in playing music and so the vocoder API is not sufficient. Ideally I would have a pair of PCM double buffers that I could keep filling and playing, responding to callbacks. This is how most sound APIs (like the Windows waveout API for example) seem to work. While ISoundPlayer and IMediaPlayer seem to be able to play from a file, this prohibits, for example, other codecs to be implemented since only certain file formats are supported. True, I could decode to WAV and then use ISoundPlayer to play the WAV, but WAV files get very large (especially 44KHz 16 bit stereo WAV files). This is simply not practical.

It would be very worthwhile if Qualcomm BREW engineering team considers developer's feedback while designing/enhancing API. For last couple of years I have made multiple requests to Qualcomm to enhance BREW API, some of them got improved in BREw 3.0 API, but many of them didn't make it.

It would be very worthwhile if Qualcomm BREW engineering team considers developer's feedback while designing/enhancing API. For last couple of years I have made multiple requests to Qualcomm to enhance BREW API, some of them got improved in BREw 3.0 API, but many of them didn't make it.

brewkoz wrote:[...] I was wondering if anybody has successfully, cleanly streamed audio. I haven't seen any sign that any of these issues were resolved, which leads me to believe that so far nobody has done this. If you did do it successfully, would you be so kind as to indicate which handset you used and which audio format (eg mp3, aac, etc)?.I've streamed QCELP on several handsets (SE47, VX6000, CDM8900, etc.) without a noticable pause between buffers. I tested MPEG4 on a VX7000 (6100 chipset), and it worked fine. I also tried streaming AAC on a 6500 chipset handset, and it worked great.
I did complain about the pause between buffers on unnamed handsets in another thread, but IMedia and ISound tend to work much better on BREW than the JSR 135 MM_API implementations on J2ME handsets.
--t

brewkoz wrote:[...] I was wondering if anybody has successfully, cleanly streamed audio. I haven't seen any sign that any of these issues were resolved, which leads me to believe that so far nobody has done this. If you did do it successfully, would you be so kind as to indicate which handset you used and which audio format (eg mp3, aac, etc)?.I've streamed QCELP on several handsets (SE47, VX6000, CDM8900, etc.) without a noticable pause between buffers. I tested MPEG4 on a VX7000 (6100 chipset), and it worked fine. I also tried streaming AAC on a 6500 chipset handset, and it worked great.
I did complain about the pause between buffers on unnamed handsets in another thread, but IMedia and ISound tend to work much better on BREW than the JSR 135 MM_API implementations on J2ME handsets.
--t

For a preview of whats to come, check out the IMedia interface in BREW 3.1.2. Streaming can be done with IMEDIA_SetMediaDataEx() for QCP and PCM formats.

For a preview of whats to come, check out the IMedia interface in BREW 3.1.2. Streaming can be done with IMEDIA_SetMediaDataEx() for QCP and PCM formats.

So when do you expect any U.S. handsets to actually house BREW 3.1.2 SDK...
...maybe like sometime in late 2007 ??? :eek:

So when do you expect any U.S. handsets to actually house BREW 3.1.2 SDK...
...maybe like sometime in late 2007 ??? :eek:

Actually, this feature should be available on some 2.1.3 devices in the future. Release dates are unknown at this time, but implementation is the same as 3.1.2...Just trying to give you a head start.

Actually, this feature should be available on some 2.1.3 devices in the future. Release dates are unknown at this time, but implementation is the same as 3.1.2...Just trying to give you a head start.

Jonathan,
Ignore my sarcasm I was trying to be funny :D , and thanks for the heads up.
Consequently, you said that "real streaming" may be available on some 2.1.3 versioned handsets, which would have the same implementation of IMEDIA_SetMediaDataEx() as BREW SDK 3.1.2.
So basically, this function would allow developers to set an ISOURCE or IASTREAM object as the data source for an IMEDIA object play back, and the IMEDIA object would play the music data while simultaneously recieving the data over-the-air (for instance). Rather than reading the whole stream and copying it to memory before play back starts, like the current implementation of IMEDIA currently does. Is this correct???
Sincerely,
Ivan

Jonathan,
Ignore my sarcasm I was trying to be funny :D , and thanks for the heads up.
Consequently, you said that "real streaming" may be available on some 2.1.3 versioned handsets, which would have the same implementation of IMEDIA_SetMediaDataEx() as BREW SDK 3.1.2.
So basically, this function would allow developers to set an ISOURCE or IASTREAM object as the data source for an IMEDIA object play back, and the IMEDIA object would play the music data while simultaneously recieving the data over-the-air (for instance). Rather than reading the whole stream and copying it to memory before play back starts, like the current implementation of IMEDIA currently does. Is this correct???
Sincerely,
Ivan

Tom,
You reported that you were able to successfully stream QCELP files. Can you give
us more details of how you did it?

Tom,
You reported that you were able to successfully stream QCELP files. Can you give
us more details of how you did it?

Ivan,
Yes, IMedia will be able to play an audio file while simultaneously downloading the data over the air. So it will be real streaming unlike the implementation in ISoundPlayer. The function will use an ISource. Here is a quick example of implementation:
AEEMediaDataEx sd;
AEEMediaWaveSpec pSpec;
//…skipping pSpec initialization
sd.clsData = MMD_ISOURCE;
sd.pData = (void *)pMe->pISource;
sd.dwSize = 0;
sd.dwStructSize = sizeof(sd);
sd.dwCaps = 0;
sd.bRaw = FALSE;
sd.dwBufferSize = 0; // default buffer size
sd.pSpec = pSpec; // struct holding info on media spec…For example
sd.dwSpecSize = sizeof(pSpec);
IMEDIA_SetMediaDataEx(pme->pIMedia, &sd, 1);
As of now, only QCP and PCM will be implemented.

Ivan,
Yes, IMedia will be able to play an audio file while simultaneously downloading the data over the air. So it will be real streaming unlike the implementation in ISoundPlayer. The function will use an ISource. Here is a quick example of implementation:
AEEMediaDataEx sd;
AEEMediaWaveSpec pSpec;
//…skipping pSpec initialization
sd.clsData = MMD_ISOURCE;
sd.pData = (void *)pMe->pISource;
sd.dwSize = 0;
sd.dwStructSize = sizeof(sd);
sd.dwCaps = 0;
sd.bRaw = FALSE;
sd.dwBufferSize = 0; // default buffer size
sd.pSpec = pSpec; // struct holding info on media spec…For example
sd.dwSpecSize = sizeof(pSpec);
IMEDIA_SetMediaDataEx(pme->pIMedia, &sd, 1);
As of now, only QCP and PCM will be implemented.

Jonathan, its good to know that streaming support (even for PCM) was implemented in BREW 3.1.2.
Do you know if streaming would work if third party application tries to stream PCM data in buffer blocks? Did you guys have chance to verify?
In pre 3.1.2 BREW version real audio streaming couldn't be done as we could do in Symbian or Windows CE.. In system like Windows CE, you can stream PCM sound data in blocks and sound playback works perfectly fine without any interruption.

Jonathan, its good to know that streaming support (even for PCM) was implemented in BREW 3.1.2.
Do you know if streaming would work if third party application tries to stream PCM data in buffer blocks? Did you guys have chance to verify?
In pre 3.1.2 BREW version real audio streaming couldn't be done as we could do in Symbian or Windows CE.. In system like Windows CE, you can stream PCM sound data in blocks and sound playback works perfectly fine without any interruption.

The Streaming feature adds the ability to play data in raw format. Before this feature an application couldn't send raw PCM data to the IMedia interface. This makes smooth seamless streaming pretty hard. I have not yet seen an implementation that actually works.

The Streaming feature adds the ability to play data in raw format. Before this feature an application couldn't send raw PCM data to the IMedia interface. This makes smooth seamless streaming pretty hard. I have not yet seen an implementation that actually works.

Streaming raw PCM data is pretty useful when a video application tries to synchronize video with audio. Given that Qualcomm is trying to setup TV/video network (based on press release) it would be interesting get Qualcomm's official response on this.
By the way, do you if Qualcomm has any plan to expose the sound decoders API in future versions (like IImageDecoder in BREW 3.1.2)?

Streaming raw PCM data is pretty useful when a video application tries to synchronize video with audio. Given that Qualcomm is trying to setup TV/video network (based on press release) it would be interesting get Qualcomm's official response on this.
By the way, do you if Qualcomm has any plan to expose the sound decoders API in future versions (like IImageDecoder in BREW 3.1.2)?

As I said before, playing raw PCM data has been added to 3.1.2 and will be available on a to be released 2.1 build. Release date is unknown at this time.

As I said before, playing raw PCM data has been added to 3.1.2 and will be available on a to be released 2.1 build. Release date is unknown at this time.

We just need a way to play back streaming audio smoothly, thanks.

We just need a way to play back streaming audio smoothly, thanks.

un1 wrote:We just need a way to play back streaming audio smoothly, thanks.
Excellent post...now go back and read the thread. :rolleyes:

un1 wrote:We just need a way to play back streaming audio smoothly, thanks.
Excellent post...now go back and read the thread. :rolleyes:

Jonathan, did you already post the Vocoder sample application to the developer extranet ?

Jonathan, did you already post the Vocoder sample application to the developer extranet ?

Hello all,
I was reading about the possibility of streaming audio using IMedia. Great news that it would finally happen! But I am wondering, what happens when the connection slows down so that the IMedia object runs out of data to play? What event will get reported to the callback function, MM_STATUS_DATA_IO_DELAY? And will this get reported when the IMedia object ceases to play audio due to lack of data, or when it resumes playing audio after receiving more data when the network recovers? In other words, what is the sequence of events that occurs during temporary network outages?
Thanks!
d.

Hello all,
I was reading about the possibility of streaming audio using IMedia. Great news that it would finally happen! But I am wondering, what happens when the connection slows down so that the IMedia object runs out of data to play? What event will get reported to the callback function, MM_STATUS_DATA_IO_DELAY? And will this get reported when the IMedia object ceases to play audio due to lack of data, or when it resumes playing audio after receiving more data when the network recovers? In other words, what is the sequence of events that occurs during temporary network outages?
Thanks!
d.

Did this sample app ever get posted to the extranet?
Jonathan wrote:I’ve been able to successfully stream using the IVocoder interface. I’m in the process of completing a sample application to post to the developer extranet. Just construct a packet including rate, length, and data. Feed this data to the IVocoder interface when a device receives this packet. This should work for any device who has implemented the IVocoder interface. More info can be found in the API.

Did this sample app ever get posted to the extranet?
Jonathan wrote:I’ve been able to successfully stream using the IVocoder interface. I’m in the process of completing a sample application to post to the developer extranet. Just construct a packet including rate, length, and data. Feed this data to the IVocoder interface when a device receives this packet. This should work for any device who has implemented the IVocoder interface. More info can be found in the API.

https://brewx.qualcomm.com/brew/sdk/download.jsp?page=dx/samplecode
The streaming aspect was removed, but it's pretty simple to implement. Just send the data over the net and the revieving handset can play the raw data.

https://brewx.qualcomm.com/brew/sdk/download.jsp?page=dx/samplecode
The streaming aspect was removed, but it's pretty simple to implement. Just send the data over the net and the revieving handset can play the raw data.

Hey,
I'm currently in the process of developing a streaming audio system. Just alloc yourself a chunk of memory and set it up as a WAV file and set that to loop. You can use that as a primary buffer and mix your samples directly into the WAV file and it *should* work. I don't know if there will be latency when it loops since I haven't finished building it yet.
-Krad

Hey,
I'm currently in the process of developing a streaming audio system. Just alloc yourself a chunk of memory and set it up as a WAV file and set that to loop. You can use that as a primary buffer and mix your samples directly into the WAV file and it *should* work. I don't know if there will be latency when it loops since I haven't finished building it yet.
-Krad

Hmm,
I tried and I failed. Anyone else have any hints as to what could be done to stream PCM data?
I've tried the example code, and that didn't work. I tried my own solution which was basically shoving raw data at the IMedia, and that didn't work either. I know the sound can play because when I use the regular IMEDIA_SetMediaData it runs fine, but the second I try to do anything tricky with it, it bombs out.
Any help?
-Krad

Hmm,
I tried and I failed. Anyone else have any hints as to what could be done to stream PCM data?
I've tried the example code, and that didn't work. I tried my own solution which was basically shoving raw data at the IMedia, and that didn't work either. I know the sound can play because when I use the regular IMEDIA_SetMediaData it runs fine, but the second I try to do anything tricky with it, it bombs out.
Any help?
-Krad

tom wrote:I've streamed QCELP on several handsets (SE47, VX6000, CDM8900, etc.) without a noticable pause between buffers. I tested MPEG4 on a VX7000 (6100 chipset), and it worked fine. I also tried streaming AAC on a 6500 chipset handset, and it worked great.
I did complain about the pause between buffers on unnamed handsets in another thread, but IMedia and ISound tend to work much better on BREW than the JSR 135 MM_API implementations on J2ME handsets.
--t
Can you implement it in BREW 2.0?

tom wrote:I've streamed QCELP on several handsets (SE47, VX6000, CDM8900, etc.) without a noticable pause between buffers. I tested MPEG4 on a VX7000 (6100 chipset), and it worked fine. I also tried streaming AAC on a 6500 chipset handset, and it worked great.
I did complain about the pause between buffers on unnamed handsets in another thread, but IMedia and ISound tend to work much better on BREW than the JSR 135 MM_API implementations on J2ME handsets.
--t
Can you implement it in BREW 2.0?

Hi all,
Can anybody tell me whether icamera and ivocoder work together?
Thanks,
Celia

Hi all,
Can anybody tell me whether icamera and ivocoder work together?
Thanks,
Celia

Hey all
This post is start from 2005, it is 2008 now.
Is it available for record amr file via IVocoder or something else?
Thanks in advance.

Hey all
This post is start from 2005, it is 2008 now.
Is it available for record amr file via IVocoder or something else?
Thanks in advance.

Hey all
I also still have audio streaming problem in my simulator 3.1.5
The example in SDK for streaming with imedia is infact can not working

Hey all
I also still have audio streaming problem in my simulator 3.1.5
The example in SDK for streaming with imedia is infact can not working