← Back to team overview

scratch team mailing list archive

Fwd: Re: miry approved by amos-scratch

 

Here's a response from John Maloney, the lead programmer of Scratch, regarding the issues with sound playback using the pulse vm plugin that we've been discussing.

It sounds like the issue we're seeing doesn't have to do with the Squeak primitives, and is more likely due to problems with the Squeak-vm pulse plugin. So in order to make Miry's package the "official" one, we'd have to sort out a good way to solve this - perhaps by having Scratch copy its own pulse plugin binary into the Squeak plugins directory?


 On 03/30/2011 04:56 PM, John Maloney wrote:
 Hi, Amos.

 Re:
 Install goes very smoothly! However, sound playback and recording show the same errors we had been seeing over the past few years when using OSS / or ALSA on Ubuntu. I also tried using the pulse plugin, and it gives me a segmentation fault when playing a sound:

 Executing: /usr/lib/squeak/4.0.3-2202/squeakvm -encoding UTF-8 -vm-display-x11 -xshm -plugins /usr/lib/scratch/Plugins/:/usr/lib/squeak/4.0.3-2202/ -vm-sound-pulse /usr/share/scratch/Scratch.image

 Segmentation fault

 10280100 [] in SoundPlayer class>playLoop
 10268900 Semaphore>critical:
 10268808 SoundPlayer class>playLoop
 10279796 [] in SoundPlayer class>startPlayerProcessBufferSize:rate:stereo:
 10279888 [] in BlockContext>newProcess
 Aborted

 I'm not sure if this is because of the issues that John has mentioned earlier (current version of Scratch.image depends on old Squeak sound primitives), or a different issue with the pulse plugin code. I recall that we'd had some trouble with the version of the pulse plugin that was included with Squeak, and instead had been including a binary that Derek O'Connell had given us some time ago.
 I don't think this is the primitive issue; I think it's the same old pulse plugin issue that we've seen before. Try Derek's plugin.

 Re:
 Another question to anyone out there (I apologize in advance for my noobishness when it comes to packaging). If we incorporate Miriam's changes into the official scratch package, will it be possible to create a single binary install package for 32 and 64 bit systems that includes the separate scratch-plugins package?  I suspect many end users don't know how to add a repository or resolve dependencies. So I wonder if there is some method of creating a single one-size-fits-all package  for us to put on our download page (trusting that the package manager will manage to find the Squeak-vm, since that's already available in the repositories).
 I'm far more noobish than you when it comes to this stuff. My personal inclination would be to just distribute the Linux version as a gzip file that has everything in one, self-contained folder, but I know that idea horrifies Linux folks. :-)

 Re:
 Yes, I have Pulse. It works fine but I'm on a 32 bit distro. I plan on trying 64 bit sometime and just wondered if ALSA works since it had problems in the past. The various combo's of audio API's (eg, ALSA on top of PA) sometimes makes it difficult to keep track of problems and if they have been solved :-) Thanks for the info.
 In the pre-Pulse days, ALSA was rock solid. However, the Squeak ALSA sound plugin on top of Pulse does not work. Pulse does not actually emulate the entire ALSA API, and Squeak uses the part that's not emulated (asynchronous calls). Derek knows the most about this issue. My impression (which could be wrong) is that on Pulse-based Linux systems you really must to use Derek's PulseAudio sound plugin with Squeak or Very Bad Things happen (such as seg faults). This isn't a Scratch issue; it's true of Squeak sound in general.

 	-- John