Apologies if this should have been a part of #360. Running e.g. The VM said
Running with -vm-sound-pulse gave no errors but I still got no sound. OS -
Cuis5.0-4112-32.image — |
The VM is trying to drive sound through a broken ALSA driver. Can you try these options: In each of these sessions, you can do "Beeper beep" to test sound. — |
In reply to this post by David T Lewis
@kksubbu Sorry, I think that was some sound issue on this particular system. It works with -vm-sound-pulse on both this system (needed to restart PA, for some reason) and another Debian Testing system. On a related note...does the VM try to detect which sound backend it should be using? It seems to use OSS by default, which doesn't seem to be a good choice for modern Linux systems — |
In reply to this post by David T Lewis
"does the VM try to detect which sound backend it should be using?" not as far as I'm aware. Having such a system would be great. Look at platforms/unix/vm/sqUnixMain.c and the soundModule there-in. — |
In reply to this post by David T Lewis
You might find you have to add a function to struct Sound, such as isModulePreferred or some such to allow sqUnixMain to query the available sound modules so that they do the determination, not sqUnixMain. — |
> On 2020-04-23, at 2:29 PM, Eliot Miranda <[hidden email]> wrote: > > > You might find you have to add a function to struct Sound, such as isModulePreferred or some such to allow sqUnixMain to query the available sound modules so that they do the determination, not sqUnixMain. Perhaps even better, move that stuff out of the core vm code entirely and into the platform specific sound plugin code. If you don't load the plugin (because webserver, or otherwise not needing to make noises) you shouldn't even run this code. And clearly in the image, if no noise is made no plugin should be loaded to make noises. The only bit that should be in the core vm code is to record any preference about the sound set by the command line; the plugin code should query that and do the right thing. tim -- tim Rowledge; [hidden email]; http://www.rowledge.org/tim User: A harmless drudge. |
In reply to this post by David T Lewis
On 24/04/20 12:02 AM, contrapunctus-1 wrote: > On a related note...does the VM try to detect which sound backend it > should be using? It seems to use OSS by default, which doesn't seem to > be a good choice for modern Linux systems 🤔 It is difficult for the (Linux) VM to guess the sound module to be used on startup because preferred audio servers differ across distros and is user-configurable. OSS is a common denominator emulated even by modern audio servers but is getting long in the tooth, indeed. Pulse server is widely used today but there is also the ALSA server on Linux distros like Raspbian. Squeak VM also has to accommodate systems like RPi or OLPC apart from Linux, FreeBSD or Solaris (x86) laptops. There are currently two changes being discussed. * I have proposed a patch [1] to launch script, squeak.sh, that will detect the currently active server being used and launch the VM with the right sound module. The VM code itself will not change. This is expedient and easy to test and deploy on released VMs. * Tobias and Dave Stes have proposed changing the probing order of sound modules to pulse->alsa->oss->nas->sun so that modern servers are preferred over legacy emulation. This is a good fix for upcoming releases. [1] https://github.com/squeak-smalltalk/squeak-app/pull/17 Regards .. Subbu |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Another possibility would be : configure --without-vm-sound-ALSA --without-vm-sound-Sun --without-vm-sound-OSS so in my case (on Solaris) only the pulseaudio vm-sound-pulse would be built. Then the current selection code automatically will choose "pulse". So in that case, which is also fine by me, pulse is choosen, without need to change the current order. All roads lead to Rome ... David Stes -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJeou3ZAAoJEAwpOKXMq1Mapm0H/RA1zJ+h1xSMSEGOENOMV22P Jazre+KMBpFfwVp51qHceTr55vVTuZ3SzLO5OMmldE+FSJ5EEUPIKURrLOUQncX2 opR8vOdiyN1mYtJLo6ug+d0Gv5lVQoe6tphxBSK4gdjHUezXSH75yq2uSPZWrHkF VEIX52UEFNf6eh53C/BCw2dqdWMPIUdtIVsk1q65TMjszcra3UdelrpsgSuVSs9D df+3/ih7RZHLsE0dpndeWNOXDPUbSURVj4pLKRtg9yPAOaOUGKoE1WSVOh9MlnZI ZNBo3O66Ang/1rqU8KK4EbBd4vD1VuTVrHisrrAnLSlILhr5+OnM8c4vm1ZIr9E= =+6c5 -----END PGP SIGNATURE----- -- Sent from: http://forum.world.st/Squeak-VM-f104410.html |
In reply to this post by David T Lewis
I was able to get sound to play with the following code in Cuis (with
Although it seems to lock the VM up with an hourglass cursor, so I can't do anything else. Running — |
In reply to this post by David T Lewis
Oh, — |
In reply to this post by David T Lewis
> On 23.04.2020, at 23:27, Eliot Miranda <[hidden email]> wrote: > > > "does the VM try to detect which sound backend it should be using?" not as far as I'm aware. Having such a system would be great. Look at platforms/unix/vm/sqUnixMain.c and the soundModule there-in. It tries to use the first one that loads. And this may be well OSS. (see my mail regarding default ordering). We might need a two-stage selection here. should not be too hard. Best regards -Tobias |
In reply to this post by David T Lewis
On 09/05/20 8:00 am, OisÃn wrote: > I was able to get sound to play with the following code in Cuis (with > |padsp cogspur/squeak ...|): > > |Feature require: #'Sound'. SoundPlayer boinkScale. | > > Although it seems to lock the VM up with an hourglass cursor, so I can't > do anything else. > Running |AbstractSound bachfugue play| produces no sound for me and CPU > usage seems to go to nearly 100% for a while. Does the sound work when using Squeak 5.3 image under padsp? Perhaps, sound player primitive is failing for some reason and sound is being generated in interpreted code. You could use the interrupt key while the CPU is maxed and trace the function. Regards .. Subbu |
In reply to this post by David T Lewis
On 09/05/20 8:00 am, OisÃn wrote: > I was able to get sound to play with the following code in Cuis (with > |padsp cogspur/squeak ...|): > > |Feature require: #'Sound'. SoundPlayer boinkScale. | > > Although it seems to lock the VM up with an hourglass cursor, so I can't > do anything else. I just cloned Cuis repo and tested it with 5.3 Linux VM (Ubuntu Linux 16.04 64b). The first send loads packages required to produce sound while displaying the cursor. If your network is slow, this may take some time. > Running |AbstractSound bachfugue play| produces no sound for me and CPU > usage seems to go to nearly 100% for a while. Beeper beep "worked fine for me" SoundPlayer boinkScale "also played fine" PluckedSound bachFugue play "a bit loud and drove others nuts :-)" SoundPlayer stopPlayerProcess. "had to stop sound to restore peace" HTH .. Subbu |
Free forum by Nabble | Edit this page |