SoundRecorder sampleRate on OS X
John M McIntosh
johnmci at smalltalkconsulting.com
Fri Dec 10 21:30:50 UTC 2004
> primGetActualRecordingSampleRate
calls snd_GetRecordingSampleRate
which makes the OS call
SPBGetDeviceInfo() with a parm of siSampleRate
which flows back a float of the sampling rate the hardware is set to.
Now
primStartRecordingDesiredSampleRate: samplesPerSec stereo: stereoFlag
semaIndex: anInteger
"Start sound recording with the given stereo setting. Use a sampling
rate as close to the desired rate as the underlying platform will
support. If the given semaphore index is > 0, it is taken to be the
index of a Semaphore in the external objects array to be signalled
every time a recording buffer is filled."
sets or attempts to set the sampling rate, via startRecording
So what have you set samplingRate to, and does it get ignored and set
to 44,100?
Older operating systems OS-9 allowed you to set sampling rates via a
control panel, but that's missing in os-x
On Dec 10, 2004, at 1:02 PM, Peter Moore wrote:
> Hi everyone,
>
> Why is the SoundRecorder limited to recording at a sample rate of
> 44100 on
> OS X? Setting samplingRate has no effect because it will get
> overwritten
> by the call to SoundRecorder>>primGetActualRecordingSampleRate (always
> 44100).
>
> I'm trying to record voice data for streaming, so 44100 samples per
> second
> is way more data than I need. Is this a limitation of OS X itself?
> Maybe
> it's something that got carried over from previous versions of MacOS?
> Or
> is this something that I can configure somewhere in the OS?
>
>
> -Peter Moore
>
>
>
--
========================================================================
===
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com
========================================================================
===
More information about the Squeak-dev
mailing list
|