Jump to content
  • Advertisement
Sign in to follow this  
Eck

DirectSound Sample - CaptureSound - Saving data as a WMA file(or other format)

This topic is 4622 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey guys, I've been messing around with the DirectSound Sample - CaptureSound, and it has some classes to save to a WAV file, but they're too goram big. I'd like to be saving to wma or some other compressed format. I've done a little searching on these boards, but can't seem to find a good starting point. For reasons I won't bore you with my choices are these: wma - 1st choice aac - 2nd ogg - 3rd mp3 - 4th Specifically, I'm looking for some samples or documentation to save data I capture from a direct sound capture buffer to one of these formats. Thanks, - Eck

Share this post


Link to post
Share on other sites
Advertisement
DirectSound only deals with PCM wave files - it's intended more for performance (compressed audio = bad for gaming performance) than features.

You probably want to dig into the PSDK and DirectShow - that has mechanisms (via "filters" if I understand it correctly) to write out to different/encoded formats.

Capturing via DSound, writing (or streaming) to disk and then post-processing it via DShow might be a possible route.

hth
Jack

Share this post


Link to post
Share on other sites
As far as MP3s are concered. You can't. They are licenced material and as such, you must own a license to use an encoding library for them. I think it is the same case with OGG too. Although, you could still write your own encoder using similar techniques. I have no idea what AAC is and I've never found much about WMA which is a shame. Perhaps it too is licenced material?

Your best bet is probably to buy some software that can encode in MP3 or OGG format. Capture your data and then convert using this software. And then use a sound library such as FMOD or DirectShow to play it.

[edit]
Just to clairify, when I say "licenced", I'm referring to the encoding technique, not the actual media.
[/edit]

[Edited by - lack o comments on January 28, 2006 5:30:06 PM]

Share this post


Link to post
Share on other sites
I'm pretty sure ogg is an open file format and has a free library, it said so in my 'Beginning Game Audio' book. I'll check up the name of the library later for you.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!