Shouldn't it already be processed???

Status
Not open for further replies.

NanoWarrior

In Runtime
Messages
268
On this link http://computer.howstuffworks.com/sound-card3.htm On the part after the 1's and 0's have been compressed by the DSP, why would the 1's and 0's of you voice need to be processed by the processor if the 1's and 0's have already been made by the Analog to digital converter? Or does the processor have to read the data in order to recognize the data thats been entered into the system and puts it into ram?
 
This is a bit of a simplistic view of what happens. The reality is completely dependant on architecture and system setup. If you are recording direct to hard disk there is no need to bring the data to the CPU at all. And you would be right to be confused about what the cpu is being used for in that process flow.

I am also unsure that you will also get a compression stage via a DSP. If you are recording at 44.1KHz and 16bit (CD quality) you get a stream of 16 bit words written to disk. ie. an exact copy of the output of the A-D converter. If your A-D converters work at a higher rate ie. 96KHz and 24bit you then will need a DSP stage to reduce this to 44.1KHz and 16bit.

The only reason the data would need to travel to the CPU is if you were going to do further processing on the data itself, ie. use a lossy compression algorithm like MP3.

So the answer is that it really depends on how the software was written, what sound card design/architecture your using and what your trying to do with the sound data.
 
Thanks for the help, makes sence, though I have another question. What if in a game for example I shoot a gun....how would the computer know to bring up the right sound for that gun? Or does this base off of the system architecture as well?
 
This is really dependant on how the software engineers have decide to implement sound in their engine. However it normally takes the form of caching the sounds in ram, which you then pass to the sound card to be played at the appropriate moment.

The human ear cannot distinguish sounds less than about 65ms apart, it follows that as long as the gun sound happens less than this time after you press your fire button you will think that the actions were simultaneous.

A .5 second sound at 44.1Khz and 16bit is 44100 bytes long. Most system busses are 32 bit wide, ie. send 32bits in parrallel. Consider a system buss running at 100MHz. This bus can deliver 32bits every 0.00000001 seconds. This means it would take 0.00011025s to transmit this data to the sound card. This is an order of 1000 times faster than needed in order for a human to consider the press of the button and the sound contigious.

So there is no problems with storing often used bits of data in ram. However the CPU will be involved here because it will be orchestrating what data goes where and when it goes there.

The software writers will devise a scheme that allows them to respond to the keypress for firing. This will start a chain of events which results in the data being passed to the sound card. It is up to the software writers to manage this process such that the sound happens at the appropriate moment, without affecting other elements of the game, like the screen. This has become easier over the history of computing because a lot of the sound and screen processing are now delegated to the sound and video cards.
 
Status
Not open for further replies.
Back
Top Bottom