aboutsummaryrefslogtreecommitdiffstats
path: root/src/output
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-25 13:13:24 +0100
committerMax Kellermann <max@duempel.org>2009-01-25 13:13:24 +0100
commit7cc15ffc08dae8d46460ad4b47657fef12bd534b (patch)
tree4e65fb692f3c6d0ba40582c447e18cc7d6c43277 /src/output
parentfb3e43ed733e7b012e031e315d596299a9e8d197 (diff)
downloadmpd-7cc15ffc08dae8d46460ad4b47657fef12bd534b.tar.gz
mpd-7cc15ffc08dae8d46460ad4b47657fef12bd534b.tar.xz
mpd-7cc15ffc08dae8d46460ad4b47657fef12bd534b.zip
alsa: added comments
Document alsa_data members.
Diffstat (limited to 'src/output')
-rw-r--r--src/output/alsa_plugin.c24
1 files changed, 21 insertions, 3 deletions
diff --git a/src/output/alsa_plugin.c b/src/output/alsa_plugin.c
index 114355ba8..3ad502ba2 100644
--- a/src/output/alsa_plugin.c
+++ b/src/output/alsa_plugin.c
@@ -41,18 +41,36 @@ typedef snd_pcm_sframes_t alsa_writei_t(snd_pcm_t * pcm, const void *buffer,
snd_pcm_uframes_t size);
struct alsa_data {
+ /** the configured name of the ALSA device; NULL for the
+ default device */
char *device;
+ /** use memory mapped I/O? */
+ bool use_mmap;
+
+ /** libasound's buffer_time setting (in microseconds) */
+ unsigned int buffer_time;
+
+ /** libasound's period_time setting (in microseconds) */
+ unsigned int period_time;
+
/** the mode flags passed to snd_pcm_open */
int mode;
+ /** the libasound PCM device handle */
snd_pcm_t *pcm;
+
+ /**
+ * a pointer to the libasound writei() function, which is
+ * snd_pcm_writei() or snd_pcm_mmap_writei(), depending on the
+ * use_mmap configuration
+ */
alsa_writei_t *writei;
- unsigned int buffer_time;
- unsigned int period_time;
+
+ /** the size of one audio frame */
size_t frame_size;
- bool use_mmap;
+ /** the mixer object associated with this output */
struct mixer mixer;
};