#Sound Manager 8KHz
I have an application where I need to record sound from the Mic at 8KHz. It is
important to use that frequency because I then feed the resulting sound into
some hardware that only works at that frequency (telephone stuff).
I have the following snippet of code (all error checking removed for brevity):
iErr = SPBOpenDevice ("\p", siWritePermission, &recFRef);
myLevel.OnOff = 1;
myLevel.Level = 0;
iErr = SPBSetDeviceInfo (recFRef,siTwosComplementOnOff, (Ptr) &myLevel);
fixRate = Long2Fix (8192);
iErr = SPBSetDeviceInfo (recFRef,siSampleRate, (Ptr) &fixRate);
That last line returns an error stating that I have specified an invalid rate.
I also tried just forcing fixRate to the hex value shown in IM6 for 7KHz (an
example they use on page 22-45) and get the same error.
As such, I am not really sure if the Sound Manager won't record off the mic at
that frequency or if I'm passing this command incorrectly somehow.
Does anyone here have experience with doing this and can see what is wrong?
– Burt