Sign in to follow this  

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

This topic is 4335 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
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

This topic is 4335 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this