Get the maximum possible fragment size (plugin-aware)
#include <sys/asoundlib.h> int snd_pcm_plugin_src_max_frag ( snd_pcm_t *handle, unsigned int fragsize );
- The handle for the PCM device, which you must have opened by calling snd_pcm_open() or snd_pcm_open_preferred() .
- The fragment size.
Use the -l asound option to qcc to link against this library.
The snd_pcm_plugin_src_max_frag() function returns the maximum possible fragment size when the system is using the SND_SRC_MODE_ACTUAL or SND_SRC_MODE_ASYNC mode. The fragment size is adjusted during playback, so this lets you preallocate the maximum buffer size.
The maximum fragment size, or -EINVAL if any of the arguments were invalid.
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.