summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@perex.cz>2001-11-14 11:40:46 +0000
committerJaroslav Kysela <perex@perex.cz>2001-11-14 11:40:46 +0000
commit87b5b249a503ea7eb3edffec9528717a8b028159 (patch)
tree270ff707df14a956004d17607d86ad7233cef262 /include
parent5e58abf785c5318c983d792ca86300f1f46f51a1 (diff)
pcm.h - major documentation updates and reordering
Cleanup for __cplusplus defines.
Diffstat (limited to 'include')
-rw-r--r--include/conf.h12
-rw-r--r--include/control.h23
-rw-r--r--include/error.h16
-rw-r--r--include/hwdep.h12
-rw-r--r--include/input.h14
-rw-r--r--include/instr.h36
-rw-r--r--include/mixer.h22
-rw-r--r--include/output.h12
-rw-r--r--include/pcm.h515
-rw-r--r--include/rawmidi.h12
-rw-r--r--include/seq.h13
-rw-r--r--include/seq_midi_event.h12
-rw-r--r--include/seqmid.h12
-rw-r--r--include/timer.h12
14 files changed, 402 insertions, 321 deletions
diff --git a/include/conf.h b/include/conf.h
index 465e11df..74cfe113 100644
--- a/include/conf.h
+++ b/include/conf.h
@@ -28,6 +28,10 @@
#ifndef __ALSA_CONF_H
#define __ALSA_CONF_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* \defgroup Config Configuration Interface
* Configuration Interface
@@ -56,10 +60,6 @@ typedef struct _snd_config snd_config_t;
/** Config compound iterator */
typedef struct _snd_config_iterator *snd_config_iterator_t;
-#ifdef __cplusplus
-extern "C" {
-#endif
-
int snd_config_top(snd_config_t **config);
int snd_config_load(snd_config_t *config, snd_input_t *in);
@@ -128,11 +128,11 @@ int snd_config_get_bool(snd_config_t *conf);
int snd_config_get_ctl_iface_ascii(const char *ascii);
int snd_config_get_ctl_iface(snd_config_t *conf);
+/** \} */
+
#ifdef __cplusplus
}
#endif
-/** \} */
-
#endif /* __ALSA_CONF_H */
diff --git a/include/control.h b/include/control.h
index 7e77b6cc..b13ed254 100644
--- a/include/control.h
+++ b/include/control.h
@@ -28,6 +28,10 @@
#ifndef __ALSA_CONTROL_H
#define __ALSA_CONTROL_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* \defgroup Control Control Interface
* The control interface.
@@ -182,10 +186,6 @@ typedef struct _snd_ctl snd_ctl_t;
/** SCTL type */
typedef struct _snd_sctl snd_sctl_t;
-#ifdef __cplusplus
-extern "C" {
-#endif
-
int snd_card_load(int card);
int snd_card_next(int *card);
int snd_card_get_index(const char *name);
@@ -398,10 +398,6 @@ const void * snd_ctl_elem_value_get_bytes(const snd_ctl_elem_value_t *obj);
void snd_ctl_elem_value_get_iec958(const snd_ctl_elem_value_t *obj, snd_aes_iec958_t *ptr);
void snd_ctl_elem_value_set_iec958(snd_ctl_elem_value_t *obj, const snd_aes_iec958_t *ptr);
-#ifdef __cplusplus
-}
-#endif
-
/**
* \defgroup HControl Highlevel Control Interface
* \ingroup Control
@@ -415,10 +411,6 @@ typedef struct _snd_hctl_elem snd_hctl_elem_t;
/** HCTL handle */
typedef struct _snd_hctl snd_hctl_t;
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/**
* \brief Compare function for sorting HCTL elements
* \param e1 First element
@@ -486,12 +478,13 @@ void snd_hctl_elem_set_callback(snd_hctl_elem_t *obj, snd_hctl_elem_callback_t v
void * snd_hctl_elem_get_callback_private(const snd_hctl_elem_t *obj);
void snd_hctl_elem_set_callback_private(snd_hctl_elem_t *obj, void * val);
+/** \} */
+
+/** \} */
+
#ifdef __cplusplus
}
#endif
-/** \} */
-/** \} */
-
#endif /* __ALSA_CONTROL_H */
diff --git a/include/error.h b/include/error.h
index b0efb159..a27c952a 100644
--- a/include/error.h
+++ b/include/error.h
@@ -28,6 +28,10 @@
#ifndef __ALSA_ERROR_H
#define __ALSA_ERROR_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* \defgroup Error Error handling
* Error handling
@@ -37,10 +41,6 @@
#define SND_ERROR_BEGIN 500000 /**< begin boundary of sound error codes */
#define SND_ERROR_INCOMPATIBLE_VERSION (SND_ERROR_BEGIN+0) /**< protocol is not compatible */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
const char *snd_strerror(int errnum);
/**
@@ -56,10 +56,6 @@ typedef void (snd_lib_error_handler_t)(const char *file, int line, const char *f
extern snd_lib_error_handler_t *snd_lib_error;
extern int snd_lib_error_set_handler(snd_lib_error_handler_t *handler);
-#ifdef __cplusplus
-}
-#endif
-
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 95)
#define SNDERR(...) snd_lib_error(__FILE__, __LINE__, __FUNCTION__, 0, __VA_ARGS__) /**< show sound error */
#define SYSERR(...) snd_lib_error(__FILE__, __LINE__, __FUNCTION__, errno, __VA_ARGS__) /**< show system error */
@@ -70,5 +66,9 @@ extern int snd_lib_error_set_handler(snd_lib_error_handler_t *handler);
/** \} */
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __ALSA_ERROR_H */
diff --git a/include/hwdep.h b/include/hwdep.h
index a878cc8f..54be9bc4 100644
--- a/include/hwdep.h
+++ b/include/hwdep.h
@@ -28,6 +28,10 @@
#ifndef __ALSA_HWDEP_H
#define __ALSA_HWDEP_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* \defgroup HwDep Hardware Dependant Interface
* The Hardware Dependant Interface.
@@ -74,10 +78,6 @@ typedef enum _snd_hwdep_type {
/** HwDep handle */
typedef struct _snd_hwdep snd_hwdep_t;
-#ifdef __cplusplus
-extern "C" {
-#endif
-
int snd_hwdep_open(snd_hwdep_t **hwdep, const char *name, int mode);
int snd_hwdep_close(snd_hwdep_t *hwdep);
int snd_hwdep_poll_descriptors(snd_hwdep_t *hwdep, struct pollfd *pfds, unsigned int space);
@@ -101,11 +101,11 @@ const char *snd_hwdep_info_get_name(const snd_hwdep_info_t *obj);
snd_hwdep_iface_t snd_hwdep_info_get_iface(const snd_hwdep_info_t *obj);
void snd_hwdep_info_set_device(snd_hwdep_info_t *obj, unsigned int val);
+/** \} */
+
#ifdef __cplusplus
}
#endif
-/** \} */
-
#endif /* __ALSA_HWDEP_H */
diff --git a/include/input.h b/include/input.h
index 908c205a..48d636c4 100644
--- a/include/input.h
+++ b/include/input.h
@@ -28,6 +28,10 @@
#ifndef __ALSA_INPUT_H
#define __ALSA_INPUT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* \defgroup Input Input Interface
* Input Interface
@@ -45,10 +49,6 @@ typedef enum _snd_input_type {
SND_INPUT_BUFFER,
} snd_input_type_t;
-#ifdef __cplusplus
-extern "C" {
-#endif
-
int snd_input_stdio_open(snd_input_t **inputp, const char *file, const char *mode);
int snd_input_stdio_attach(snd_input_t **inputp, FILE *fp, int _close);
int snd_input_buffer_open(snd_input_t **inputp, const char *buffer, ssize_t size);
@@ -58,11 +58,11 @@ char *snd_input_gets(snd_input_t *input, char *str, size_t size);
int snd_input_getc(snd_input_t *input);
int snd_input_ungetc(snd_input_t *input, int c);
+/** \} */
+
#ifdef __cplusplus
}
#endif
-/** \} */
-
#endif /* __ALSA_INPUT_H */
-
+ \ No newline at end of file
diff --git a/include/instr.h b/include/instr.h
index da908396..0410ec85 100644
--- a/include/instr.h
+++ b/include/instr.h
@@ -28,6 +28,10 @@
#ifndef __ALSA_INSTR_H
#define __ALSA_INSTR_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* \defgroup Instrument Instrument Interface
* The Instrument Interface.
@@ -36,10 +40,6 @@
/* instrument get/put */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/** container for sequencer instrument header */
typedef struct _snd_instr_header snd_instr_header_t;
@@ -75,10 +75,6 @@ void snd_instr_header_set_format(snd_instr_header_t *info, const char *format);
void snd_instr_header_set_alias(snd_instr_header_t *info, const snd_seq_instr_t *instr);
void snd_instr_header_set_follow_alias(snd_instr_header_t *info, int val);
-#ifdef __cplusplus
-}
-#endif
-
/**
* Instrument abstraction layer
* - based on events
@@ -136,18 +132,10 @@ void snd_instr_header_set_follow_alias(snd_instr_header_t *info, int val);
/** FM instrument data structure */
typedef void snd_instr_fm_t;
-#ifdef __cplusplus
-extern "C" {
-#endif
-
int snd_instr_fm_convert_to_stream(snd_instr_fm_t *fm, const char *name, snd_instr_header_t **put, size_t *size);
int snd_instr_fm_convert_from_stream(snd_instr_header_t *data, size_t size, snd_instr_fm_t **fm);
int snd_instr_fm_free(snd_instr_fm_t *fm);
-#ifdef __cplusplus
-}
-#endif
-
/**
* Simple Wave support
@@ -156,18 +144,10 @@ int snd_instr_fm_free(snd_instr_fm_t *fm);
/** simple instrument data structure */
typedef void snd_instr_simple_t;
-#ifdef __cplusplus
-extern "C" {
-#endif
-
int snd_instr_simple_convert_to_stream(snd_instr_simple_t *simple, const char *name, snd_instr_header_t **put, size_t *size);
int snd_instr_simple_convert_from_stream(snd_instr_header_t *data, size_t size, snd_instr_simple_t **simple);
int snd_instr_simple_free(snd_instr_simple_t *simple);
-#ifdef __cplusplus
-}
-#endif
-
/**
* InterWave FFFF support
@@ -178,10 +158,6 @@ typedef void snd_instr_iwffff_t;
/** IW FFFF handler */
typedef struct _snd_iwffff_handle snd_iwffff_handle_t;
-#ifdef __cplusplus
-extern "C" {
-#endif
-
int snd_instr_iwffff_open(snd_iwffff_handle_t **handle, const char *name_fff, const char *name_dta);
int snd_instr_iwffff_open_rom(snd_iwffff_handle_t **handle, int card, int bank, int file);
int snd_instr_iwffff_open_rom_file(snd_iwffff_handle_t **handle, const char *name, int bank, int file);
@@ -191,11 +167,11 @@ int snd_instr_iwffff_convert_to_stream(snd_instr_iwffff_t *iwffff, const char *n
int snd_instr_iwffff_convert_from_stream(snd_instr_header_t *data, size_t size, snd_instr_iwffff_t **iwffff);
int snd_instr_iwffff_free(snd_instr_iwffff_t *iwffff);
+/** \} */
+
#ifdef __cplusplus
}
#endif
-/** \} */
-
#endif /* __ALSA_INSTR_H */
diff --git a/include/mixer.h b/include/mixer.h
index 69d4dcd0..3b1aa740 100644
--- a/include/mixer.h
+++ b/include/mixer.h
@@ -28,6 +28,10 @@
#ifndef __ALSA_MIXER_H
#define __ALSA_MIXER_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* \defgroup Mixer Mixer Interface
* The mixer interface.
@@ -77,10 +81,6 @@ typedef enum _snd_mixer_elem_type {
SND_MIXER_ELEM_LAST = SND_MIXER_ELEM_SIMPLE,
} snd_mixer_elem_type_t;
-#ifdef __cplusplus
-extern "C" {
-#endif
-
int snd_mixer_open(snd_mixer_t **mixer, int mode);
int snd_mixer_close(snd_mixer_t *mixer);
snd_mixer_elem_t *snd_mixer_first_elem(snd_mixer_t *mixer);
@@ -108,10 +108,6 @@ void snd_mixer_elem_set_callback_private(snd_mixer_elem_t *obj, void * val);
snd_mixer_elem_type_t snd_mixer_elem_get_type(const snd_mixer_elem_t *obj);
-#ifdef __cplusplus
-}
-#endif
-
/**
* \defgroup SimpleMixer Simple Mixer Interface
* \ingroup Mixer
@@ -145,10 +141,6 @@ typedef enum _snd_mixer_selem_channel_id {
/** Mixer simple element identificator */
typedef struct _snd_mixer_selem_id snd_mixer_selem_id_t;
-#ifdef __cplusplus
-extern "C" {
-#endif
-
const char *snd_mixer_selem_channel_name(snd_mixer_selem_channel_id_t channel);
int snd_mixer_selem_register(snd_mixer_t *mixer, void *arg,
@@ -213,13 +205,13 @@ unsigned int snd_mixer_selem_id_get_index(const snd_mixer_selem_id_t *obj);
void snd_mixer_selem_id_set_name(snd_mixer_selem_id_t *obj, const char *val);
void snd_mixer_selem_id_set_index(snd_mixer_selem_id_t *obj, unsigned int val);
+/** \} */
+
+/** \} */
#ifdef __cplusplus
}
#endif
-/** \} */
-/** \} */
-
#endif /* __ALSA_MIXER_H */
diff --git a/include/output.h b/include/output.h
index 275589a5..cab7a9ff 100644
--- a/include/output.h
+++ b/include/output.h
@@ -28,6 +28,10 @@
#ifndef __ALSA_OUTPUT_H
#define __ALSA_OUTPUT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* \defgroup Output Output Interface
* Output Interface
@@ -45,10 +49,6 @@ typedef enum _snd_output_type {
SND_OUTPUT_BUFFER,
} snd_output_type_t;
-#ifdef __cplusplus
-extern "C" {
-#endif
-
int snd_output_stdio_open(snd_output_t **outputp, const char *file, const char *mode);
int snd_output_stdio_attach(snd_output_t **outputp, FILE *fp, int _close);
int snd_output_buffer_open(snd_output_t **outputp);
@@ -59,11 +59,11 @@ int snd_output_puts(snd_output_t *output, const char *str);
int snd_output_putc(snd_output_t *output, int c);
int snd_output_flush(snd_output_t *output);
+/** \} */
+
#ifdef __cplusplus
}
#endif
-/** \} */
-
#endif /* __ALSA_OUTPUT_H */
diff --git a/include/pcm.h b/include/pcm.h
index 4d3e27ca..526a0ca8 100644
--- a/include/pcm.h
+++ b/include/pcm.h
@@ -28,6 +28,10 @@
#ifndef __ALSA_PCM_H
#define __ALSA_PCM_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* \defgroup PCM PCM Interface
* The PCM Interface.
@@ -342,14 +346,13 @@ typedef union _snd_pcm_sync_id {
/** #SND_PCM_TYPE_METER scope handle */
typedef struct _snd_pcm_scope snd_pcm_scope_t;
-#ifdef __cplusplus
-extern "C" {
-#endif
-
int snd_pcm_open(snd_pcm_t **pcm, const char *name,
snd_pcm_stream_t stream, int mode);
int snd_pcm_close(snd_pcm_t *pcm);
+const char *snd_pcm_name(snd_pcm_t *pcm);
+snd_pcm_type_t snd_pcm_type(snd_pcm_t *pcm);
+snd_pcm_stream_t snd_pcm_stream(snd_pcm_t *pcm);
int snd_pcm_poll_descriptors_count(snd_pcm_t *pcm);
int snd_pcm_poll_descriptors(snd_pcm_t *pcm, struct pollfd *pfds, unsigned int space);
int snd_pcm_nonblock(snd_pcm_t *pcm, int nonblock);
@@ -370,26 +373,60 @@ int snd_pcm_pause(snd_pcm_t *pcm, int enable);
snd_pcm_state_t snd_pcm_state(snd_pcm_t *pcm);
int snd_pcm_delay(snd_pcm_t *pcm, snd_pcm_sframes_t *delayp);
int snd_pcm_resume(snd_pcm_t *pcm);
+snd_pcm_sframes_t snd_pcm_avail_update(snd_pcm_t *pcm);
snd_pcm_sframes_t snd_pcm_rewind(snd_pcm_t *pcm, snd_pcm_uframes_t frames);
snd_pcm_sframes_t snd_pcm_writei(snd_pcm_t *pcm, const void *buffer, snd_pcm_uframes_t size);
snd_pcm_sframes_t snd_pcm_readi(snd_pcm_t *pcm, void *buffer, snd_pcm_uframes_t size);
snd_pcm_sframes_t snd_pcm_writen(snd_pcm_t *pcm, void **bufs, snd_pcm_uframes_t size);
snd_pcm_sframes_t snd_pcm_readn(snd_pcm_t *pcm, void **bufs, snd_pcm_uframes_t size);
+int snd_pcm_wait(snd_pcm_t *pcm, int timeout);
-int snd_pcm_dump_hw_setup(snd_pcm_t *pcm, snd_output_t *out);
-int snd_pcm_dump_sw_setup(snd_pcm_t *pcm, snd_output_t *out);
-int snd_pcm_dump_setup(snd_pcm_t *pcm, snd_output_t *out);
-int snd_pcm_dump(snd_pcm_t *pcm, snd_output_t *out);
int snd_pcm_link(snd_pcm_t *pcm1, snd_pcm_t *pcm2);
int snd_pcm_unlink(snd_pcm_t *pcm);
-int snd_pcm_wait(snd_pcm_t *pcm, int timeout);
-snd_pcm_sframes_t snd_pcm_avail_update(snd_pcm_t *pcm);
-const char *snd_pcm_name(snd_pcm_t *pcm);
-snd_pcm_type_t snd_pcm_type(snd_pcm_t *pcm);
-snd_pcm_stream_t snd_pcm_stream(snd_pcm_t *pcm);
+/** \} */
+
+/**
+ * \defgroup PCM_Info Stream Information
+ * PCM Stream Information
+ * \ingroup PCM
+ * \{
+ */
+
+size_t snd_pcm_info_sizeof(void);
+/** \hideinitializer
+ * \brief allocate an invalid #snd_pcm_info_t using standard alloca
+ * \param ptr returned pointer
+ */
+#define snd_pcm_info_alloca(ptr) do { assert(ptr); *ptr = (snd_pcm_info_t *) alloca(snd_pcm_info_sizeof()); memset(*ptr, 0, snd_pcm_info_sizeof()); } while (0)
+int snd_pcm_info_malloc(snd_pcm_info_t **ptr);
+void snd_pcm_info_free(snd_pcm_info_t *obj);
+void snd_pcm_info_copy(snd_pcm_info_t *dst, const snd_pcm_info_t *src);
+unsigned int snd_pcm_info_get_device(const snd_pcm_info_t *obj);
+unsigned int snd_pcm_info_get_subdevice(const snd_pcm_info_t *obj);
+snd_pcm_stream_t snd_pcm_info_get_stream(const snd_pcm_info_t *obj);
+int snd_pcm_info_get_card(const snd_pcm_info_t *obj);
+const char *snd_pcm_info_get_id(const snd_pcm_info_t *obj);
+const char *snd_pcm_info_get_name(const snd_pcm_info_t *obj);
+const char *snd_pcm_info_get_subdevice_name(const snd_pcm_info_t *obj);
+snd_pcm_class_t snd_pcm_info_get_class(const snd_pcm_info_t *obj);
+snd_pcm_subclass_t snd_pcm_info_get_subclass(const snd_pcm_info_t *obj);
+unsigned int snd_pcm_info_get_subdevices_count(const snd_pcm_info_t *obj);
+unsigned int snd_pcm_info_get_subdevices_avail(const snd_pcm_info_t *obj);
+snd_pcm_sync_id_t snd_pcm_info_get_sync(const snd_pcm_info_t *obj);
+void snd_pcm_info_set_device(snd_pcm_info_t *obj, unsigned int val);
+void snd_pcm_info_set_subdevice(snd_pcm_info_t *obj, unsigned int val);
+void snd_pcm_info_set_stream(snd_pcm_info_t *obj, snd_pcm_stream_t val);
+
+/** \} */
+
+/**
+ * \defgroup PCM_HW_Params Hardware Parameters
+ * PCM Hardware Parameters
+ * \ingroup PCM
+ * \{
+ */
-/* HW params */
int snd_pcm_hw_params_any(snd_pcm_t *pcm, snd_pcm_hw_params_t *params);
int snd_pcm_hw_params_can_mmap_sample_resolution(const snd_pcm_hw_params_t *params);
@@ -407,7 +444,6 @@ int snd_pcm_hw_params_get_rate_numden(const snd_pcm_hw_params_t *params,
unsigned int *rate_den);
int snd_pcm_hw_params_get_sbits(const snd_pcm_hw_params_t *params);
int snd_pcm_hw_params_get_fifo_size(const snd_pcm_hw_params_t *params);
-int snd_pcm_hw_params_dump(snd_pcm_hw_params_t *params, snd_output_t *out);
#if 0
typedef struct _snd_pcm_hw_strategy snd_pcm_hw_strategy_t;
@@ -435,162 +471,6 @@ int snd_pcm_hw_params_try_explain_failure(snd_pcm_t *pcm,
#endif
-int snd_pcm_sw_params_current(snd_pcm_t *pcm, snd_pcm_sw_params_t *params);
-int snd_pcm_sw_params_dump(snd_pcm_sw_params_t *params, snd_output_t *out);
-
-int snd_pcm_status_dump(snd_pcm_status_t *status, snd_output_t *out);
-
-/* mmap */
-int snd_pcm_mmap_begin(snd_pcm_t *pcm,
- const snd_pcm_channel_area_t **areas,
- snd_pcm_uframes_t *offset,
- snd_pcm_uframes_t *frames);
-int snd_pcm_mmap_commit(snd_pcm_t *pcm, snd_pcm_uframes_t offset,
- snd_pcm_uframes_t frames);
-snd_pcm_sframes_t snd_pcm_mmap_writei(snd_pcm_t *pcm, const void *buffer, snd_pcm_uframes_t size);
-snd_pcm_sframes_t snd_pcm_mmap_readi(snd_pcm_t *pcm, void *buffer, snd_pcm_uframes_t size);
-snd_pcm_sframes_t snd_pcm_mmap_writen(snd_pcm_t *pcm, void **bufs, snd_pcm_uframes_t size);
-snd_pcm_sframes_t snd_pcm_mmap_readn(snd_pcm_t *pcm, void **bufs, snd_pcm_uframes_t size);
-
-const char *snd_pcm_stream_name(snd_pcm_stream_t stream);
-const char *snd_pcm_access_name(snd_pcm_access_t _access);
-const char *snd_pcm_format_name(snd_pcm_format_t format);
-const char *snd_pcm_format_description(snd_pcm_format_t format);
-const char *snd_pcm_subformat_name(snd_pcm_subformat_t subformat);
-const char *snd_pcm_subformat_description(snd_pcm_subformat_t subformat);
-snd_pcm_format_t snd_pcm_format_value(const char* name);
-const char *snd_pcm_tstamp_mode_name(snd_pcm_tstamp_t mode);
-const char *snd_pcm_state_name(snd_pcm_state_t state);
-
-int snd_pcm_area_silence(const snd_pcm_channel_area_t *dst_channel, snd_pcm_uframes_t dst_offset,
- unsigned int samples, snd_pcm_format_t format);
-int snd_pcm_areas_silence(const snd_pcm_channel_area_t *dst_channels, snd_pcm_uframes_t dst_offset,
- unsigned int channels, snd_pcm_uframes_t frames, snd_pcm_format_t format);
-int snd_pcm_area_copy(const snd_pcm_channel_area_t *dst_channel, snd_pcm_uframes_t dst_offset,
- const snd_pcm_channel_area_t *src_channel, snd_pcm_uframes_t src_offset,
- unsigned int samples, snd_pcm_format_t format);
-int snd_pcm_areas_copy(const snd_pcm_channel_area_t *dst_channels, snd_pcm_uframes_t dst_offset,
- const snd_pcm_channel_area_t *src_channels, snd_pcm_uframes_t src_offset,
- unsigned int channels, snd_pcm_uframes_t frames, snd_pcm_format_t format);
-
-snd_pcm_sframes_t snd_pcm_bytes_to_frames(snd_pcm_t *pcm, ssize_t bytes);
-ssize_t snd_pcm_frames_to_bytes(snd_pcm_t *pcm, snd_pcm_sframes_t frames);
-int snd_pcm_bytes_to_samples(snd_pcm_t *pcm, ssize_t bytes);
-ssize_t snd_pcm_samples_to_bytes(snd_pcm_t *pcm, int samples);
-
-/** #SND_PCM_TYPE_METER scope functions */
-typedef struct _snd_pcm_scope_ops {
- /** \brief Enable and prepare it using current params
- * \param scope scope handle
- */
- int (*enable)(snd_pcm_scope_t *scope);
- /** \brief Disable
- * \param scope scope handle
- */
- void (*disable)(snd_pcm_scope_t *scope);
- /** \brief PCM has been started
- * \param scope scope handle
- */
- void (*start)(snd_pcm_scope_t *scope);
- /** \brief PCM has been stopped
- * \param scope scope handle
- */
- void (*stop)(snd_pcm_scope_t *scope);
- /** \brief New frames are present
- * \param scope scope handle
- */
- void (*update)(snd_pcm_scope_t *scope);
- /** \brief Reset status
- * \param scope scope handle
- */
- void (*reset)(snd_pcm_scope_t *scope);
- /** \brief PCM is closing
- * \param scope scope handle
- */
- void (*close)(snd_pcm_scope_t *scope);
-} snd_pcm_scope_ops_t;
-
-snd_pcm_uframes_t snd_pcm_meter_get_bufsize(snd_pcm_t *pcm);
-unsigned int snd_pcm_meter_get_channels(snd_pcm_t *pcm);
-unsigned int snd_pcm_meter_get_rate(snd_pcm_t *pcm);
-snd_pcm_uframes_t snd_pcm_meter_get_now(snd_pcm_t *pcm);
-snd_pcm_uframes_t snd_pcm_meter_get_boundary(snd_pcm_t *pcm);
-int snd_pcm_meter_add_scope(snd_pcm_t *pcm, snd_pcm_scope_t *scope);
-snd_pcm_scope_t *snd_pcm_meter_search_scope(snd_pcm_t *pcm, const char *name);
-int snd_pcm_scope_malloc(snd_pcm_scope_t **ptr);
-void snd_pcm_scope_set_ops(snd_pcm_scope_t *scope, snd_pcm_scope_ops_t *val);
-void snd_pcm_scope_set_name(snd_pcm_scope_t *scope, const char *val);
-const char *snd_pcm_scope_get_name(snd_pcm_scope_t *scope);
-void *snd_pcm_scope_get_callback_private(snd_pcm_scope_t *scope);
-void snd_pcm_scope_set_callback_private(snd_pcm_scope_t *scope, void *val);
-int snd_pcm_scope_s16_open(snd_pcm_t *pcm, const char *name,
- snd_pcm_scope_t **scopep);
-int16_t *snd_pcm_scope_s16_get_channel_buffer(snd_pcm_scope_t *scope,
- unsigned int channel);
-
-/* misc */
-
-int snd_pcm_format_signed(snd_pcm_format_t format);
-int snd_pcm_format_unsigned(snd_pcm_format_t format);
-int snd_pcm_format_linear(snd_pcm_format_t format);
-int snd_pcm_format_little_endian(snd_pcm_format_t format);
-int snd_pcm_format_big_endian(snd_pcm_format_t format);
-int snd_pcm_format_cpu_endian(snd_pcm_format_t format);
-int snd_pcm_format_width(snd_pcm_format_t format); /* in bits */
-int snd_pcm_format_physical_width(snd_pcm_format_t format); /* in bits */
-snd_pcm_format_t snd_pcm_build_linear_format(int width, int unsignd, int big_endian);
-ssize_t snd_pcm_format_size(snd_pcm_format_t format, size_t samples);
-u_int8_t snd_pcm_format_silence(snd_pcm_format_t format);
-u_int16_t snd_pcm_format_silence_16(snd_pcm_format_t format);
-u_int32_t snd_pcm_format_silence_32(snd_pcm_format_t format);
-u_int64_t snd_pcm_format_silence_64(snd_pcm_format_t format);
-int snd_pcm_format_set_silence(snd_pcm_format_t format, void *buf, unsigned int samples);
-
-size_t snd_pcm_access_mask_sizeof(void);
-/** \hideinitializer
- * \brief allocate an empty #snd_pcm_access_mask_t using standard alloca
- * \param ptr returned pointer
- */
-#define snd_pcm_access_mask_alloca(ptr) do { assert(ptr); *ptr = (snd_pcm_access_mask_t *) alloca(snd_pcm_access_mask_sizeof()); memset(*ptr, 0, snd_pcm_access_mask_sizeof()); } while (0)
-int snd_pcm_access_mask_malloc(snd_pcm_access_mask_t **ptr);
-void snd_pcm_access_mask_free(snd_pcm_access_mask_t *obj);
-void snd_pcm_access_mask_copy(snd_pcm_access_mask_t *dst, const snd_pcm_access_mask_t *src);
-void snd_pcm_access_mask_none(snd_pcm_access_mask_t *mask);
-void snd_pcm_access_mask_any(snd_pcm_access_mask_t *mask);
-int snd_pcm_access_mask_test(const snd_pcm_access_mask_t *mask, snd_pcm_access_t val);
-void snd_pcm_access_mask_set(snd_pcm_access_mask_t *mask, snd_pcm_access_t val);
-void snd_pcm_access_mask_reset(snd_pcm_access_mask_t *mask, snd_pcm_access_t val);
-
-size_t snd_pcm_format_mask_sizeof(void);
-/** \hideinitializer
- * \brief allocate an empty #snd_pcm_format_mask_t using standard alloca
- * \param ptr returned pointer
- */
-#define snd_pcm_format_mask_alloca(ptr) do { assert(ptr); *ptr = (snd_pcm_format_mask_t *) alloca(snd_pcm_format_mask_sizeof()); memset(*ptr, 0, snd_pcm_format_mask_sizeof()); } while (0)
-int snd_pcm_format_mask_malloc(snd_pcm_format_mask_t **ptr);
-void snd_pcm_format_mask_free(snd_pcm_format_mask_t *obj);
-void snd_pcm_format_mask_copy(snd_pcm_format_mask_t *dst, const snd_pcm_format_mask_t *src);
-void snd_pcm_format_mask_none(snd_pcm_format_mask_t *mask);
-void snd_pcm_format_mask_any(snd_pcm_format_mask_t *mask);
-int snd_pcm_format_mask_test(const snd_pcm_format_mask_t *mask, snd_pcm_format_t val);
-void snd_pcm_format_mask_set(snd_pcm_format_mask_t *mask, snd_pcm_format_t val);
-void snd_pcm_format_mask_reset(snd_pcm_format_mask_t *mask, snd_pcm_format_t val);
-
-size_t snd_pcm_subformat_mask_sizeof(void);
-/** \hideinitializer
- * \brief allocate an empty #snd_pcm_subformat_mask_t using standard alloca
- * \param ptr returned pointer
- */
-#define snd_pcm_subformat_mask_alloca(ptr) do { assert(ptr); *ptr = (snd_pcm_subformat_mask_t *) alloca(snd_pcm_subformat_mask_sizeof()); memset(*ptr, 0, snd_pcm_subformat_mask_sizeof()); } while (0)
-int snd_pcm_subformat_mask_malloc(snd_pcm_subformat_mask_t **ptr);
-void snd_pcm_subformat_mask_free(snd_pcm_subformat_mask_t *obj);
-void snd_pcm_subformat_mask_copy(snd_pcm_subformat_mask_t *dst, const snd_pcm_subformat_mask_t *src);
-void snd_pcm_subformat_mask_none(snd_pcm_subformat_mask_t *mask);
-void snd_pcm_subformat_mask_any(snd_pcm_subformat_mask_t *mask);
-int snd_pcm_subformat_mask_test(const snd_pcm_subformat_mask_t *mask, snd_pcm_subformat_t val);
-void snd_pcm_subformat_mask_set(snd_pcm_subformat_mask_t *mask, snd_pcm_subformat_t val);
-void snd_pcm_subformat_mask_reset(snd_pcm_subformat_mask_t *mask, snd_pcm_subformat_t val);
-
size_t snd_pcm_hw_params_sizeof(void);
/** \hideinitializer
* \brief allocate an invalid #snd_pcm_hw_params_t using standard alloca
@@ -712,6 +592,17 @@ unsigned int snd_pcm_hw_params_set_tick_time_near(snd_pcm_t *pcm, snd_pcm_hw_par
unsigned int snd_pcm_hw_params_set_tick_time_first(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, int *dir);
unsigned int snd_pcm_hw_params_set_tick_time_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, int *dir);
+/** \} */
+
+/**
+ * \defgroup PCM_SW_Params Software Parameters
+ * PCM Software Parameters
+ * \ingroup PCM
+ * \{
+ */
+
+int snd_pcm_sw_params_current(snd_pcm_t *pcm, snd_pcm_sw_params_t *params);
+
size_t snd_pcm_sw_params_sizeof(void);
/** \hideinitializer
* \brief allocate an invalid #snd_pcm_sw_params_t using standard alloca
@@ -742,6 +633,87 @@ snd_pcm_uframes_t snd_pcm_sw_params_get_silence_threshold(const snd_pcm_sw_param
int snd_pcm_sw_params_set_silence_size(snd_pcm_t *pcm, snd_pcm_sw_params_t *params, snd_pcm_uframes_t val);
snd_pcm_uframes_t snd_pcm_sw_params_get_silence_size(const snd_pcm_sw_params_t *params);
+/** \} */
+
+/**
+ * \defgroup PCM_Access Access Mask Functions
+ * PCM Access Mask Functions
+ * \ingroup PCM
+ * \{
+ */
+
+size_t snd_pcm_access_mask_sizeof(void);
+/** \hideinitializer
+ * \brief allocate an empty #snd_pcm_access_mask_t using standard alloca
+ * \param ptr returned pointer
+ */
+#define snd_pcm_access_mask_alloca(ptr) do { assert(ptr); *ptr = (snd_pcm_access_mask_t *) alloca(snd_pcm_access_mask_sizeof()); memset(*ptr, 0, snd_pcm_access_mask_sizeof()); } while (0)
+int snd_pcm_access_mask_malloc(snd_pcm_access_mask_t **ptr);
+void snd_pcm_access_mask_free(snd_pcm_access_mask_t *obj);
+void snd_pcm_access_mask_copy(snd_pcm_access_mask_t *dst, const snd_pcm_access_mask_t *src);
+void snd_pcm_access_mask_none(snd_pcm_access_mask_t *mask);
+void snd_pcm_access_mask_any(snd_pcm_access_mask_t *mask);
+int snd_pcm_access_mask_test(const snd_pcm_access_mask_t *mask, snd_pcm_access_t val);
+void snd_pcm_access_mask_set(snd_pcm_access_mask_t *mask, snd_pcm_access_t val);
+void snd_pcm_access_mask_reset(snd_pcm_access_mask_t *mask, snd_pcm_access_t val);
+
+/** \} */
+
+/**
+ * \defgroup PCM_Format Format Mask Functions
+ * PCM Format Mask Functions
+ * \ingroup PCM
+ * \{
+ */
+
+size_t snd_pcm_format_mask_sizeof(void);
+/** \hideinitializer
+ * \brief allocate an empty #snd_pcm_format_mask_t using standard alloca
+ * \param ptr returned pointer
+ */
+#define snd_pcm_format_mask_alloca(ptr) do { assert(ptr); *ptr = (snd_pcm_format_mask_t *) alloca(snd_pcm_format_mask_sizeof()); memset(*ptr, 0, snd_pcm_format_mask_sizeof()); } while (0)
+int snd_pcm_format_mask_malloc(snd_pcm_format_mask_t **ptr);
+void snd_pcm_format_mask_free(snd_pcm_format_mask_t *obj);
+void snd_pcm_format_mask_copy(snd_pcm_format_mask_t *dst, const snd_pcm_format_mask_t *src);
+void snd_pcm_format_mask_none(snd_pcm_format_mask_t *mask);
+void snd_pcm_format_mask_any(snd_pcm_format_mask_t *mask);
+int snd_pcm_format_mask_test(const snd_pcm_format_mask_t *mask, snd_pcm_format_t val);
+void snd_pcm_format_mask_set(snd_pcm_format_mask_t *mask, snd_pcm_format_t val);
+void snd_pcm_format_mask_reset(snd_pcm_format_mask_t *mask, snd_pcm_format_t val);
+
+/** \} */
+
+/**
+ * \defgroup PCM_SubFormat Subformat Mask Functions
+ * PCM Subformat Mask Functions
+ * \ingroup PCM
+ * \{
+ */
+
+size_t snd_pcm_subformat_mask_sizeof(void);
+/** \hideinitializer
+ * \brief allocate an empty #snd_pcm_subformat_mask_t using standard alloca
+ * \param ptr returned pointer
+ */
+#define snd_pcm_subformat_mask_alloca(ptr) do { assert(ptr); *ptr = (snd_pcm_subformat_mask_t *) alloca(snd_pcm_subformat_mask_sizeof()); memset(*ptr, 0, snd_pcm_subformat_mask_sizeof()); } while (0)
+int snd_pcm_subformat_mask_malloc(snd_pcm_subformat_mask_t **ptr);
+void snd_pcm_subformat_mask_free(snd_pcm_subformat_mask_t *obj);
+void snd_pcm_subformat_mask_copy(snd_pcm_subformat_mask_t *dst, const snd_pcm_subformat_mask_t *src);
+void snd_pcm_subformat_mask_none(snd_pcm_subformat_mask_t *mask);
+void snd_pcm_subformat_mask_any(snd_pcm_subformat_mask_t *mask);
+int snd_pcm_subformat_mask_test(const snd_pcm_subformat_mask_t *mask, snd_pcm_subformat_t val);
+void snd_pcm_subformat_mask_set(snd_pcm_subformat_mask_t *mask, snd_pcm_subformat_t val);
+void snd_pcm_subformat_mask_reset(snd_pcm_subformat_mask_t *mask, snd_pcm_subformat_t val);
+
+/** \} */
+
+/**
+ * \defgroup PCM_Status Status Functions
+ * PCM Status Functions
+ * \ingroup PCM
+ * \{
+ */
+
size_t snd_pcm_status_sizeof(void);
/** \hideinitializer
* \brief allocate an invalid #snd_pcm_status_t using standard alloca
@@ -759,30 +731,111 @@ snd_pcm_uframes_t snd_pcm_status_get_avail(const snd_pcm_status_t *obj);
snd_pcm_uframes_t snd_pcm_status_get_avail_max(const snd_pcm_status_t *obj);
snd_pcm_uframes_t snd_pcm_status_get_overrange(const snd_pcm_status_t *obj);
-size_t snd_pcm_info_sizeof(void);
-/** \hideinitializer
- * \brief allocate an invalid #snd_pcm_info_t using standard alloca
- * \param ptr returned pointer
+/** \} */
+
+/**
+ * \defgroup PCM_Description Description Functions
+ * PCM Description Functions
+ * \ingroup PCM
+ * \{
+ */
+
+const char *snd_pcm_stream_name(const snd_pcm_stream_t stream);
+const char *snd_pcm_access_name(const snd_pcm_access_t _access);
+const char *snd_pcm_format_name(const snd_pcm_format_t format);
+const char *snd_pcm_format_description(const snd_pcm_format_t format);
+const char *snd_pcm_subformat_name(const snd_pcm_subformat_t subformat);
+const char *snd_pcm_subformat_description(const snd_pcm_subformat_t subformat);
+snd_pcm_format_t snd_pcm_format_value(const char* name);
+const char *snd_pcm_tstamp_mode_name(const snd_pcm_tstamp_t mode);
+const char *snd_pcm_state_name(const snd_pcm_state_t state);
+
+/** \} */
+
+/**
+ * \defgroup PCM_Dump Debug Functions
+ * PCM Debug Functions
+ * \ingroup PCM
+ * \{
+ */
+
+int snd_pcm_dump(snd_pcm_t *pcm, snd_output_t *out);
+int snd_pcm_dump_hw_setup(snd_pcm_t *pcm, snd_output_t *out);
+int snd_pcm_dump_sw_setup(snd_pcm_t *pcm, snd_output_t *out);
+int snd_pcm_dump_setup(snd_pcm_t *pcm, snd_output_t *out);
+int snd_pcm_hw_params_dump(snd_pcm_hw_params_t *params, snd_output_t *out);
+int snd_pcm_sw_params_dump(snd_pcm_sw_params_t *params, snd_output_t *out);
+int snd_pcm_status_dump(snd_pcm_status_t *status, snd_output_t *out);
+
+/** \} */
+
+/**
+ * \defgroup PCM_Direct Direct Access (MMAP) Functions
+ * PCM Direct Access (MMAP) Functions
+ * \ingroup PCM
+ * \{
+ */
+
+int snd_pcm_mmap_begin(snd_pcm_t *pcm,
+ const snd_pcm_channel_area_t **areas,
+ snd_pcm_uframes_t *offset,
+ snd_pcm_uframes_t *frames);
+int snd_pcm_mmap_commit(snd_pcm_t *pcm, snd_pcm_uframes_t offset,
+ snd_pcm_uframes_t frames);
+snd_pcm_sframes_t snd_pcm_mmap_writei(snd_pcm_t *pcm, const void *buffer, snd_pcm_uframes_t size);
+snd_pcm_sframes_t snd_pcm_mmap_readi(snd_pcm_t *pcm, void *buffer, snd_pcm_uframes_t size);
+snd_pcm_sframes_t snd_pcm_mmap_writen(snd_pcm_t *pcm, void **bufs, snd_pcm_uframes_t size);
+snd_pcm_sframes_t snd_pcm_mmap_readn(snd_pcm_t *pcm, void **bufs, snd_pcm_uframes_t size);
+
+/** \} */
+
+/**
+ * \defgroup PCM_Helpers Helper Functions
+ * PCM Helper Functions
+ * \ingroup PCM
+ * \{
+ */
+
+int snd_pcm_format_signed(snd_pcm_format_t format);
+int snd_pcm_format_unsigned(snd_pcm_format_t format);
+int snd_pcm_format_linear(snd_pcm_format_t format);
+int snd_pcm_format_little_endian(snd_pcm_format_t format);
+int snd_pcm_format_big_endian(snd_pcm_format_t format);
+int snd_pcm_format_cpu_endian(snd_pcm_format_t format);
+int snd_pcm_format_width(snd_pcm_format_t format); /* in bits */
+int snd_pcm_format_physical_width(snd_pcm_format_t format); /* in bits */
+snd_pcm_format_t snd_pcm_build_linear_format(int width, int unsignd, int big_endian);
+ssize_t snd_pcm_format_size(snd_pcm_format_t format, size_t samples);
+u_int8_t snd_pcm_format_silence(snd_pcm_format_t format);
+u_int16_t snd_pcm_format_silence_16(snd_pcm_format_t format);
+u_int32_t snd_pcm_format_silence_32(snd_pcm_format_t format);
+u_int64_t snd_pcm_format_silence_64(snd_pcm_format_t format);
+int snd_pcm_format_set_silence(snd_pcm_format_t format, void *buf, unsigned int samples);
+
+snd_pcm_sframes_t snd_pcm_bytes_to_frames(snd_pcm_t *pcm, ssize_t bytes);
+ssize_t snd_pcm_frames_to_bytes(snd_pcm_t *pcm, snd_pcm_sframes_t frames);
+int snd_pcm_bytes_to_samples(snd_pcm_t *pcm, ssize_t bytes);
+ssize_t snd_pcm_samples_to_bytes(snd_pcm_t *pcm, int samples);
+
+int snd_pcm_area_silence(const snd_pcm_channel_area_t *dst_channel, snd_pcm_uframes_t dst_offset,
+ unsigned int samples, snd_pcm_format_t format);
+int snd_pcm_areas_silence(const snd_pcm_channel_area_t *dst_channels, snd_pcm_uframes_t dst_offset,
+ unsigned int channels, snd_pcm_uframes_t frames, snd_pcm_format_t format);
+int snd_pcm_area_copy(const snd_pcm_channel_area_t *dst_channel, snd_pcm_uframes_t dst_offset,
+ const snd_pcm_channel_area_t *src_channel, snd_pcm_uframes_t src_offset,
+ unsigned int samples, snd_pcm_format_t format);
+int snd_pcm_areas_copy(const snd_pcm_channel_area_t *dst_channels, snd_pcm_uframes_t dst_offset,
+ const snd_pcm_channel_area_t *src_channels, snd_pcm_uframes_t src_offset,
+ unsigned int channels, snd_pcm_uframes_t frames, snd_pcm_format_t format);
+
+/** \} */
+
+/**
+ * \defgroup PCM_Hook Hook Extension
+ * PCM Hook Extension
+ * \ingroup PCM
+ * \{
*/
-#define snd_pcm_info_alloca(ptr) do { assert(ptr); *ptr = (snd_pcm_info_t *) alloca(snd_pcm_info_sizeof()); memset(*ptr, 0, snd_pcm_info_sizeof()); } while (0)
-int snd_pcm_info_malloc(snd_pcm_info_t **ptr);
-void snd_pcm_info_free(snd_pcm_info_t *obj);
-void snd_pcm_info_copy(snd_pcm_info_t *dst, const snd_pcm_info_t *src);
-unsigned int snd_pcm_info_get_device(const snd_pcm_info_t *obj);
-unsigned int snd_pcm_info_get_subdevice(const snd_pcm_info_t *obj);
-snd_pcm_stream_t snd_pcm_info_get_stream(const snd_pcm_info_t *obj);
-int snd_pcm_info_get_card(const snd_pcm_info_t *obj);
-const char *snd_pcm_info_get_id(const snd_pcm_info_t *obj);
-const char *snd_pcm_info_get_name(const snd_pcm_info_t *obj);
-const char *snd_pcm_info_get_subdevice_name(const snd_pcm_info_t *obj);
-snd_pcm_class_t snd_pcm_info_get_class(const snd_pcm_info_t *obj);
-snd_pcm_subclass_t snd_pcm_info_get_subclass(const snd_pcm_info_t *obj);
-unsigned int snd_pcm_info_get_subdevices_count(const snd_pcm_info_t *obj);
-unsigned int snd_pcm_info_get_subdevices_avail(const snd_pcm_info_t *obj);
-snd_pcm_sync_id_t snd_pcm_info_get_sync(const snd_pcm_info_t *obj);
-void snd_pcm_info_set_device(snd_pcm_info_t *obj, unsigned int val);
-void snd_pcm_info_set_subdevice(snd_pcm_info_t *obj, unsigned int val);
-void snd_pcm_info_set_stream(snd_pcm_info_t *obj, snd_pcm_stream_t val);
/** type of pcm hook */
typedef enum _snd_pcm_hook_type {
@@ -804,9 +857,73 @@ int snd_pcm_hook_add(snd_pcm_hook_t **hookp, snd_pcm_t *pcm,
snd_pcm_hook_func_t func, void *private_data);
int snd_pcm_hook_remove(snd_pcm_hook_t *hook);
-#ifdef __cplusplus
-}
-#endif
+/** \} */
+
+/**
+ * \defgroup PCM_Scope Scope Plugin Extension
+ * PCM Scope Plugin Extension
+ * \ingroup PCM
+ * \{
+ */
+
+/** #SND_PCM_TYPE_METER scope functions */
+typedef struct _snd_pcm_scope_ops {
+ /** \brief Enable and prepare it using current params
+ * \param scope scope handle
+ */
+ int (*enable)(snd_pcm_scope_t *scope);
+ /** \brief Disable
+ * \param scope scope handle
+ */
+ void (*disable)(snd_pcm_scope_t *scope);
+ /** \brief PCM has been started
+ * \param scope scope handle
+ */
+ void (*start)(snd_pcm_scope_t *scope);
+ /** \brief PCM has been stopped
+ * \param scope scope handle
+ */
+ void (*stop)(snd_pcm_scope_t *scope);
+ /** \brief New frames are present
+ * \param scope scope handle
+ */
+ void (*update)(snd_pcm_scope_t *scope);
+ /** \brief Reset status
+ * \param scope scope handle
+ */
+ void (*reset)(snd_pcm_scope_t *scope);
+ /** \brief PCM is closing
+ * \param scope scope handle
+ */
+ void (*close)(snd_pcm_scope_t *scope);
+} snd_pcm_scope_ops_t;
+
+snd_pcm_uframes_t snd_pcm_meter_get_bufsize(snd_pcm_t *pcm);
+unsigned int snd_pcm_meter_get_channels(snd_pcm_t *pcm);
+unsigned int snd_pcm_meter_get_rate(snd_pcm_t *pcm);
+snd_pcm_uframes_t snd_pcm_meter_get_now(snd_pcm_t *pcm);
+snd_pcm_uframes_t snd_pcm_meter_get_boundary(snd_pcm_t *pcm);
+int snd_pcm_meter_add_scope(snd_pcm_t *pcm, snd_pcm_scope_t *scope);
+snd_pcm_scope_t *snd_pcm_meter_search_scope(snd_pcm_t *pcm, const char *name);
+int snd_pcm_scope_malloc(snd_pcm_scope_t **ptr);
+void snd_pcm_scope_set_ops(snd_pcm_scope_t *scope, snd_pcm_scope_ops_t *val);
+void snd_pcm_scope_set_name(snd_pcm_scope_t *scope, const char *val);
+const char *snd_pcm_scope_get_name(snd_pcm_scope_t *scope);
+void *snd_pcm_scope_get_callback_private(snd_pcm_scope_t *scope);
+void snd_pcm_scope_set_callback_private(snd_pcm_scope_t *scope, void *val);
+int snd_pcm_scope_s16_open(snd_pcm_t *pcm, const char *name,
+ snd_pcm_scope_t **scopep);
+int16_t *snd_pcm_scope_s16_get_channel_buffer(snd_pcm_scope_t *scope,
+ unsigned int channel);
+
+/** \} */
+
+/**
+ * \defgroup PCM_Deprecated Deprecated Functions
+ * PCM Deprecated Functions
+ * \ingroup PCM
+ * \{
+ */
/* Deprecated functions, for compatibity */
const char *snd_pcm_start_mode_name(snd_pcm_start_t mode);
@@ -818,5 +935,9 @@ snd_pcm_xrun_t snd_pcm_sw_params_get_xrun_mode(const snd_pcm_sw_params_t *params
/** \} */
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __ALSA_PCM_H */
diff --git a/include/rawmidi.h b/include/rawmidi.h
index 76750441..e7b37576 100644
--- a/include/rawmidi.h
+++ b/include/rawmidi.h
@@ -28,6 +28,10 @@
#ifndef __ALSA_RAWMIDI_H
#define __ALSA_RAWMIDI_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* \defgroup RawMidi RawMidi Interface
* The RawMidi Interface.
@@ -73,10 +77,6 @@ typedef enum _snd_rawmidi_type {
SND_RAWMIDI_TYPE_INET,
} snd_rawmidi_type_t;
-#ifdef __cplusplus
-extern "C" {
-#endif
-
int snd_rawmidi_open(snd_rawmidi_t **in_rmidi, snd_rawmidi_t **out_rmidi,
const char *name, int mode);
int snd_rawmidi_close(snd_rawmidi_t *rmidi);
@@ -144,11 +144,11 @@ const char *snd_rawmidi_name(snd_rawmidi_t *rmidi);
snd_rawmidi_type_t snd_rawmidi_type(snd_rawmidi_t *rmidi);
snd_rawmidi_stream_t snd_rawmidi_stream(snd_rawmidi_t *rawmidi);
+/** \} */
+
#ifdef __cplusplus
}
#endif
-/** \} */
-
#endif /* __RAWMIDI_H */
diff --git a/include/seq.h b/include/seq.h
index b9663a53..f4fcbf4a 100644
--- a/include/seq.h
+++ b/include/seq.h
@@ -28,17 +28,16 @@
#ifndef __ALSA_SEQ_H
#define __ALSA_SEQ_H
-/**
- * \defgroup SeqGlobal Sequencer System
- * Global System Interface
- * \ingroup Sequencer
- * \{
- */
-
#ifdef __cplusplus
extern "C" {
#endif
+/**
+ * \defgroup Sequencer MIDI Sequencer
+ * MIDI Sequencer Interface
+ * \{
+ */
+
/** dlsym version for interface entry callback */
#define SND_SEQ_DLSYM_VERSION _dlsym_seq_001
diff --git a/include/seq_midi_event.h b/include/seq_midi_event.h
index 2019b4bd..21c84ba2 100644
--- a/include/seq_midi_event.h
+++ b/include/seq_midi_event.h
@@ -28,6 +28,10 @@
#ifndef __ALSA_SEQ_MIDI_EVENT_H
#define __ALSA_SEQ_MIDI_EVENT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* \defgroup MIDI_Event Sequencer event <-> MIDI byte stream coder
* \ingroup Sequencer
@@ -38,10 +42,6 @@
/** container for sequencer midi event parsers */
typedef struct snd_midi_event snd_midi_event_t;
-#ifdef __cplusplus
-extern "C" {
-#endif
-
int snd_midi_event_new(size_t bufsize, snd_midi_event_t **rdev);
int snd_midi_event_resize_buffer(snd_midi_event_t *dev, size_t bufsize);
void snd_midi_event_free(snd_midi_event_t *dev);
@@ -54,11 +54,11 @@ int snd_midi_event_encode_byte(snd_midi_event_t *dev, int c, snd_seq_event_t *ev
/* decode from event to bytes - return number of written bytes if success */
long snd_midi_event_decode(snd_midi_event_t *dev, unsigned char *buf, long count, snd_seq_event_t *ev);
+/** \} */
+
#ifdef __cplusplus
}
#endif
-/** \} */
-
#endif /* __ALSA_SEQ_MIDI_EVENT_H */
diff --git a/include/seqmid.h b/include/seqmid.h
index 2d4e94c7..d18adc03 100644
--- a/include/seqmid.h
+++ b/include/seqmid.h
@@ -28,6 +28,10 @@
#ifndef __ALSA_SEQMID_H
#define __ALSA_SEQMID_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* \defgroup SeqMiddle Sequencer Middle Level Interface
* Sequencer Middle Level Interface
@@ -35,10 +39,6 @@
* \{
*/
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/**
* \brief initialize event record
* \param ev event record pointer
@@ -427,11 +427,11 @@ int snd_seq_reset_pool_input(snd_seq_t *seq);
((ev)->type = SND_SEQ_EVENT_SYSEX,\
snd_seq_ev_set_variable(ev, datalen, dataptr))
+/** \} */
+
#ifdef __cplusplus
}
#endif
-/** \} */
-
#endif /* __ALSA_SEQMID_H */
diff --git a/include/timer.h b/include/timer.h
index f3d4c614..9aeeddba 100644
--- a/include/timer.h
+++ b/include/timer.h
@@ -28,6 +28,10 @@
#ifndef __ALSA_TIMER_H
#define __ALSA_TIMER_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* \defgroup Timer Timer Interface
* Timer Interface
@@ -96,10 +100,6 @@ typedef struct _snd_timer_query snd_timer_query_t;
typedef struct _snd_timer snd_timer_t;
-#ifdef __cplusplus
-extern "C" {
-#endif
-
int snd_timer_query_open(snd_timer_query_t **handle, const char *name, int mode);
int snd_timer_query_close(snd_timer_query_t *handle);
int snd_timer_query_next_device(snd_timer_query_t *handle, snd_timer_id_t *tid);
@@ -174,11 +174,11 @@ long snd_timer_status_get_lost(snd_timer_status_t * status);
long snd_timer_status_get_overrun(snd_timer_status_t * status);
long snd_timer_status_get_queue(snd_timer_status_t * status);
+/** \} */
+
#ifdef __cplusplus
}
#endif
-/** \} */
-
#endif /** __ALSA_TIMER_H */