Set the system's source mode (plugin-aware)
#include <sys/asoundlib.h> unsigned int snd_pcm_plugin_set_src_mode( snd_pcm_t *handle, unsigned int src_mode, int target );
- The handle for the PCM device, which you must have opened by calling snd_pcm_open() or snd_pcm_open_preferred() .
- The sample rate conversion mode; one of the following:
- SND_SRC_MODE_NORMAL — (default mode; all previous version of SRC work this way) SRC ratio based on input/output block size rounded towards zero. Floor(input size/output size).
- SND_SRC_MODE_ACTUAL — fixed SRC which adjusts the input fragment size dynamically to prevent roundoff error from adjusting the playback speed.
- SND_SRC_MODE_ASYNC — asynchronous SRC which adjusts the input fragment size to maintain a specified buffer fullness.
- The level in percent for the buffer fullness measurement used in the asynchronous sample rate conversion.
Use the -l asound option to qcc to link against this library.
The snd_pcm_plugin_set_src_mode() function sets the type of sample rate conversion to use. Only playback modes are supported.
The source mode (also in handle->plugin_src_mode) that the system is set to.
Make sure that you don't mix and match plugin- and nonplugin-aware functions in your application, or you may get undefined behavior and misleading results.