Is it possible to play WAV files somehow? | developer.brewmp.com Is it possible to play WAV files somehow? | developer.brewmp.com

Developer

Is it possible to play WAV files somehow?

Forums:

I wonder if it is possible at all to play my own uncompressed raw sound data, such as .wav. If there's a possibility to play .mp3, then it would be logical to suppose that wavs could be played too. Am I right?

Hi!
The playback of certain types of audio is dependant on which type of formats are supported by the device you are targeting. You should see what the platform you are building your application for supports on the device info seen in the developer extranet. It is also, not necessarily an 1:1 correlation between playing mp3 and playing wav. Most manufacturers who have a mp3 decoding dsp will convert audio into a raw format for the sound hardware to play which not necessarily a wav format. In this instance, they would not have any hardware or software to decode wav format into a raw format that theiur sound hardware can understand.
Thanks!
jason.

Hi!
The playback of certain types of audio is dependant on which type of formats are supported by the device you are targeting. You should see what the platform you are building your application for supports on the device info seen in the developer extranet. It is also, not necessarily an 1:1 correlation between playing mp3 and playing wav. Most manufacturers who have a mp3 decoding dsp will convert audio into a raw format for the sound hardware to play which not necessarily a wav format. In this instance, they would not have any hardware or software to decode wav format into a raw format that theiur sound hardware can understand.
Thanks!
jason.

Hi Jason.
Thanks for explanation, however I'd like to narrow initial question a bit. Let's not talk about .wav or any other specific format. The question is how can I play my own wave data (in any acceptable format for device)? Which API methods should I use? Looking into documentation I see how I can play MIDI or QCP data from file, but I'd like to have an ability to allocate memory buffer, fill it with wave data (once again in any format which is acceptable for device) and then tell somehow to use this buffer to play wave sound.
I definitely saw video playback software (written in BREW) working on several handsets and they stream audio from network, which means that they didn't use MIDI or QCP playback from file.
Thanks in advance for the answer.

Hi Jason.
Thanks for explanation, however I'd like to narrow initial question a bit. Let's not talk about .wav or any other specific format. The question is how can I play my own wave data (in any acceptable format for device)? Which API methods should I use? Looking into documentation I see how I can play MIDI or QCP data from file, but I'd like to have an ability to allocate memory buffer, fill it with wave data (once again in any format which is acceptable for device) and then tell somehow to use this buffer to play wave sound.
I definitely saw video playback software (written in BREW) working on several handsets and they stream audio from network, which means that they didn't use MIDI or QCP playback from file.
Thanks in advance for the answer.

"I definitely saw video playback software (written in BREW) working on several handsets and they stream audio from network, which means that they didn't use MIDI or QCP playback from file."
Those applications might be using some proprietary format which is highly compressed. Their decoder on the phone might be highly optimized and might convert their format to one that is supported on the handset before using the BREW APIs. Just speculation!

"I definitely saw video playback software (written in BREW) working on several handsets and they stream audio from network, which means that they didn't use MIDI or QCP playback from file."
Those applications might be using some proprietary format which is highly compressed. Their decoder on the phone might be highly optimized and might convert their format to one that is supported on the handset before using the BREW APIs. Just speculation!

Quote:Originally posted by Xenocid
Looking into documentation I see how I can play MIDI or QCP data from file, but I'd like to have an ability to allocate memory buffer, fill it with wave data (once again in any format which is acceptable for device) and then tell somehow to use this buffer to play wave sound.ISoundPlayer does this. In BREW 1.0, use ISOUNDPLAYER_Set. In BREW 1.1+, use ISOUNDPLAYER_SetInfo. You can give a pointer to the sound buffer.
--t

Quote:Originally posted by Xenocid
Looking into documentation I see how I can play MIDI or QCP data from file, but I'd like to have an ability to allocate memory buffer, fill it with wave data (once again in any format which is acceptable for device) and then tell somehow to use this buffer to play wave sound.ISoundPlayer does this. In BREW 1.0, use ISOUNDPLAYER_Set. In BREW 1.1+, use ISOUNDPLAYER_SetInfo. You can give a pointer to the sound buffer.
--t