From: Takashi Iwai <tiwai@suse.de>
To: Jaroslav Kysela <perex@suse.cz>
Cc: James Courtier-Dutton <James@superbug.co.uk>,
Clemens Ladisch <clemens@ladisch.de>,
alsa-devel <alsa-devel@lists.sourceforge.net>
Subject: Re: A suggestion for better resamplers in alsa.
Date: Thu, 07 Apr 2005 10:32:06 +0200 [thread overview]
Message-ID: <s5hr7hnj8c9.wl@alsa2.suse.de> (raw)
In-Reply-To: <Pine.LNX.4.58.0504070946140.1763@pnote.perex-int.cz>
At Thu, 7 Apr 2005 09:56:48 +0200 (CEST),
Jaroslav wrote:
>
> On Tue, 5 Apr 2005, James Courtier-Dutton wrote:
>
> > I have yet another possible idea. What about reporting to the
> > application whether resampling needs to be done at the rate requested by
> > the application, together with reporting the resulting hardware rate.
> > The application could then detect when it should maybe try resampling
> > itself to improve quality. We could then have resampling helper
> > functions to alsa-lib, that the application could call to do the actual
> > resampling before it send the samples to the card. In this way the
> > application will get visibility of the fixed hardware period size, and
> > make more educated descisions regarding which output rate to use.
> > This could probably be supported by the addition of a new function call
> > "snd_pcm_prevent_resampling(...)". This call would be called by the
> > application just before it calls snd_pcm_set_rate(), and this would
> > modify the behaviour of the snd_pcm_set_rate() function or just
> > implement a new function "snd_pcm_set_rate_no_resample()".
> >
> > We would still want alsa-lib pcm layer to do the sample format
> > conversion and all the other plugins, just not the problematic resampling.
> > alsa-lib would then provide a selection of resampling functions that the
> > application could then use before snd_pcm_writei() or any other form of
> > mmap transfer.
> >
> > For example, the application xine has a feature to force a particular
> > output sample rate, but at the moment, the user has to manually
> > configure the output sample rate if they wish it to be anything apart
> > from the sample rate of the media stream. With this new alsa function,
> > xine could be informed when to use it's own internal resamplers, and
> > when not to bother, removing the need for the user having to manually
> > configure the "force_output_sample_rate" setting. But xine would still
> > wish to send floating point samples to alsa-lib, knowing that alsa-lib
> > will convert them to 24bit or 16bit depending on the sound card.
>
> I like this idea. This setup belongs to:
>
> snd_pcm_hw_params_set_rate_noresample()
This feature would be nice especially also for the sound servers which
do resampling by themselves.
Takashi
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
next prev parent reply other threads:[~2005-04-07 8:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-01 20:58 A suggestion for better resamplers in alsa James Courtier-Dutton
2005-04-04 11:11 ` Takashi Iwai
2005-04-04 15:49 ` Clemens Ladisch
2005-04-04 16:10 ` Takashi Iwai
2005-04-05 19:58 ` James Courtier-Dutton
2005-04-07 7:56 ` Jaroslav Kysela
2005-04-07 8:32 ` Takashi Iwai [this message]
2005-04-10 9:15 ` James Courtier-Dutton
2005-04-12 12:12 ` Jaroslav Kysela
2005-04-12 12:24 ` James Courtier-Dutton
2005-04-12 12:30 ` Jaroslav Kysela
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=s5hr7hnj8c9.wl@alsa2.suse.de \
--to=tiwai@suse.de \
--cc=James@superbug.co.uk \
--cc=alsa-devel@lists.sourceforge.net \
--cc=clemens@ladisch.de \
--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.