ok, i am just learnig c++ and i was wondering if it is possible for a feature in a program to be actavated by a certain sound. for example i run this program below on one computer and another program exacutes a function when the sound at 1000hz is herd for a tenth of a seconed. is this possible, if so any ideas on how to do it. thankyou

#include "windows.h"
using namespace std;
int main()
{
 	Beep (1000,100);
    return 0;
}

ps. i am using visual c++ and a windows xp computer

Statistics on barking dogs

good lord, that's funny. but i don't think the OP is interested in buying a commercial product to submit as a school project or whatever he's trying to do this for.

a Do-It-Yourself project, i think you will need a sensor to detect sound (a microphone), a very cheap amplifier and bandpass filter circuit for 1kHz, and a microcontroller (such as PIC) to generate a serial output that could be read by the host computer.

probably an easier method may be to use the sound board on the computer with a microphone, but i've never tried that myself. perhaps someone else has...


.

thank you for your post but i am looking to do it through code

You have to get the audio signal through some means, before you can process it...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.