Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

TCL(Tool Command Language) Scripting

Snack [s play -blocking 1] bug ?


Hi,

I know Snack bug reports should primarily be addressed to Kare
directly. However I'd like to be sure this is reproducible on other
soundcards than the ones I've had access to. (And I'm hoping Kare
still reads c.l.t ;-)

Problem:  [s play -blocking 1] , even on a small, in-memory sound a
8kHz A-law, seems to consume much CPU, and the playback is scratchy.
While in [-blocking 0] everything is fine, with  no outrageous CPU
consumption and crystal-clear playback.This happens on both Linux
(Fedora 1) and Windows (XPSP2).

Anybody observing the same thing ?

-Alex

PS: details:

Looking at strace on Linux, it looks like a busy loop feeding the /dev/
dsp with very small chunks (never blocking, see -T output at end of
line)

 1179140132.417430 gettimeofday({1179140132, 417456}, {4294967176, 0})
= 0 <0.000013>
 1179140132.417529 ioctl(5, SNDCTL_DSP_GETOSPACE, 0xbfee2b70) = 0
<0.000017>
 1179140132.417626 write(5, "\217\377\25\377\221\376", 6) = 6
<0.000016>

Trace in the correct, -blocking 0 case: see the blocking select():

 1179140432.891013 select(4, [0 3], [], [], {0, 29779}) = 0 (Timeout)
<0.028746>
 1179140432.920172 gettimeofday({1179140432, 920213}, {4294967176, 0})
= 0 <0.000016>
 1179140432.920567 gettimeofday({1179140432, 920668}, {4294967176, 0})
= 0 <0.000026>
 1179140432.920874 select(4, [0 3], [], [], {0, 59}) = 0 (Timeout)
<0.008890>
 1179140432.930167 gettimeofday({1179140432, 930198}, {4294967176, 0})
= 0 <0.000112>
 1179140432.930606 gettimeofday({1179140432, 930702}, {4294967176, 0})
= 0 <0.000083>
 1179140432.930900 gettimeofday({1179140432, 930924}, {4294967176, 0})
= 0 <0.000015>
 1179140432.930988 ioctl(5, SNDCTL_DSP_GETOSPACE, 0xbfee2f10) = 0
<0.000021>
 1179140432.931084 write(5, "\303\1$\1\357\0\261\0\f
\0\312\377\27\377\233\376\374\376"..., 648) = 648 <0.000018>

* Alexandre Ferrieux <alexandre.ferri@gmail.com>
| Problem: [s play -blocking 1] , even on a small, in-memory sound a
| 8kHz A-law, seems to consume much CPU, and the playback is scratchy.
--<snip-snip>--
| Anybody observing the same thing ?

Yes, me 2 last year.  But since I rarely have any use for blocking
play, I didn't bother to report a bug back then :-/

R'

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc