[Cuis-dev] Libpulse dependency - why does a programming language require a certain audio interface?

Phil B pbpublist at gmail.com
Sat May 28 19:14:01 PDT 2022


You can also use --vm-sound-null to disable sound which is handy when
running on a server or if you otherwise don't want/care about sound. (i.e.
the image shouldn't complain, it just won't play any audio)  If you decide
to use a sound interface, you can test it out in a workspace with:

Feature require: 'Sound'.
SampledSound beep.

(Notice that you are telling the image *nothing* about the specifics of the
underlying hardware/API to use... that's all handled by the VM)

Squeak derivatives aren't going to directly map to any other programming
environment you are likely to have used.  The closest is probably a modern
web browser... sort of, from an API/device management standpoint.  The
image runs via a high-level VM (i.e. higher level than say VMware or
qemu/kvm) that provides interfaces for abstract (from an image point of
view) services like a framebuffer, audio devices and network interfaces.
These interfaces can map via the VM to kernel devices, high level APIs
(i.e. pulse), nothing at all or anything else as appropriate.  What this
gets you is an image that for the most part doesn't care that you use ALSA,
someone else uses Pulse, someone else runs on a server with no audio.  It
also doesn't care if you're on a Mac, someone else is on Linux and yet
someone else is on Windows... the same image should work across all
of these operating systems and interfaces with no code changes required.
So that's the reason for several of the VM command line flags: you're
telling the VM how to hook in to the services provided on your specific
machine so that the image doesn't have to worry about it.

Thanks,
Phil

On Sat, May 28, 2022 at 1:50 PM tuxic via Cuis-dev <cuis-dev at lists.cuis.st>
wrote:

>
> Hi Vanessa,
>
> only for others, who may read this thread for the same reason and not
> to correct you :
> :)
>
> The option to the squeak vm, Cuis (in opposite to Cuis University, which
> does not show this problem) is
>
> -vm-sound-ALSA
>
> Therefore starting Cuis must be:
>
> sqcogspur64linuxht/squeak -vm-sound-ALSA
> Cuis-Smalltalk-Dev/Cuis6.0-5171.image
>
> (may be the version/name of the image may be different).
>
> I tried the same with Squeak Smalltalk.
> That VM even insit on pulseaudio when called with the option "-h" for
> help, print nothing but the well known dependency error and aborts.
> That's not funny....
>
> Is there any very short and understandable example (for a newbie like me),
> which
> I can use to check, whether ALSA is in fact used and well ?
> A 440 Hz sound would be enough ;)
>
> Cheers!
> Meino
>
>
>
>
> On 05/28 10:20, Vanessa Freudenberg via Cuis-dev wrote:
> > To answer the question in your title: Smalltalk is not "just a
> programming
> > language," it's an authoring environment that happens to include a
> specific
> > programming language. But the language is secondary, it's simply part of
> > the user interface for the actual system, along with other tools. This
> does
> > indeed set it apart from most other systems that are purely languages.
> >
> > That system runs on a virtual machine, the Open Smalltalk VM, which on
> your
> > system appears to be configured to use pulse audio by default. The VM is
> > plugin based and can be configured to use alsa instead. I think the
> command
> > line switch is -vm-sound-alsa but I don't have a linux machine in front
> of
> > me right now, YMMV.
> >
> > Vanessa
> >
> > On Thu, May 26, 2022 at 3:56 AM tuxic via Cuis-dev <
> cuis-dev at lists.cuis.st>
> > wrote:
> >
> > > Hi,
> > >
> > > I followed the steps given by Nicoa Mingotty here:
> > > https://invidio.xamh.de/watch?v=ydrqIxAf2II
> > >
> > > and when starting Cuis Smalltalk I get this error message:
> > >
> > > sqcogspur64linuxht/squeak Cuis-Smalltalk-Dev/Cuis6.0-5171.image
> > > vm-sound-pulse tryLoading
> > > sqcogspur64linuxht/lib/squeak/5.0-202205110711-64bit/vm-sound-pulse.so:
> > > dlopen: libpulse-simple.so.0: cannot open shared object file: No such
> > > file or directory vm-sound-pulse tryLoading
> > >
> > >
> /home/mccramer/CUIS/sqcogspur64linuxht/lib/squeak/5.0-202205110711-64bit/vm-sound-pulse.so:
> > > dlopen: libpulse-simple.so.0: cannot open shared object file: No such
> file
> > > or directory
> > >
> > > I am using alsa as the audio interface of choice.
> > > How can I make Cuis Smalltalk to use this interface instead of
> > > pulseaudio?
> > >
> > > Cheers!
> > > Tuxic
> > >
> > >
> > > --
> > > Cuis-dev mailing list
> > > Cuis-dev at lists.cuis.st
> > > https://lists.cuis.st/mailman/listinfo/cuis-dev
> > >
>
> > --
> > Cuis-dev mailing list
> > Cuis-dev at lists.cuis.st
> > https://lists.cuis.st/mailman/listinfo/cuis-dev
>
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20220528/f8d6ee67/attachment.htm>


More information about the Cuis-dev mailing list