public inbox for alsa-devel@alsa-project.org
 help / color / mirror / Atom feed
From: Pavel Hofman <pavel.hofman@ivitera.com>
To: alsa-devel <alsa-devel@alsa-project.org>
Subject: alsa-lib rate plugins - float samples
Date: Mon, 20 Jun 2011 09:35:12 +0200	[thread overview]
Message-ID: <4DFEF830.6040400@ivitera.com> (raw)

Hi,

This is probably a question for Jaroslav Kysela. The better-quality rate
plugins offer float resolution, but currently we are deliberately
loosing information by down-converting to s16 in plugin_rate API
(convert_s16). In rate_samplerate.c, the samples are up-converted to
float before calling the libsamplerate API. Speex offers float API too,
while we are using the int16 one.

There are two ways to handle this:

A. Implementing the generic "convert" API function for these plugins,
handling the sample - float conversion in each plugin individually.

B. Extending the pcm_rate API (pcm_rate.h) with a new optional function
convert_float.

Since the conversion from general sample format to float is not trivial
(using the plugin_ops.h operations), I would be inclined to suggest the
extension (well I have it hacked already :-) ). On the other hand, the
conversion routine can be located in some common code shared by all the
plugins involved and we could keep the existing API, using the generic
convert function.


Thanks a lot for suggestions.

Best regards,

Pavel.

             reply	other threads:[~2011-06-20  7:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-20  7:35 Pavel Hofman [this message]
2011-06-28  7:11 ` alsa-lib rate plugins - float samples - patches Pavel Hofman
2011-06-30 12:48   ` Takashi Iwai
2011-07-01  9:27     ` Pavel Hofman
2011-07-01  9:35       ` Takashi Iwai
2011-07-01  9:50         ` Pavel Hofman

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=4DFEF830.6040400@ivitera.com \
    --to=pavel.hofman@ivitera.com \
    --cc=alsa-devel@alsa-project.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox