471,336 Members | 1,022 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,336 software developers and data experts.

raw audio input on Windows

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/li...saudiodev.html

Any hints are appreciated.

Yours,
Noah
Jul 18 '05 #1
1 2866
> 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.
Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by psk | last post: by
3 posts views Thread by skt | last post: by
2 posts views Thread by positivebalance41m | last post: by
3 posts views Thread by Romulo Carneiro | last post: by
8 posts views Thread by Tony K | last post: by
3 posts views Thread by Ryan Liu | last post: by
1 post views Thread by =?Utf-8?B?bWFsYWs=?= | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.