Ticket Hash: | 3614f028850dd259ade71e79a01328331d369a63 | |||
Title: | Snack package seems broken | |||
Status: | Closed | Type: | Code_Defect | |
Severity: | Minor | Priority: | Low | |
Subsystem: | Resolution: | Open | ||
Last Modified: | 2023-06-18 09:39:53 | |||
Version Found In: | 2.2 | |||
User Comments: | ||||
anonymous added on 2019-02-23 19:52:23:
(text/x-fossil-plain)
To replicate one problem (with vanillawish), on an AMD64 Linux, or the Raspberry Pi 3 with a USB sound card: $ vanillawish % package require snack 2.2 % sound s s % s record ; # record a few seconds of sound % s stop % s length 88530 % s play -blocking 1 (hangs) Not using '-blocking 1' allows playing the sound, ... some times. To make it play it almost every time one has to re-issue stop and play commands: % s play ; # wait for the sound to play % s play ; # ... ? no more ? % s play ; # ... nothing % s stop % s stop % s play ; # (most times) plays the sound Another problem with vanillatclsh on the AMD: $ vanillatclsh % package require sound 2.2 % sound s s % s record ; # record some seconds of sound % s stop % s length 0 ;# <--- no sound recorded. % s play ; # nothing Turning on the event loop with: % after 100 {vwait ::forever} doesn't seem to make a difference. There are other problems with the sound not fully playing _all the times_, although it exists in full in the buffer. I've downloaded ActiveState's complete TCL release, where they include a binary (no source code) of snack, and I have not been able to replicate the above problems so far. It seems difficult to be sure, because the problems do not occur all the time. I have not found what source code ActiveState has used to compile snack, to make a comparison. dzach chw added on 2019-10-11 18:53:49: (text/x-fossil-plain) I'm closing this ticket for now. Should you have new info, let's re-open it again then. dzach added on 2023-06-17 18:35:31: (text/html) Hi Chris<br> After about 4 years, I found a version of snack 2.2.11 that appears to run without problems or need for a hack.<br> It needs a patched <code>jkAudIO_alsa.c</code> that comes in a zip file submitted by PaulObermeier to scottypitcher's repository, here: <a href='https://github.com/scottypitcher/tcl-snack/issues/2'>jkAudIO_alsa.c</a><br> Together with <code>sudo apt install alsa-utils libasound2-dev</code> which may be necessary, and <code>./configure --enable-alsa</code>, <br> I now have a snack that works on Kubuntu 22.04 and the Raspbery Pi.<br> chw added on 2023-06-17 19:15:44: (text/x-fossil-plain) Comparing the patched file from your comment against the one contained in this repo does not show any technical difference. Chances are that I've added it already many months ago. dzach added on 2023-06-18 08:43:47: (text/html) Well, either using <code>CONST84 char *</code> instead of <code>const char *</code> makes a difference with pre 8.6 code [*],<br> or there is something else that fixes things when I compile a patched Snack independently, <br> outside the undroidwish tree on my machines. Could it be SDL related?<br> <br> [*] I found this comment by AK buried deep in the TCL wiki:<br> <a href='https://wiki.tcl-lang.org/revision/Migration+to+8.4%3A+CONSTification?V=4&T=1'>adapting C source code to deal with the CONST-ified interfaces of Tcl/Tk 8.4</a> chw added on 2023-06-18 09:39:53: (text/x-fossil-plain) The const'ness is related to traces for e.g. volume control and not related to the signal path. Thus, I bet it's something else. |