Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Mar 22nd, 2006, 12:34 PM   #1
brophster
Newbie
 
Join Date: Mar 2006
Posts: 4
Rep Power: 0 brophster is on a distinguished road
read in audio

I am working on a project that requires me to analyse an audio signal and output a text file as to the status of the signal. I have limited programming experience as im more of an electronics guy.
My question is how do get my programme to read the audio which will be plugged into the audio in port on my sound card.
Is there a more suiteable language for doing this than C++.
Any help would be greatly appreciated.
brophster is offline   Reply With Quote
Old Mar 22nd, 2006, 12:50 PM   #2
nnxion
Programming Guru
 
nnxion's Avatar
 
Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5 nnxion is on a distinguished road
It depends on how (which format) you get the audio information. I don't think other languages are especially better than C++, but I can tell you it's not easy job.
You say you have limited programming experience, but you might want to take a look at this and see if you understand it. If you think that is easy, then you can move on and make your program. If you don't then I'd recommend you to either learn a lot more of some language until you can make something like it, or you can hire a guy to do it for you.
I'd rent some person from http://www.rentacoder.com or so, they often do things very cheap.
__________________
"Employ your time in improving yourself by other men's writings, so that you shall gain easily what others have labored hard for."
-- Socrates
nnxion is offline   Reply With Quote
Old Mar 22nd, 2006, 1:02 PM   #3
brophster
Newbie
 
Join Date: Mar 2006
Posts: 4
Rep Power: 0 brophster is on a distinguished road
I think your one step ahead of me.
I dont have the audio in any digital format. Its coming in raw through the sound card. I need to be able to moniter this audio in real time.
brophster is offline   Reply With Quote
Old Mar 22nd, 2006, 1:49 PM   #4
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Well, one does it differently with a PC than with a pair of headphones. You haven't given any clues. I recommend you read the forum's rules/FAQ (there's a link to "Asking questions the smart way" there) and the "How to Post a Question" at the top of the C forum.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Mar 22nd, 2006, 2:07 PM   #5
brophster
Newbie
 
Join Date: Mar 2006
Posts: 4
Rep Power: 0 brophster is on a distinguished road
sorry for not making myself clear and thankyou for your atention.

What i want to do.
I wish to read in a raw audio signal straight from an amplifier into a pc. I need a program to periodically check the audio to determine if it is still transmitting.
If it is not transmiting the program will update a text file to register a fault.

My problem.
If i were dealing with an audio file i would have some idea of how to procede but im not.
So my question is how do i go about deealing with an audio signal in real time.
and how to i direct my program to an input port rather than a text file.

I hope this is considered an appropriate question for this forum and you dont all think im daft; but any help would be greatly appreciated.
brophster is offline   Reply With Quote
Old Mar 22nd, 2006, 2:31 PM   #6
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Get the technical documents on the sound card in your system from the manufacturer. On a typical desktop PC, you have to know what you're doing to get into the driver arena, but your manufacturer will probably supply you with software or documentation for the existing driver that lets you access the card via some API. Your card will take care of a lot of your problems. Analog audio is (obviously) translated to digital audio for recording and measurement (this is where you want to be) and digital is translated to analog for output or playback. As an electronics guy you are no doubt familiar with the terms ADC and DAC.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Mar 22nd, 2006, 2:32 PM   #7
Animatronic
Programmer
 
Join Date: Jun 2005
Posts: 99
Rep Power: 4 Animatronic is on a distinguished road
How are you connecting the amp to the pc... line in / mic? If so I would still treat that as an audio stream.

I would use FMOD to do this (just because I've used it before), you can get it to output the sound to a file (if you need that), and get it to do some simple analysis on the sound to check if its silent or near silent, i.e. stopped.

As for lanuages FMOD provides a managed wrapper, so you could choose C# for speed of development.
Animatronic is offline   Reply With Quote
Old Mar 23rd, 2006, 7:22 AM   #8
brophster
Newbie
 
Join Date: Mar 2006
Posts: 4
Rep Power: 0 brophster is on a distinguished road
thanks Animatronic that fmod program looks great. hopefully it will do what i want it to. But ill need to play around with it for a while.
brophster is offline   Reply With Quote
Old Mar 23rd, 2006, 7:28 AM   #9
nnxion
Programming Guru
 
nnxion's Avatar
 
Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5 nnxion is on a distinguished road
Quote:
Originally Posted by brophster
thanks Animatronic that fmod program looks great. hopefully it will do what i want it to. But ill need to play around with it for a while.
If you had searched the forums you would have found that FMOD has been recommended numerous times before.
__________________
"Employ your time in improving yourself by other men's writings, so that you shall gain easily what others have labored hard for."
-- Socrates
nnxion is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 2:39 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC