May I suggest a configuration option to only resample sample rates that are not supported by the (ASIO) audio card in use? Perhaps ideally just by doubling the rate until a supported rate is found?

Cheers,Adriaan.

Sounds like something that can be done with a separate DSP filter and the resampler_entry (resampler.h) class could be useful. An ideal solution would have a configurable list of supported sample rates, then upsample to the nearest supported rate as necessary.

I wonder what are the difference and therefore ten different plugins to choose from? Regards

Sorry, didn't mention your question. They are all essentially the same. Foobar2000 prior to 0.9.6.4 didn't allow to put the same DSP plugin into its DSP chain twice, so as a workaround (and for testing purposes!) I made 10 resampler dlls.

Sounds like something that can be done with a separate DSP filter and the resampler_entry (resampler.h) class could be useful. An ideal solution would have a configurable list of supported sample rates, then upsample to the nearest supported rate as necessary.

What's the purpose of resampler_entry class?(for example, when is_conversion_supported() or get_priority() functions can be useful?)

is_conversion_supported() - some resamplers are able to convert only between certain sample rates (e.g. 44100 and 48000), so call that if you want to know before trying to instantiate it.get_priority() - to differentiate resamplers with poor quality (but fast operation, e.g. for playback) and resamplers with high quality (but maybe even sub-realtime speed, e.g. for conversion).

Thanks, but what if my component doesn't have them? I took foo_dsp_tutorial source code and used it as an example of how my component can be written. So I didn't implement anything related to resampler_entry class.

SSRC resampler has a class derived from resampler_entry but these 2 functions are never called. Are they intended for 3rd party components and not for fb2k itself?

resampler_entry service is a special interface for resampler DSPs, so that when someone wants to resample audio data (not necessarily during/for playback), he can use one of the existing resamplers easily, providing just source and destination sample rate. That's not possible with plain DSP, because the preset format is private and configuration is set in user interface.

If foobar2000 core don't seem to be calling those two methods, it doesn't matter. It just means that the interface has been made flexible, they can naturally be useful in some scenarios (see my previous post).

The simple quality selection described above provides settings that satisfy the needs of the vast majority of resampling tasks. Occasionally, however, it may be desirable to fine-tune the resampler's filter response; this can be achieved using over‐ ride options, as detailed in the following table:

All resamplers use filters that can sometimes create `echo' (a.k.a. `ringing') artefacts with transient signals such as those that occur with `finger snaps' or other highly percussive sounds. Such artefacts are much more noticeable to the human ear if they occur before the transient (`pre-echo') than if they occur after it (`post-echo'). Note that frequency of any such artefacts is related to the smaller of the original and new sam‐ pling rates but that if this is at least 44.1kHz, then the arte‐ facts will lie outside the range of human hearing.

A phase response setting may be used to control the distribution of any transient echo between `pre' and `post': with minimum phase, there is no pre-echo but the longest post-echo; with lin‐ ear phase, pre and post echo are in equal amounts (in signal terms, but not audibility terms); the intermediate phase setting attempts to find the best compromise by selecting a small length (and level) of pre-echo and a medium lengthed post-echo.

Minimum, intermediate, or linear phase response is selected using the -M, -I, or -L option; a custom phase response can be created with the -p option. Note that phase responses between `linear' and `maximum' (greater than 50) are rarely useful.

A resampler's band-width setting determines how much of the fre‐ quency content of the original signal (w.r.t. the original sam‐ ple rate when up-sampling, or the new sample rate when down-sam‐ pling) is preserved during conversion. The term `pass-band' is used to refer to all frequencies up to the band-width point (e.g. for 44.1kHz sampling rate, and a resampling band-width of 95%, the pass-band represents frequencies from 0Hz (D.C.) to circa 21kHz). Increasing the resampler's band-width results in a slower conversion and can increase transient echo artefacts (and vice versa).

The -s `steep filter' option changes resampling band-width from the default 95% (based on the 3dB point), to 99%. The -b option allows the band-width to be set to any value in the range 74-99.7 %, but note that band-width values greater than 99% are not recommended for normal use as they can cause excessive tran‐ sient echo.

If the -a option is given, then aliasing/imaging above the pass- band is allowed. For example, with 44.1kHz sampling rate, and a resampling band-width of 95%, this means that frequency content above 21kHz can be distorted; however, since this is above the pass-band (i.e. above the highest frequency of interest/audi‐ bility), this may not be a problem. The benefits of allowing aliasing/imaging are reduced processing time, and reduced (by almost half) transient echo artefacts.