By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,260 Members | 1,352 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,260 IT Pros & Developers. It's quick & easy.

Microphone?

P: n/a
Hello!

Can someone tell me how to make a function that returns the sound frequency
recorded by the microphone in the last moment?
I use Dev-C++ and I'm a total newbie if it's important.
Nov 14 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Tangerine <pa**@poczta.onet.pl> scribbled the following:
Hello! Can someone tell me how to make a function that returns the sound frequency
recorded by the microphone in the last moment?
I use Dev-C++ and I'm a total newbie if it's important.


ISO standard C does not specify anything about microphones. Please ask
in a newsgroup dedicated to your own implementation.

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"Shh! The maestro is decomposing!"
- Gary Larson
Nov 14 '05 #2

P: n/a
Tangerine wrote:

Can someone tell me how to make a function that returns the sound
frequency recorded by the microphone in the last moment?
You mean the last trumpet has sounded? I didn't hear it :-)
I use Dev-C++ and I'm a total newbie if it's important.


No it isn't. Your question is confusing, and microphones and
their ilk are not part of the standard C language. Ask on a group
dealing with your system, after making you problem clear.

--
Chuck F (cb********@yahoo.com) (cb********@worldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!
Nov 14 '05 #3

P: n/a
CBFalconer <cb********@yahoo.com> spoke thus:
You mean the last trumpet has sounded? I didn't hear it :-)


I'd make some comment about the Book of Revelation, but I always
thought it was K&R2 ;) If you didn't hear the last trumpet, God
must've written something like

void main(void)
{
printf( "Hello, world!\n" );
}

The Last Judgement is presumably a possible consequence of UB ;)

--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
Nov 14 '05 #4

P: n/a
>ubject: Microphone?
From: Tangerine pa**@poczta.onet.pl
Date: 1/8/04 9:58 AM US Mountain Standard Time
Message-id: <bt***********@news.wplus.net>

Hello!

Can someone tell me how to make a function that returns the sound frequency
recorded by the microphone in the last moment?
I use Dev-C++ and I'm a total newbie if it's important.


Goto news:comp.lang.matlab and ask your
question there. I'll answer your question
from there. But before you do, please think
a bit about what you mean by "last moment". Describe it. How many samples?
Nov 14 '05 #5

P: n/a
"Tangerine" <pa**@poczta.onet.pl> wrote:
Can someone tell me how to make a function that returns
the sound frequency recorded by the microphone in the
last moment? I use Dev-C++ and I'm a total newbie if
it's important.


Once you actually work out how to make your implementation
record some audio into a PCM (pulse-code modulation) raw
audio data block, you will want to use some FFT (fast
fourier transforms) to get a signal strength reading for
each frequency, and pick the maximum point.

The implementation specific part should be topical on
comp.os.ms-windows.programmer.win32 or
comp.os.ms-windows.programmer.multimedia

Whereas the domain conversion is a mathematical issue,
could be topical on comp.programming or somewhere like
sci.math

I have just implemented a simple audio recording
program on Cygwin/GCC which should be a similar
environment to your Dev-C++, it was actually very
easy while reading the API documentation.

Source here (121 lines, only two of which contain
a call to a non-standard function):
http://members.optushome.com.au/sbiber/recwave.c

--
Simon.
Nov 14 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.