aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTaylor Holberton <taylorcholberton@gmail.com>2016-12-01 20:25:41 -0800
committerTaylor Holberton <taylorcholberton@gmail.com>2016-12-01 20:25:41 -0800
commitf9834eef249ff55ddb084b64a553ec4912d3709d (patch)
tree139d6dd9ea265507883f7a4cb4244515a8c5735b /include
parent77979a8855015803c80a3bc99712ed9b72f96020 (diff)
Added pcm_readi and pcm_writei functions
Added these functions to replace pcm_read and pcm_write, which don't return the number of frames actually transferred. On GCC-like compilers, pcm_read and pcm_write have been marked as deprecated On doxygen documentation, they have been marked as deprecated as well.
Diffstat (limited to 'include')
-rw-r--r--include/tinyalsa/pcm.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/tinyalsa/pcm.h b/include/tinyalsa/pcm.h
index 41d3fb4..f24dedb 100644
--- a/include/tinyalsa/pcm.h
+++ b/include/tinyalsa/pcm.h
@@ -262,10 +262,24 @@ int pcm_get_htimestamp(struct pcm *pcm, unsigned int *avail, struct timespec *ts
unsigned int pcm_get_subdevice(const struct pcm *pcm);
+int pcm_writei(struct pcm *pcm, const void *data, unsigned int count);
+
+int pcm_readi(struct pcm *pcm, void *data, unsigned int count);
+
+#ifdef __GNUC__
+
+int pcm_write(struct pcm *pcm, const void *data, unsigned int count) __attribute((deprecated));
+
+int pcm_read(struct pcm *pcm, void *data, unsigned int count) __attribute((deprecated));
+
+#else
+
int pcm_write(struct pcm *pcm, const void *data, unsigned int count);
int pcm_read(struct pcm *pcm, void *data, unsigned int count);
+#endif
+
int pcm_mmap_write(struct pcm *pcm, const void *data, unsigned int count);
int pcm_mmap_read(struct pcm *pcm, void *data, unsigned int count);