Re: problem writing OS X audio driver
Re: problem writing OS X audio driver
- Subject: Re: problem writing OS X audio driver
- From: Herbie Robinson <email@hidden>
- Date: Fri, 21 Jun 2002 01:49:06 -0400
Hi everybody,
I got close but definitely no cigar with the audio driver I am working on.
For the moment I kept things very simple with 1 single input stream/channel.
Basically, everything works great, except the sound quality is
really bad. The music is recognizable, but it sounds extremely
saturated. The sound input level as displayed by audio recording
software is normal though.
I tried different input sources (iPod, Guitar, Mic...) but they all
sound real bad.
It almost sounds like the problem is in the monitoring chain, not the
input conversion. [When all other explanations are ruled out...]
Another very remote possibility is that the samples are already
shifted (could have happened in the little endian to big endian
mapping that the hardware must be doing). If the audio isn't that
hot coming in, you might not be shifting off that many high order
bits...
Is it possible that only the low order bytes need swapping (this
seems extremely unlikely)?
MyAudioEngine::convertInputSamples method looks like this:
This is not a functional problem, but the following:
*floatDestBuf = (*inputBuf << 8) / 2147483648.0;
Can be improved performance-wise by multiplying by the constant
(2**-31). Multiplies are usually around 100 times faster than
divides on a RISC machine (and more than 10 times faster on CISC
machines). The compiler might fix this for you, but why take a
chance.
--
-*****************************************
**
http://www.curbside-recording.com/ **
******************************************
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.