DirectSound Sample - CaptureSound - Saving data as a WMA file(or other format)
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
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
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
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]
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]
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement