[squeak-dev] Re: How can I listen to my app?

David T. Lewis lewis at mail.msen.com
Sat Sep 13 21:56:30 UTC 2014


On Thu, Sep 11, 2014 at 07:38:10PM -0400, David T. Lewis wrote:
> On Thu, Sep 11, 2014 at 02:47:55PM -0500, Chris Muller wrote:
> > 
> > On Thu, Sep 11, 2014 at 2:42 PM, Chris Muller <asqueaker at gmail.com> wrote:
> > > I've decided I want to get a feel for what my app is doing and at what
> > > rate by, literally, listening to it.  I want to put in some brief
> > > beeps into strategic locations.
> > >
> > > But sound is an area where I have exactly zero experience.  I want the
> > > sounds to play but with minimal impact on the running program; i.e.,
> > > I'm willing to make the beeps very short, but even a 10ms beep (would
> > > I even be able to hear that?) would slow the program down.
> > >
> > > And yet, if I tried to play them in the background, they will not be
> > > in-sync with with the real-time state of the app.  I suppose another
> > > option would be to record the events I'm interested in and their time
> > > and play them back later, but I'm more interested in the *real-time*
> > > state.
> > >
> > > Finally, how can I play any sound at all with Squeak and Cog on Linux?
> > >  When I try some of the demo sounds on FMSound, there is no sound and
> > > I see this message in the console:
> > >
> > >     sound: /dev/dsp: No such file or directory
> > >
> > > Of course, no other apps on this machine have any trouble playing
> > > sounds, so is something simply pointing in the wrong place?
> > 
> > squeak -help reports:
> > 
> > Available drivers:
> >   vm-sound-null
> >   vm-sound-ALSA
> >   vm-sound-OSS
> > 
> > But when I try:
> > 
> >    squeak -vm sound=ALSA my.image
> > 
> > and try to play a sound I get this on the console:
> > 
> >    sound_Start(default)
> >    soundStart: snd_add_pcm_handler: Function not implemented
> > 
> 
> Sound works fine on my trusty SuSE box, but not at all on my user-friendly
> but generally untrustworthy Ubuntu laptop. What kind of system are you using?

My apologies to Ubuntu, it seems that I neglected to install the sound
development libraries on my Ubuntu laptop before compiling the VM. That
done, sound works fine with the -vm-sound-pulse driver on Ubuntu.

So now I can explore the sound projects in Edgar's FunSqueak. Those voices
in the DecTalk duet sound like Cartman from South Park, gotta love it :-)


> 
> Sound systems have been changing on Linux distributions, and I suspect that
> we may be falling behind in our support for this.
>

The -vm-sound-ALSA driver fails on my Ubuntu with the "Function not implemented"
message that Chris reported, which suggests that we are in need of some work
to upgrade to the latest ALSA runtimes.

I'm using Ian's latest CMake build process. There may be some issues in the
Cog build, but I think these are related to the build process as opposed to
sound support in the VM itself.

Dave



More information about the Squeak-dev mailing list