raw audio input on Windows

N

Noah

I need to record raw 8-bit mono audio from a generic sound card on MS-Windows.
I need to do something like this:
sound_device = open audio device
buffer = sound_device.read ('1 second, 8 bit, mono, 8 KHz')
process buffer

If possible I would also like to experiment with sampling the raw audio
in my own loop. For example, something like this:
open audio device
while 1:
read byte from audio device
process byte
(I realize that Python is probably not ideal for this sort of DSP, but
I figure that it should handle 8KHz mono with no problem).

Does anyone have any experience with recording sound using the WIN32 API?
Can you point me in the right direction?

The OSS stuff in Python looks ideal, but unfortunately that's
a UNIX only thing :-(
http://www.python.org/doc/current/lib/module-ossaudiodev.html

Any hints are appreciated.

Yours,
Noah
 
K

Kevin Dahlhausen

Any hints are appreciated.


I've not messed with this myself yet, but I know of an app that does
serious audio processing that had to go through some part of the
direct-X library. That app is sampling at a lot higher rate -
probably closer to the limits of pc sound cards.

If there's not a direct python api for directx, no pun intended,
there's a library that wraps any dll that should do the trick.
 

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top