Playing WMA files from a resource?

L

Lex

I have a simple app that allows a user to record a number of sounds
and save those sounds (in wave form) in a resource file. I am using
mciSendString for all the recording.

I have another app that looks up the sounds in the resource file and
plays them via win32 PlaySound (from memory).

My question is: is there an easy way to convert the wave byte data
into WMA and save that in the resource file? Of course I'd need a way
to play the bytes from memory as well. This would greatly reduce the
size of my resource file.

Regards
 
D

Daniel O'Connell [C# MVP]

Lex said:
I have a simple app that allows a user to record a number of sounds
and save those sounds (in wave form) in a resource file. I am using
mciSendString for all the recording.

I have another app that looks up the sounds in the resource file and
plays them via win32 PlaySound (from memory).

My question is: is there an easy way to convert the wave byte data
into WMA and save that in the resource file? Of course I'd need a way
to play the bytes from memory as well. This would greatly reduce the
size of my resource file.

You could use the WME sdk and its assocaited encoding\decoding interfaces,
but that is a pretty hefty system for this.

You might wanna look into open source systems like OggVorbis and see if you
can find a ported codec rather than trying to use a closed format that will
increase your runtime footprint signficantly.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top