Sound stuff
John M McIntosh
johnmci at smalltalkconsulting.com
Wed May 16 17:42:05 UTC 2007
On May 16, 2007, at 9:59 AM, Brian Brown wrote:
> Which also plays back much faster than the recording should. Anyone
> have any ideas why there would be this mismatch?
would that be the issue below?
> From: yoshiki at squeakland.org
> Subject: Sound Recording on Mac
> Date: November 8, 2006 6:00:46 PM PST (CA)
> To: johnmci at smalltalkconsulting.com, squeak-
> dev at lists.squeakfoundation.org, etoys at laptop.org
>
> Hello,
>
> Has anybody tried sound recording and playback on Mac lately? Scott
> reported that it is broken in Squeak 3.9 7067 (and OLPC etoys image)
> on 3.8.12beta4U.app VM. What happens is that if you record your voice
> with a SoundRecorderMorph or EventRecorderMorph (with the voiceControl
> enabled) and play the recorded sound back, you get incorrect sound.
>
> Here is what Scott described:
>
> --------------------------------------
> (a) The sound-in-event-recorder bug *does* occur [in 3.9 7067].
> But it's slightly
> different: although the speed of playback is nearly doubled, as in
> OLPC, the *pitch* does not change. So it is not a Donald Duck sound.
>
> (b) Also, the same bug now (i.e. in 3.9) also occurs in the vanilla
> SoundRecorderMorph! (In the OLPC/Mac image, the vanilla
> SoundRecorderMorph produces good playback on the Mac -- it's only the
> use of sound within an EventRecorderMorph that's problematical. In
> the 3.9/Mac image *every* SoundRecorderMorph use has this problem.
> But again, the overly-fast playback occurs *without* a pitch rise.)
>
> So evidently 3.9 went "final" with the SoundRecorder completely
> broken on the Mac.
> --------------------------------------
> From: dominiqued at versateladsl.be
> Subject: Re: SoundRecorder
> Date: November 26, 2006 3:46:21 AM PST (CA)
> To: squeak-dev at lists.squeakfoundation.org
> Reply-To: squeak-dev at lists.squeakfoundation.org
>
> I think I have found the culprit.
>
> If you listen carefully to the recorded sound, you will notice that
> frames are dropped at regular intervals. Since this pattern is
> quite obvious and the VM doesn't seem to screw the sound data, it
> should be something happening at the image level.
>
> Looking for a clue in a 3.9 alpha version, I found a change made by
> "dgd" on April 4, 2006:
>
> "workaround for OSS emulation on top
> on ALSA (on Linux environments)"
> (Delay forMilliseconds: 20) wait.
>
> If the last line is commented out, the sound recorder just works as
> expected. The same code is present in the OLPC and Squeakland
> images and both work pretty well without this delay.
>
> CoreAudio records the audio input in real time but SoundRecorder
> picks the data once in a while. The end result is that the sound
> data is stored in a different time frame that the sampling rate and
> the sound plays faster.
>
> Now I am not sure what can be done to have a cross-platform
> solution, but as far I have seen the problem is not on the Mac VM
> side.
>
--
========================================================================
===
John M. McIntosh <johnmci at smalltalkconsulting.com>
Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com
========================================================================
===
More information about the Squeak-dev
mailing list
|