mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-12-15 08:56:36 -05:00
Documentation update by Clement Ladish
This commit is contained in:
parent
2db6b18b39
commit
63d708a344
15 changed files with 965 additions and 714 deletions
|
|
@ -7,8 +7,8 @@
|
|||
* \date 1998-2001
|
||||
*
|
||||
* Definitions of constants for the ALSA driver
|
||||
*
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as
|
||||
* published by the Free Software Foundation; either version 2.1 of
|
||||
|
|
@ -33,8 +33,8 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
/**
|
||||
* \defgroup Digital_Audio_Interface Constants For Digital Audio Interface
|
||||
* AES/IEC958 channel status bits
|
||||
* \defgroup Digital_Audio_Interface Constants for Digital Audio Interfaces
|
||||
* AES/IEC958 channel status bits.
|
||||
* \{
|
||||
*/
|
||||
|
||||
|
|
@ -42,7 +42,7 @@ extern "C" {
|
|||
#define IEC958_AES0_NONAUDIO (1<<1) /**< 0 = audio, 1 = non-audio */
|
||||
#define IEC958_AES0_PRO_EMPHASIS (7<<2) /**< mask - emphasis */
|
||||
#define IEC958_AES0_PRO_EMPHASIS_NOTID (0<<2) /**< emphasis not indicated */
|
||||
#define IEC958_AES0_PRO_EMPHASIS_NONE (1<<2) /**< none emphasis */
|
||||
#define IEC958_AES0_PRO_EMPHASIS_NONE (1<<2) /**< no emphasis */
|
||||
#define IEC958_AES0_PRO_EMPHASIS_5015 (3<<2) /**< 50/15us emphasis */
|
||||
#define IEC958_AES0_PRO_EMPHASIS_CCITT (7<<2) /**< CCITT J.17 emphasis */
|
||||
#define IEC958_AES0_PRO_FREQ_UNLOCKED (1<<5) /**< source sample frequency: 0 = locked, 1 = unlocked */
|
||||
|
|
@ -53,18 +53,18 @@ extern "C" {
|
|||
#define IEC958_AES0_PRO_FS_32000 (3<<6) /**< 32kHz */
|
||||
#define IEC958_AES0_CON_NOT_COPYRIGHT (1<<2) /**< 0 = copyright, 1 = not copyright */
|
||||
#define IEC958_AES0_CON_EMPHASIS (7<<3) /**< mask - emphasis */
|
||||
#define IEC958_AES0_CON_EMPHASIS_NONE (0<<3) /**< none emphasis */
|
||||
#define IEC958_AES0_CON_EMPHASIS_NONE (0<<3) /**< no emphasis */
|
||||
#define IEC958_AES0_CON_EMPHASIS_5015 (1<<3) /**< 50/15us emphasis */
|
||||
#define IEC958_AES0_CON_MODE (3<<6) /**< mask - mode */
|
||||
#define IEC958_AES1_PRO_MODE (15<<0) /**< mask - channel mode */
|
||||
#define IEC958_AES1_PRO_MODE_NOTID (0<<0) /**< not indicated */
|
||||
#define IEC958_AES1_PRO_MODE_NOTID (0<<0) /**< mode not indicated */
|
||||
#define IEC958_AES1_PRO_MODE_STEREOPHONIC (2<<0) /**< stereophonic - ch A is left */
|
||||
#define IEC958_AES1_PRO_MODE_SINGLE (4<<0) /**< single channel */
|
||||
#define IEC958_AES1_PRO_MODE_TWO (8<<0) /**< two channels */
|
||||
#define IEC958_AES1_PRO_MODE_PRIMARY (12<<0) /**< primary/secondary */
|
||||
#define IEC958_AES1_PRO_MODE_BYTE3 (15<<0) /**< vector to byte 3 */
|
||||
#define IEC958_AES1_PRO_USERBITS (15<<4) /**< mask - user bits */
|
||||
#define IEC958_AES1_PRO_USERBITS_NOTID (0<<4) /**< not indicated */
|
||||
#define IEC958_AES1_PRO_USERBITS_NOTID (0<<4) /**< user bits not indicated */
|
||||
#define IEC958_AES1_PRO_USERBITS_192 (8<<4) /**< 192-bit structure */
|
||||
#define IEC958_AES1_PRO_USERBITS_UDEF (12<<4) /**< user defined application */
|
||||
#define IEC958_AES1_CON_CATEGORY 0x7f /**< consumer category */
|
||||
|
|
@ -104,15 +104,15 @@ extern "C" {
|
|||
#define IEC958_AES2_PRO_SBITS_24 (4<<0) /**< 24-bit - main audio */
|
||||
#define IEC958_AES2_PRO_SBITS_UDEF (6<<0) /**< user defined application */
|
||||
#define IEC958_AES2_PRO_WORDLEN (7<<3) /**< mask - source word length */
|
||||
#define IEC958_AES2_PRO_WORDLEN_NOTID (0<<3) /**< not indicated */
|
||||
#define IEC958_AES2_PRO_WORDLEN_NOTID (0<<3) /**< source word length not indicated */
|
||||
#define IEC958_AES2_PRO_WORDLEN_22_18 (2<<3) /**< 22-bit or 18-bit */
|
||||
#define IEC958_AES2_PRO_WORDLEN_23_19 (4<<3) /**< 23-bit or 19-bit */
|
||||
#define IEC958_AES2_PRO_WORDLEN_24_20 (5<<3) /**< 24-bit or 20-bit */
|
||||
#define IEC958_AES2_PRO_WORDLEN_20_16 (6<<3) /**< 20-bit or 16-bit */
|
||||
#define IEC958_AES2_CON_SOURCE (15<<0) /**< mask - source number */
|
||||
#define IEC958_AES2_CON_SOURCE_UNSPEC (0<<0) /**< unspecified */
|
||||
#define IEC958_AES2_CON_SOURCE_UNSPEC (0<<0) /**< source number unspecified */
|
||||
#define IEC958_AES2_CON_CHANNEL (15<<4) /**< mask - channel number */
|
||||
#define IEC958_AES2_CON_CHANNEL_UNSPEC (0<<4) /**< unspecified */
|
||||
#define IEC958_AES2_CON_CHANNEL_UNSPEC (0<<4) /**< channel number unspecified */
|
||||
#define IEC958_AES3_CON_FS (15<<0) /**< mask - sample frequency */
|
||||
#define IEC958_AES3_CON_FS_44100 (0<<0) /**< 44.1kHz */
|
||||
#define IEC958_AES3_CON_FS_48000 (2<<0) /**< 48kHz */
|
||||
|
|
@ -125,32 +125,32 @@ extern "C" {
|
|||
/** \} */
|
||||
|
||||
/**
|
||||
* \defgroup MIDI_Interface Constants For MIDI v1.0 Interface
|
||||
* Constants for MIDI v1.0 interface
|
||||
* \defgroup MIDI_Interface Constants for MIDI v1.0
|
||||
* Constants for MIDI v1.0.
|
||||
* \{
|
||||
*/
|
||||
|
||||
#define MIDI_CHANNELS 16 /**< number of channels */
|
||||
#define MIDI_GM_DRUM_CHANNEL (10-1) /**< channel number for GM drum */
|
||||
#define MIDI_CHANNELS 16 /**< Number of channels per port/cable. */
|
||||
#define MIDI_GM_DRUM_CHANNEL (10-1) /**< Channel number for GM drums. */
|
||||
|
||||
/**
|
||||
* \defgroup MIDI_Commands MIDI Commands
|
||||
* MIDI Commands
|
||||
* MIDI command codes.
|
||||
* \{
|
||||
*/
|
||||
|
||||
#define MIDI_CMD_NOTE_OFF 0x80 /**< note-off */
|
||||
#define MIDI_CMD_NOTE_ON 0x90 /**< note-on */
|
||||
#define MIDI_CMD_NOTE_PRESSURE 0xa0 /**< key-pressure */
|
||||
#define MIDI_CMD_CONTROL 0xb0 /**< MIDI control */
|
||||
#define MIDI_CMD_NOTE_OFF 0x80 /**< note off */
|
||||
#define MIDI_CMD_NOTE_ON 0x90 /**< note on */
|
||||
#define MIDI_CMD_NOTE_PRESSURE 0xa0 /**< key pressure */
|
||||
#define MIDI_CMD_CONTROL 0xb0 /**< control change */
|
||||
#define MIDI_CMD_PGM_CHANGE 0xc0 /**< program change */
|
||||
#define MIDI_CMD_CHANNEL_PRESSURE 0xd0 /**< channel-pressure */
|
||||
#define MIDI_CMD_BENDER 0xe0 /**< pitch-bender */
|
||||
#define MIDI_CMD_CHANNEL_PRESSURE 0xd0 /**< channel pressure */
|
||||
#define MIDI_CMD_BENDER 0xe0 /**< pitch bender */
|
||||
|
||||
#define MIDI_CMD_COMMON_SYSEX 0xf0 /**< sysex (system exclusive) begin */
|
||||
#define MIDI_CMD_COMMON_MTC_QUARTER 0xf1 /**< MTC quarter frame */
|
||||
#define MIDI_CMD_COMMON_SONG_POS 0xf2 /**< song position */
|
||||
#define MIDI_CMD_COMMON_SONG_SELECT 0xf3 /**< song selection */
|
||||
#define MIDI_CMD_COMMON_SONG_SELECT 0xf3 /**< song select */
|
||||
#define MIDI_CMD_COMMON_TUNE_REQUEST 0xf6 /**< tune request */
|
||||
#define MIDI_CMD_COMMON_SYSEX_END 0xf7 /**< end of sysex */
|
||||
#define MIDI_CMD_COMMON_CLOCK 0xf8 /**< clock */
|
||||
|
|
@ -158,25 +158,25 @@ extern "C" {
|
|||
#define MIDI_CMD_COMMON_CONTINUE 0xfb /**< continue */
|
||||
#define MIDI_CMD_COMMON_STOP 0xfc /**< stop */
|
||||
#define MIDI_CMD_COMMON_SENSING 0xfe /**< active sensing */
|
||||
#define MIDI_CMD_COMMON_RESET 0xff /**< MIDI reset */
|
||||
#define MIDI_CMD_COMMON_RESET 0xff /**< reset */
|
||||
|
||||
/** \} */
|
||||
|
||||
/**
|
||||
* \defgroup MIDI_Controllers MIDI Controllers
|
||||
* MIDI Controllers
|
||||
* MIDI controller numbers.
|
||||
* \{
|
||||
*/
|
||||
|
||||
#define MIDI_CTL_MSB_BANK 0x00 /**< Bank selection */
|
||||
#define MIDI_CTL_MSB_MODWHEEL 0x01 /**< Modwheel */
|
||||
#define MIDI_CTL_MSB_MODWHEEL 0x01 /**< Modulation */
|
||||
#define MIDI_CTL_MSB_BREATH 0x02 /**< Breath */
|
||||
#define MIDI_CTL_MSB_FOOT 0x04 /**< Foot */
|
||||
#define MIDI_CTL_MSB_PORTAMENTO_TIME 0x05 /**< Portamento time */
|
||||
#define MIDI_CTL_MSB_DATA_ENTRY 0x06 /**< Data entry */
|
||||
#define MIDI_CTL_MSB_MAIN_VOLUME 0x07 /**< Main volume */
|
||||
#define MIDI_CTL_MSB_BALANCE 0x08 /**< Balance */
|
||||
#define MIDI_CTL_MSB_PAN 0x0a /**< Pan */
|
||||
#define MIDI_CTL_MSB_PAN 0x0a /**< Panpot */
|
||||
#define MIDI_CTL_MSB_EXPRESSION 0x0b /**< Expression */
|
||||
#define MIDI_CTL_MSB_EFFECT1 0x0c /**< Effect1 */
|
||||
#define MIDI_CTL_MSB_EFFECT2 0x0d /**< Effect2 */
|
||||
|
|
@ -185,14 +185,14 @@ extern "C" {
|
|||
#define MIDI_CTL_MSB_GENERAL_PURPOSE3 0x12 /**< General purpose 3 */
|
||||
#define MIDI_CTL_MSB_GENERAL_PURPOSE4 0x13 /**< General purpose 4 */
|
||||
#define MIDI_CTL_LSB_BANK 0x20 /**< Bank selection */
|
||||
#define MIDI_CTL_LSB_MODWHEEL 0x21 /**< Modwheel */
|
||||
#define MIDI_CTL_LSB_MODWHEEL 0x21 /**< Modulation */
|
||||
#define MIDI_CTL_LSB_BREATH 0x22 /**< Breath */
|
||||
#define MIDI_CTL_LSB_FOOT 0x24 /**< Foot */
|
||||
#define MIDI_CTL_LSB_PORTAMENTO_TIME 0x25 /**< Portamento time */
|
||||
#define MIDI_CTL_LSB_DATA_ENTRY 0x26 /**< Data entry */
|
||||
#define MIDI_CTL_LSB_MAIN_VOLUME 0x27 /**< Main volume */
|
||||
#define MIDI_CTL_LSB_BALANCE 0x28 /**< Balance */
|
||||
#define MIDI_CTL_LSB_PAN 0x2a /**< Pan */
|
||||
#define MIDI_CTL_LSB_PAN 0x2a /**< Panpot */
|
||||
#define MIDI_CTL_LSB_EXPRESSION 0x2b /**< Expression */
|
||||
#define MIDI_CTL_LSB_EFFECT1 0x2c /**< Effect1 */
|
||||
#define MIDI_CTL_LSB_EFFECT2 0x2d /**< Effect2 */
|
||||
|
|
@ -200,9 +200,9 @@ extern "C" {
|
|||
#define MIDI_CTL_LSB_GENERAL_PURPOSE2 0x31 /**< General purpose 2 */
|
||||
#define MIDI_CTL_LSB_GENERAL_PURPOSE3 0x32 /**< General purpose 3 */
|
||||
#define MIDI_CTL_LSB_GENERAL_PURPOSE4 0x33 /**< General purpose 4 */
|
||||
#define MIDI_CTL_SUSTAIN 0x40 /**< Sustain */
|
||||
#define MIDI_CTL_SUSTAIN 0x40 /**< Sustain pedal */
|
||||
#define MIDI_CTL_PORTAMENTO 0x41 /**< Portamento */
|
||||
#define MIDI_CTL_SUSTENUTO 0x42 /**< Sustenuto */
|
||||
#define MIDI_CTL_SUSTENUTO 0x42 /**< Sostenuto */
|
||||
#define MIDI_CTL_SOFT_PEDAL 0x43 /**< Soft pedal */
|
||||
#define MIDI_CTL_LEGATO_FOOTSWITCH 0x44 /**< Legato foot switch */
|
||||
#define MIDI_CTL_HOLD2 0x45 /**< Hold2 */
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@
|
|||
* \date 1998-2001
|
||||
*
|
||||
* Application interface library for the ALSA driver
|
||||
*
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as
|
||||
* published by the Free Software Foundation; either version 2.1 of
|
||||
|
|
@ -34,36 +34,52 @@ extern "C" {
|
|||
|
||||
/**
|
||||
* \defgroup Config Configuration Interface
|
||||
* Configuration Interface
|
||||
* The configuration functions and types allow you to read, enumerate,
|
||||
* modify and write the contents of ALSA configuration files.
|
||||
* \{
|
||||
*/
|
||||
|
||||
/** dlsym version for config evaluate callback */
|
||||
/** \brief \c dlsym version for the config evaluate callback. */
|
||||
#define SND_CONFIG_DLSYM_VERSION_EVALUATE _dlsym_config_evaluate_001
|
||||
/** dlsym version for config hook callback */
|
||||
/** \brief \c dlsym version for the config hook callback. */
|
||||
#define SND_CONFIG_DLSYM_VERSION_HOOK _dlsym_config_hook_001
|
||||
|
||||
/** Config node type */
|
||||
/** Configuration node type. */
|
||||
typedef enum _snd_config_type {
|
||||
/** Integer number */
|
||||
/** Integer number. */
|
||||
SND_CONFIG_TYPE_INTEGER,
|
||||
/** 64 bit Integer number */
|
||||
/** 64 bit Integer number. */
|
||||
SND_CONFIG_TYPE_INTEGER64,
|
||||
/** Real number */
|
||||
/** Real number. */
|
||||
SND_CONFIG_TYPE_REAL,
|
||||
/** Character string */
|
||||
/** Character string. */
|
||||
SND_CONFIG_TYPE_STRING,
|
||||
/** Pointer - runtime only - cannot be saved */
|
||||
/** Pointer (runtime only, cannot be saved). */
|
||||
SND_CONFIG_TYPE_POINTER,
|
||||
/** Compound */
|
||||
/** Compound node. */
|
||||
SND_CONFIG_TYPE_COMPOUND = 1024
|
||||
} snd_config_type_t;
|
||||
|
||||
/** Config node handle */
|
||||
/**
|
||||
* \brief Internal structure for a configuration node object.
|
||||
*
|
||||
* The ALSA library uses a pointer to this structure as a handle to a
|
||||
* configuration node. Applications don't access its contents directly.
|
||||
*/
|
||||
typedef struct _snd_config snd_config_t;
|
||||
/** Config compound iterator */
|
||||
/**
|
||||
* \brief Type for a configuration compound iterator.
|
||||
*
|
||||
* The ALSA library uses this pointer type as a handle to a configuration
|
||||
* compound iterator. Applications don't directly access the contents of
|
||||
* the structure pointed to by this type.
|
||||
*/
|
||||
typedef struct _snd_config_iterator *snd_config_iterator_t;
|
||||
/** Config private update structure */
|
||||
/**
|
||||
* \brief Internal structure for a configuration private update object.
|
||||
*
|
||||
* The ALSA library uses this structure to save private update information.
|
||||
*/
|
||||
typedef struct _snd_config_update snd_config_update_t;
|
||||
|
||||
extern snd_config_t *snd_config;
|
||||
|
|
@ -136,12 +152,13 @@ snd_config_iterator_t snd_config_iterator_next(const snd_config_iterator_t itera
|
|||
snd_config_iterator_t snd_config_iterator_end(const snd_config_t *node);
|
||||
snd_config_t *snd_config_iterator_entry(const snd_config_iterator_t iterator);
|
||||
|
||||
/** Helper for compound config node leaves traversal
|
||||
* \param pos Current node iterator
|
||||
* \param next Next node iterator
|
||||
* \param node Compound config node
|
||||
/**
|
||||
* \brief Helper macro to iterate over the children of a compound node.
|
||||
* \param pos Iterator variable for the current node.
|
||||
* \param next Iterator variable for the next node.
|
||||
* \param node Handle to the compound configuration node to iterate over.
|
||||
*
|
||||
* This macro is designed to permit the removal of current node.
|
||||
* This macro is designed to permit the removal of the current node.
|
||||
*/
|
||||
#define snd_config_for_each(pos, next, node) \
|
||||
for (pos = snd_config_iterator_first(node), next = snd_config_iterator_next(pos); pos != snd_config_iterator_end(node); pos = next, next = snd_config_iterator_next(pos))
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@
|
|||
* \date 1998-2001
|
||||
*
|
||||
* Application interface library for the ALSA driver
|
||||
*
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as
|
||||
* published by the Free Software Foundation; either version 2.1 of
|
||||
|
|
@ -30,25 +30,25 @@
|
|||
|
||||
/**
|
||||
* \defgroup BConv Binary Value Conversion
|
||||
* Binary Value Conversion
|
||||
* Helper macros to convert binary values to/from a specific byte order.
|
||||
* \{
|
||||
*/
|
||||
|
||||
/** convert 16-bit value from host to Little Endian byte order */
|
||||
/** Converts a 16-bit value from host to little endian byte order. */
|
||||
#define snd_host_to_LE_16(val) __cpu_to_le16(val)
|
||||
/** convert 16-bit value from Little Endian to host byte order */
|
||||
/** Converts a 16-bit value from little endian to host byte order. */
|
||||
#define snd_LE_to_host_16(val) __le16_to_cpu(val)
|
||||
/** convert 32-bit value from host to Little Endian byte order */
|
||||
/** Converts a 32-bit value from host to little endian byte order. */
|
||||
#define snd_host_to_LE_32(val) __cpu_to_le32(val)
|
||||
/** convert 32-bit value from Little Endian to host byte order */
|
||||
/** Converts a 32-bit value from little endian to host byte order. */
|
||||
#define snd_LE_to_host_32(val) __le32_to_cpu(val)
|
||||
/** convert 16-bit value from host to Big Endian byte order */
|
||||
/** Converts a 16-bit value from host to big endian byte order. */
|
||||
#define snd_host_to_BE_16(val) __cpu_to_be16(val)
|
||||
/** convert 16-bit value from Big Endian to host byte order */
|
||||
/** Converts a 16-bit value from big endian to host byte order. */
|
||||
#define snd_BE_to_host_16(val) __be16_to_cpu(val)
|
||||
/** convert 32-bit value from host to Big Endian byte order */
|
||||
/** Converts a 32-bit value from host to big endian byte order. */
|
||||
#define snd_host_to_BE_32(val) __cpu_to_be32(val)
|
||||
/** convert 32-bit value from Big Endian to host byte order */
|
||||
/** Converts a 32-bit value from big endian to host byte order. */
|
||||
#define snd_BE_to_host_32(val) __be32_to_cpu(val)
|
||||
|
||||
/** \} */
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@
|
|||
* \date 1998-2001
|
||||
*
|
||||
* Application interface library for the ALSA driver
|
||||
*
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as
|
||||
* published by the Free Software Foundation; either version 2.1 of
|
||||
|
|
@ -34,34 +34,37 @@ extern "C" {
|
|||
|
||||
/**
|
||||
* \defgroup Error Error handling
|
||||
* Error handling
|
||||
* Error handling macros and functions.
|
||||
* \{
|
||||
*/
|
||||
|
||||
#define SND_ERROR_BEGIN 500000 /**< begin boundary of sound error codes */
|
||||
#define SND_ERROR_INCOMPATIBLE_VERSION (SND_ERROR_BEGIN+0) /**< protocol is not compatible */
|
||||
#define SND_ERROR_BEGIN 500000 /**< Lower boundary of sound error codes. */
|
||||
#define SND_ERROR_INCOMPATIBLE_VERSION (SND_ERROR_BEGIN+0) /**< Kernel/library protocols are not compatible. */
|
||||
|
||||
const char *snd_strerror(int errnum);
|
||||
|
||||
/**
|
||||
* \brief Error handler
|
||||
* \param file File name
|
||||
* \param line Line number
|
||||
* \param function Function name
|
||||
* \param err errno value (or 0 if not relevant)
|
||||
* \param fmt printf(3) format
|
||||
* \param ... printf(3) arguments
|
||||
* \brief Error handler callback.
|
||||
* \param file Source file name.
|
||||
* \param line Line number.
|
||||
* \param function Function name.
|
||||
* \param err Value of \c errno, or 0 if not relevant.
|
||||
* \param fmt \c printf(3) format.
|
||||
* \param ... \c printf(3) arguments.
|
||||
*
|
||||
* A function of this type is called by the ALSA library when an error occurs.
|
||||
* This function usually shows the message on the screen, and/or logs it.
|
||||
*/
|
||||
typedef void (snd_lib_error_handler_t)(const char *file, int line, const char *function, int err, const char *fmt, ...) /* __attribute__ ((format (printf, 5, 6))) */;
|
||||
extern snd_lib_error_handler_t *snd_lib_error;
|
||||
extern int snd_lib_error_set_handler(snd_lib_error_handler_t *handler);
|
||||
typedef void (*snd_lib_error_handler_t)(const char *file, int line, const char *function, int err, const char *fmt, ...) /* __attribute__ ((format (printf, 5, 6))) */;
|
||||
extern snd_lib_error_handler_t snd_lib_error;
|
||||
extern int snd_lib_error_set_handler(snd_lib_error_handler_t handler);
|
||||
|
||||
#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 */
|
||||
#define SNDERR(...) snd_lib_error(__FILE__, __LINE__, __FUNCTION__, 0, __VA_ARGS__) /**< Shows a sound error message. */
|
||||
#define SYSERR(...) snd_lib_error(__FILE__, __LINE__, __FUNCTION__, errno, __VA_ARGS__) /**< Shows a system error message (related to \c errno). */
|
||||
#else
|
||||
#define SNDERR(args...) snd_lib_error(__FILE__, __LINE__, __FUNCTION__, 0, ##args) /**< show sound error */
|
||||
#define SYSERR(args...) snd_lib_error(__FILE__, __LINE__, __FUNCTION__, errno, ##args) /**< show system error */
|
||||
#define SNDERR(args...) snd_lib_error(__FILE__, __LINE__, __FUNCTION__, 0, ##args) /**< Shows a sound error message. */
|
||||
#define SYSERR(args...) snd_lib_error(__FILE__, __LINE__, __FUNCTION__, errno, ##args) /**< Shows a system error message (related to \c errno). */
|
||||
#endif
|
||||
|
||||
/** \} */
|
||||
|
|
|
|||
|
|
@ -35,6 +35,9 @@ extern "C" {
|
|||
/**
|
||||
* \defgroup Global Global defines and functions
|
||||
* Global defines and functions.
|
||||
* \par
|
||||
* The ALSA library implementation uses these macros and functions.
|
||||
* Most applications probably do not need them.
|
||||
* \{
|
||||
*/
|
||||
|
||||
|
|
@ -45,9 +48,12 @@ extern "C" {
|
|||
|
||||
#ifdef PIC /* dynamic build */
|
||||
|
||||
/** helper macro for SND_DLSYM_BUILD_VERSION \hideinitializer */
|
||||
/** \hideinitializer \brief Helper macro for #SND_DLSYM_BUILD_VERSION. */
|
||||
#define __SND_DLSYM_VERSION(name, version) _ ## name ## version
|
||||
/** build version for versioned dynamic symbol \hideinitializer */
|
||||
/**
|
||||
* \hideinitializer
|
||||
* \brief Appends the build version to the name of a versioned dynamic symbol.
|
||||
*/
|
||||
#define SND_DLSYM_BUILD_VERSION(name, version) char __SND_DLSYM_VERSION(name, version);
|
||||
|
||||
#else /* static build */
|
||||
|
|
@ -60,9 +66,12 @@ struct snd_dlsym_link {
|
|||
|
||||
extern struct snd_dlsym_link *snd_dlsym_start;
|
||||
|
||||
/** helper macro for SND_DLSYM_BUILD_VERSION \hideinitializer */
|
||||
/** \hideinitializer \brief Helper macro for #SND_DLSYM_BUILD_VERSION. */
|
||||
#define __SND_DLSYM_VERSION(prefix, name, version) _ ## prefix ## name ## version
|
||||
/** build version for versioned dynamic symbol \hideinitializer */
|
||||
/**
|
||||
* \hideinitializer
|
||||
* \brief Appends the build version to the name of a versioned dynamic symbol.
|
||||
*/
|
||||
#define SND_DLSYM_BUILD_VERSION(name, version) \
|
||||
static struct snd_dlsym_link __SND_DLSYM_VERSION(snd_dlsym_, name, version); \
|
||||
void __SND_DLSYM_VERSION(snd_dlsym_constructor_, name, version) (void) __attribute__ ((constructor)); \
|
||||
|
|
@ -75,7 +84,7 @@ extern struct snd_dlsym_link *snd_dlsym_start;
|
|||
|
||||
#endif
|
||||
|
||||
/** get version of dynamic symbol as string */
|
||||
/** \brief Returns the version of a dynamic symbol as a string. */
|
||||
#define SND_DLSYM_VERSION(version) __STRING(version)
|
||||
|
||||
void *snd_dlopen(const char *file, int mode);
|
||||
|
|
@ -83,10 +92,19 @@ void *snd_dlsym(void *handle, const char *name, const char *version);
|
|||
int snd_dlclose(void *handle);
|
||||
|
||||
|
||||
/** Async notification client handler */
|
||||
/**
|
||||
* \brief Internal structure for an async notification client handler.
|
||||
*
|
||||
* The ALSA library uses a pointer to this structure as a handle to an async
|
||||
* notification object. Applications don't access its contents directly.
|
||||
*/
|
||||
typedef struct _snd_async_handler snd_async_handler_t;
|
||||
|
||||
/** Async notification callback */
|
||||
/**
|
||||
* \brief Async notification callback.
|
||||
*
|
||||
* See the #snd_async_add_handler function for details.
|
||||
*/
|
||||
typedef void (*snd_async_callback_t)(snd_async_handler_t *handler);
|
||||
|
||||
int snd_async_add_handler(snd_async_handler_t **handler, int fd,
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@
|
|||
* \date 1998-2001
|
||||
*
|
||||
* Application interface library for the ALSA driver
|
||||
*
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as
|
||||
* published by the Free Software Foundation; either version 2.1 of
|
||||
|
|
@ -34,18 +34,30 @@ extern "C" {
|
|||
|
||||
/**
|
||||
* \defgroup Input Input Interface
|
||||
* Input Interface
|
||||
*
|
||||
* The input functions present an interface similar to the stdio functions
|
||||
* on top of different underlying input sources.
|
||||
*
|
||||
* The #snd_config_load function uses such an input handle to be able to
|
||||
* load configurations not only from standard files but also from other
|
||||
* sources, e.g. from memory buffers.
|
||||
*
|
||||
* \{
|
||||
*/
|
||||
|
||||
/** Input handle */
|
||||
/**
|
||||
* \brief Internal structure for an input object.
|
||||
*
|
||||
* The ALSA library uses a pointer to this structure as a handle to an
|
||||
* input object. Applications don't access its contents directly.
|
||||
*/
|
||||
typedef struct _snd_input snd_input_t;
|
||||
|
||||
/** Input type */
|
||||
/** Input type. */
|
||||
typedef enum _snd_input_type {
|
||||
/** Input from a stdio stream */
|
||||
/** Input from a stdio stream. */
|
||||
SND_INPUT_STDIO,
|
||||
/** Input from a memory buffer */
|
||||
/** Input from a memory buffer. */
|
||||
SND_INPUT_BUFFER
|
||||
} snd_input_type_t;
|
||||
|
||||
|
|
@ -53,7 +65,11 @@ int snd_input_stdio_open(snd_input_t **inputp, const char *file, const char *mod
|
|||
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);
|
||||
int snd_input_close(snd_input_t *input);
|
||||
int snd_input_scanf(snd_input_t *input, const char *format, ...) __attribute__ ((format (scanf, 2, 3)));
|
||||
int snd_input_scanf(snd_input_t *input, const char *format, ...)
|
||||
#ifndef DOC_HIDDEN
|
||||
__attribute__ ((format (scanf, 2, 3)))
|
||||
#endif
|
||||
;
|
||||
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);
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@
|
|||
* \date 1998-2001
|
||||
*
|
||||
* Application interface library for the ALSA driver
|
||||
*
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as
|
||||
* published by the Free Software Foundation; either version 2.1 of
|
||||
|
|
@ -34,18 +34,30 @@ extern "C" {
|
|||
|
||||
/**
|
||||
* \defgroup Output Output Interface
|
||||
* Output Interface
|
||||
*
|
||||
* The output functions present an interface similar to the stdio functions
|
||||
* on top of different underlying output destinations.
|
||||
*
|
||||
* Many PCM debugging functions (\c snd_pcm_xxx_dump_xxx) use such an output
|
||||
* handle to be able to write not only to the screen but also to other
|
||||
* destinations, e.g. to files or to memory buffers.
|
||||
*
|
||||
* \{
|
||||
*/
|
||||
|
||||
/** Output handle */
|
||||
/**
|
||||
* \brief Internal structure for an output object.
|
||||
*
|
||||
* The ALSA library uses a pointer to this structure as a handle to an
|
||||
* output object. Applications don't access its contents directly.
|
||||
*/
|
||||
typedef struct _snd_output snd_output_t;
|
||||
|
||||
/** Output type */
|
||||
/** Output type. */
|
||||
typedef enum _snd_output_type {
|
||||
/** Output to a stdio stream */
|
||||
/** Output to a stdio stream. */
|
||||
SND_OUTPUT_STDIO,
|
||||
/** Output to a memory buffer */
|
||||
/** Output to a memory buffer. */
|
||||
SND_OUTPUT_BUFFER
|
||||
} snd_output_type_t;
|
||||
|
||||
|
|
@ -54,7 +66,11 @@ int snd_output_stdio_attach(snd_output_t **outputp, FILE *fp, int _close);
|
|||
int snd_output_buffer_open(snd_output_t **outputp);
|
||||
size_t snd_output_buffer_string(snd_output_t *output, char **buf);
|
||||
int snd_output_close(snd_output_t *output);
|
||||
int snd_output_printf(snd_output_t *output, const char *format, ...) __attribute__ ((format (printf, 2, 3)));
|
||||
int snd_output_printf(snd_output_t *output, const char *format, ...)
|
||||
#ifndef DOC_HIDDEN
|
||||
__attribute__ ((format (printf, 2, 3)))
|
||||
#endif
|
||||
;
|
||||
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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue