Disable PCM plugins
#include <sys/asoundlib.h> unsigned int snd_pcm_plugin_set_disable( snd_pcm_t *pcm, unsigned int mask );
If mmap plugins are used, some of the members of the snd_pcm_channel_status_t structure aren't used. |
The plugin-aware versions of the PCM read and write calls don't require that you work with multiples of fragment-size blocks (the nonplugin-aware versions do). This is because one of the plugins in the lib sub-buffers the data for you. You can disable this plugin by setting the PLUGIN_DISABLE_BUFFER_PARTIAL_BLOCKS bit with this function, in which case the plugin-aware versions also fail on reads and writes that aren't multiples of the fragment size.
Either way, interleaved stereo data has to be aligned by the sample size times the number of channels (i.e. each write must have the same number of samples for the left and right channels).
libasound.so
The snd_pcm_plugin_set_disable() function is used to disable various plugins that would ordinarily be used in the plugin chain.
The value of the plugin mask before this change was made.
See the wave.c example in the appendix.
QNX Neutrino
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |
The plugin disable mask has to be set before calling snd_pcm_plugin_params() for it to take effect.
snd_pcm_channel_status_t, snd_pcm_plugin_read(), snd_pcm_plugin_write()