From: Abramo Bagnara <abramo.bagnara@libero.it>
To: Jaroslaw Sobierski <fycio@gucio.com>
Cc: Jaroslav Kysela <perex@suse.cz>,
"alsa-devel@lists.sourceforge.net"
<alsa-devel@lists.sourceforge.net>
Subject: Re: Re: dmix plugin
Date: Wed, 19 Feb 2003 21:39:18 +0100 [thread overview]
Message-ID: <3E53EB76.BAA58E7F@libero.it> (raw)
In-Reply-To: 1045669502.3e53a67e46b60@webmail.namezero.com
Jaroslaw Sobierski wrote:
>
> Quoting Abramo Bagnara <abramo.bagnara@libero.it>:
> >
> > The results are amazing and I'd say Jaroslav has done some mistakes in
> > his handmade asm.
> >
>
> This may be true, but I think you're trying to be a little too quick yourself.
No doubts about that, I was in a hurry.
> Did you *test* your code? I only had time to take a short glance at it, but
> too me it seems that this is not the correct check for overflow on signed
> numbers:
>
> > if (unlikely(sample & 0xffff0000))
> > s = sample > 0 ? 0x7fff : -0x8000;
> > else
> > s = sample;
>
> I noticed it because this is the first thought I had, but it only works
> for unsgined. Notice that -1 will be 0xffffffff in a 32 bit sample. So
> your code will "saturate" all negative samples to -8000 effectively
> killing half of the wave, the way a diode does. I'm pretty sure this
> would not sound good ;-). Still, even if you change this to two normal
> ifs I assume the speed will not be affected by an order of magnitude.
>
> Secondly, the test code is hardly a good representation of our "working"
> environment because we're expecting multiple processes to write
> concurrently to the buffer. I think you sholud have a "verification"
> procedure which carefully mixes the waves one by one and then the
> n test mixes should be run in m processes concurrently. And the result
> compared to the "verification" table.
This is best tested with an SMP machine and I've not an easy access to
it.
That's apart you're perfectly right and this was exactly my intentions.
--
Abramo Bagnara mailto:abramo.bagnara@libero.it
Opera Unica Phone: +39.546.656023
Via Emilia Interna, 140
48014 Castel Bolognese (RA) - Italy
-------------------------------------------------------
This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
The most comprehensive and flexible code editor you can use.
Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
www.slickedit.com/sourceforge
next prev parent reply other threads:[~2003-02-19 20:39 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-17 15:32 Re: dmix plugin Jaroslaw Sobierski
2003-02-17 19:45 ` Jaroslav Kysela
2003-02-17 20:44 ` tomasz motylewski
2003-02-17 20:59 ` Jaroslav Kysela
2003-02-18 10:00 ` Abramo Bagnara
2003-02-18 12:52 ` Jaroslav Kysela
2003-02-18 13:10 ` Jaroslaw Sobierski
2003-02-18 13:19 ` Jaroslav Kysela
2003-02-18 14:51 ` Paul Davis
2003-02-18 16:51 ` Jaroslav Kysela
2003-02-18 21:07 ` Jaroslav Kysela
2003-02-19 10:20 ` Abramo Bagnara
2003-02-19 11:01 ` Jaroslav Kysela
2003-02-19 11:17 ` Abramo Bagnara
2003-02-19 13:49 ` Abramo Bagnara
2003-02-19 15:45 ` Jaroslaw Sobierski
2003-02-19 20:39 ` Abramo Bagnara [this message]
2003-02-19 18:34 ` Jaroslav Kysela
2003-02-19 21:24 ` Jaroslav Kysela
2003-02-20 8:28 ` Abramo Bagnara
2003-02-20 8:30 ` Jaroslaw Sobierski
2003-02-20 8:48 ` Abramo Bagnara
2003-02-20 9:17 ` Echoaudio drivers Giuliano Pochini
2003-02-20 14:37 ` David Olofson
2003-02-20 15:40 ` Giuliano Pochini
2003-02-20 16:03 ` David Olofson
2003-02-20 8:53 ` Re: dmix plugin Abramo Bagnara
2003-02-20 16:49 ` Jaroslav Kysela
2003-02-20 17:57 ` Abramo Bagnara
2003-02-20 18:26 ` Paul Davis
2003-02-20 19:23 ` unterminated conditionals: @HAVE_JACK_TRUE@ tomasz motylewski
2003-02-20 19:57 ` Jaroslav Kysela
2003-02-20 20:30 ` tomasz motylewski
2003-02-20 22:14 ` Re: dmix plugin Abramo Bagnara
2003-02-20 19:55 ` Jaroslav Kysela
2003-02-20 21:19 ` tomasz motylewski
2003-02-20 21:27 ` Jaroslav Kysela
2003-02-21 10:25 ` Abramo Bagnara
2003-02-21 14:08 ` Jaroslaw Sobierski
2003-02-19 10:33 ` Jaroslaw Sobierski
2003-02-19 11:08 ` Jaroslav Kysela
-- strict thread matches above, loose matches on Subject: below --
2003-02-17 22:28 Jaroslaw Sobierski
2003-02-17 16:18 Jaroslaw Sobierski
2003-02-17 13:12 Jaroslaw Sobierski
2003-02-17 13:22 ` Jaroslav Kysela
2003-02-17 18:15 ` Paul Davis
2003-02-18 22:36 ` Abramo Bagnara
2003-02-17 13:24 ` Jaroslav Kysela
2003-02-17 11:18 Jaroslaw Sobierski
2003-02-17 11:53 ` Jaroslav Kysela
2003-02-17 10:04 Jaroslaw Sobierski
2003-02-17 10:15 ` Jaroslav Kysela
2003-02-17 12:15 ` Abramo Bagnara
2003-02-17 13:12 ` Jaroslav Kysela
2003-02-17 13:29 ` Abramo Bagnara
2003-02-17 15:00 ` Jaroslav Kysela
2003-02-17 15:21 ` Abramo Bagnara
2003-02-17 10:32 ` tomasz motylewski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3E53EB76.BAA58E7F@libero.it \
--to=abramo.bagnara@libero.it \
--cc=alsa-devel@lists.sourceforge.net \
--cc=fycio@gucio.com \
--cc=perex@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.