Microphone?

T

Tangerine

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.
 
J

Joona I Palaste

Tangerine said:
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.
 
C

CBFalconer

Tangerine said:
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.
 
C

Christopher Benson-Manica

CBFalconer said:
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 ;)
 
A

A123b456c

ubject: Microphone?
From: Tangerine (e-mail address removed)
Date: 1/8/04 9:58 AM US Mountain Standard Time
Message-id: <[email protected]>

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 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?
 
S

Simon Biber

Tangerine said:
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
 

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

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top