aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/tinyalsa/pcm.h2
-rw-r--r--include/tinyalsa/plugin.h5
2 files changed, 6 insertions, 1 deletions
diff --git a/include/tinyalsa/pcm.h b/include/tinyalsa/pcm.h
index 9fca92d..35318a5 100644
--- a/include/tinyalsa/pcm.h
+++ b/include/tinyalsa/pcm.h
@@ -361,6 +361,8 @@ int pcm_prepare(struct pcm *pcm);
int pcm_start(struct pcm *pcm);
+int pcm_drain(struct pcm *pcm);
+
int pcm_stop(struct pcm *pcm);
int pcm_wait(struct pcm *pcm, int timeout);
diff --git a/include/tinyalsa/plugin.h b/include/tinyalsa/plugin.h
index b2f97b9..055734c 100644
--- a/include/tinyalsa/plugin.h
+++ b/include/tinyalsa/plugin.h
@@ -124,7 +124,10 @@ struct pcm_plugin_ops {
int (*prepare) (struct pcm_plugin *plugin);
/** Start data transfer from/to the plugin */
int (*start) (struct pcm_plugin *plugin);
- /** Drop pcm frames */
+ /** Signal the plugin to drain PCM */
+ int (*drain) (struct pcm_plugin *plugin);
+ /** Stop a PCM dropping pending frames if drain() is NOT called.
+ * Stop a PCM preserving pending frames if drain() is called. */
int (*drop) (struct pcm_plugin *plugin);
/** Any custom or alsa specific ioctl implementation */
int (*ioctl) (struct pcm_plugin *plugin,