Renamed simple_* to ordinary_* (name clash for simple mixer)

This commit is contained in:
Jaroslav Kysela 2003-06-22 19:02:19 +00:00
parent 7c72da4ae5
commit 4771213631
11 changed files with 284 additions and 284 deletions

View file

@ -9,7 +9,7 @@ alsainclude_HEADERS = asoundlib.h asoundef.h \
hwdep.h control.h mixer.h \
seq_event.h seq.h seqmid.h seq_midi_event.h \
conv.h instr.h iatomic.h \
pcm_simple.h mixer_simple.h
pcm_ordinary.h mixer_ordinary.h
noinst_HEADERS = sys.h search.h list.h aserver.h local.h alsa-symbols.h

View file

@ -1,11 +1,11 @@
/**
* \file <alsa/mixer_simple.h>
* \file <alsa/mixer_ordinary.h>
* \brief Application interface library for the ALSA driver
* \author Jaroslav Kysela <perex@suse.cz>
* \date 2003
*
* Application interface library for the ALSA driver.
* See the \ref mixer_simple page for more details.
* See the \ref mixer_ordinary page for more details.
*
*
* This library is free software; you can redistribute it and/or modify
@ -29,91 +29,91 @@
#include <alsa/asoundlib.h>
/** Simple Mixer latency type */
enum snds_mixer_io_type {
/** Ordinary Mixer latency type */
enum sndo_mixer_io_type {
/*
* playback section
*/
/** master volume - left (0-1000) */
SNDS_MIO_MASTER_LVOL = 0,
SNDO_MIO_MASTER_LVOL = 0,
/** master volume - right (0-1000) */
SNDS_MIO_MASTER_RVOL,
SNDO_MIO_MASTER_RVOL,
/** master volume - left mute (0 = off, 1 = on) */
SNDS_MIO_MASTER_LMUTE,
SNDO_MIO_MASTER_LMUTE,
/** master volume - right mute (0 = off, 1 = on) */
SNDS_MIO_MASTER_RMUTE,
SNDO_MIO_MASTER_RMUTE,
/** pcm volume - left (0-1000) */
SNDS_MIO_Mixer_LVOL,
SNDO_MIO_Mixer_LVOL,
/** pcm volume - right (0-1000) */
SNDS_MIO_Mixer_RVOL,
SNDO_MIO_Mixer_RVOL,
/** pcm volume - left mute (0 = off, 1 = on) */
SNDS_MIO_Mixer_LMUTE,
SNDO_MIO_Mixer_LMUTE,
/** pcm volume - right mute (0 = off, 1 = on) */
SNDS_MIO_Mixer_RMUTE,
SNDO_MIO_Mixer_RMUTE,
/** CD volume - left (0-1000) */
SNDS_MIO_CD_LVOL,
SNDO_MIO_CD_LVOL,
/** CD volume - right (0-1000) */
SNDS_MIO_CD_RVOL,
SNDO_MIO_CD_RVOL,
/** CD volume - left mute (0 = off, 1 = on) */
SNDS_MIO_CD_LMUTE,
SNDO_MIO_CD_LMUTE,
/** CD volume - right mute (0 = off, 1 = on) */
SNDS_MIO_CD_RMUTE,
SNDO_MIO_CD_RMUTE,
/** AUX volume - left (0-1000) */
SNDS_MIO_AUX_LVOL,
SNDO_MIO_AUX_LVOL,
/** CD volume - right (0-1000) */
SNDS_MIO_AUX_RVOL,
SNDO_MIO_AUX_RVOL,
/** CD volume - left mute (0 = off, 1 = on) */
SNDS_MIO_AUX_LMUTE,
SNDO_MIO_AUX_LMUTE,
/** CD volume - right mute (0 = off, 1 = on) */
SNDS_MIO_AUX_RMUTE,
SNDO_MIO_AUX_RMUTE,
/*
* capture section
*/
/** capture gain - left (0-1000) */
SNDS_MIO_CGAIN_LVOL = 0x1000,
SNDO_MIO_CGAIN_LVOL = 0x1000,
/** capture gain - right (0-1000) */
SNDS_MIO_CGAIN_RVOL,
SNDO_MIO_CGAIN_RVOL,
/** capture source - mic switch (0 = off, 1 = on) */
SNDS_MIO_CSOURCE_MIC = 0x1100,
SNDO_MIO_CSOURCE_MIC = 0x1100,
/** capture source - line switch (0 = off, 1 = on)*/
SNDS_MIO_CSOURCE_LINE,
SNDO_MIO_CSOURCE_LINE,
/** capture source - CD switch (0 = off, 1 = on) */
SNDS_MIO_CSOURCE_CD,
SNDO_MIO_CSOURCE_CD,
/** capture source - AUX switch (0 = off, 1 = on) */
SNDS_MIO_CSOURCE_AUX,
SNDO_MIO_CSOURCE_AUX,
/** capture source - mix switch (0 = off, 1 = on) */
SNDS_MIO_CSOURCE_MIX
SNDO_MIO_CSOURCE_MIX
};
typedef struct snds_mixer snds_mixer_t;
typedef struct sndo_mixer sndo_mixer_t;
#ifdef __cplusplus
extern "C" {
#endif
/**
* \defgroup Mixer_simple Mixer Simple Interface
* See the \ref mixer_simple page for more details.
* \defgroup Mixer_ordinary Mixer Ordinary Interface
* See the \ref mixer_ordinary page for more details.
* \{
*/
int snds_mixer_open(snds_mixer_t **pmixer, const char *playback_name, const char *capture_name, snd_config_t *lconf);
int snds_mixer_close(snds_mixer_t *mixer);
int snds_mixer_poll_descriptors_count(snds_mixer_t *mixer);
int snds_mixer_poll_descriptors(snds_mixer_t *mixer, struct pollfd *pfds, unsigned int space);
int snds_mixer_poll_descriptors_revents(snds_mixer_t *mixer, struct pollfd *pfds, unsigned int nfds, unsigned short *revents);
int snds_mixer_io_get(snds_mixer_t *mixer, enum snds_mixer_io_type type, int *val);
int snds_mixer_io_set(snds_mixer_t *mixer, enum snds_mixer_io_type type, int val);
int snds_mixer_io_change(snds_mixer_t *mixer, enum snds_mixer_io_type *changed, int changed_array_size);
int sndo_mixer_open(sndo_mixer_t **pmixer, const char *playback_name, const char *capture_name, snd_config_t *lconf);
int sndo_mixer_close(sndo_mixer_t *mixer);
int sndo_mixer_poll_descriptors_count(sndo_mixer_t *mixer);
int sndo_mixer_poll_descriptors(sndo_mixer_t *mixer, struct pollfd *pfds, unsigned int space);
int sndo_mixer_poll_descriptors_revents(sndo_mixer_t *mixer, struct pollfd *pfds, unsigned int nfds, unsigned short *revents);
int sndo_mixer_io_get(sndo_mixer_t *mixer, enum sndo_mixer_io_type type, int *val);
int sndo_mixer_io_set(sndo_mixer_t *mixer, enum sndo_mixer_io_type type, int val);
int sndo_mixer_io_change(sndo_mixer_t *mixer, enum sndo_mixer_io_type *changed, int changed_array_size);
/** \} */

127
include/pcm_ordinary.h Normal file
View file

@ -0,0 +1,127 @@
/**
* \file <alsa/pcm_ordinary.h>
* \brief Application interface library for the ALSA driver
* \author Jaroslav Kysela <perex@suse.cz>
* \date 2003
*
* Application interface library for the ALSA driver.
* See the \ref pcm_ordinary page for more details.
*
*
* 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
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#ifndef __ALSA_PCM_SIMPLE_H
#define __ALSA_PCM_SIMPLE_H
#include <alsa/asoundlib.h>
/** Ordinary PCM latency type */
enum sndo_pcm_latency_type {
/** normal latency - for standard playback or capture
(estimated latency in one direction 350ms) (default) */
SNDO_PCM_LATENCY_NORMAL = 0,
/** medium latency - software phones etc.
(estimated latency in one direction 50ms) */
SNDO_PCM_LATENCY_MEDIUM,
/** realtime latency - realtime applications (effect processors etc.)
(estimated latency in one direction 5ms) */
SNDO_PCM_LATENCY_REALTIME
};
/** Ordinary PCM access type */
enum sndo_pcm_access_type {
/** interleaved access - channels are interleaved without any gaps among samples (default) */
SNDO_PCM_ACCESS_INTERLEAVED = 0,
/** noninterleaved access - channels are separate without any gaps among samples */
SNDO_PCM_ACCESS_NONINTERLEAVED
};
/** Ordinary PCM xrun type */
enum sndo_pcm_xrun_type {
/** driver / library will ignore all xruns, the stream runs forever (default) */
SNDO_PCM_XRUN_IGNORE = 0,
/** driver / library stops the stream when an xrun occurs */
SNDO_PCM_XRUN_STOP
};
typedef struct sndo_pcm sndo_pcm_t;
#ifdef __cplusplus
extern "C" {
#endif
/**
* \defgroup PCM_ordinary PCM Ordinary Interface
* See the \ref pcm_ordinary page for more details.
* \{
*/
int sndo_pcm_open(sndo_pcm_t **pcm, const char *playback_name, const char *capture_name, snd_config_t *lconf);
int sndo_pcm_close(sndo_pcm_t *pcm);
int sndo_pcm_poll_descriptors_count(sndo_pcm_t *pcm);
int sndo_pcm_poll_descriptors(sndo_pcm_t *pcm, struct pollfd *pfds, unsigned int space);
int sndo_pcm_poll_descriptors_revents(sndo_pcm_t *pcm, struct pollfd *pfds, unsigned int nfds, unsigned short *revents);
int sndo_pcm_start(sndo_pcm_t *pcm);
int sndo_pcm_drop(sndo_pcm_t *pcm);
int sndo_pcm_drain(sndo_pcm_t *pcm);
int sndo_pcm_delay(sndo_pcm_t *pcm, snd_pcm_sframes_t *delayp);
int sndo_pcm_resume(sndo_pcm_t *pcm);
int sndo_pcm_wait(sndo_pcm_t *pcm, int timeout);
snd_pcm_t *sndo_pcm_raw_playback(sndo_pcm_t *pcm);
snd_pcm_t *sndo_pcm_raw_capture(sndo_pcm_t *pcm);
/**
* \defgroup PCM_ordinary_params Parameters Functions
* \ingroup PCM_ordinary
* See the \ref pcm_ordinary page for more details.
* \{
*/
int sndo_pcm_param_rate(sndo_pcm_t *pcm, unsigned int rate, unsigned int *used_rate);
int sndo_pcm_param_channels(sndo_pcm_t *pcm, unsigned int channels, unsigned int *used_channels);
int sndo_pcm_param_format(sndo_pcm_t *pcm, snd_pcm_format_t format, snd_pcm_subformat_t subformat);
int sndo_pcm_param_latency(sndo_pcm_t *pcm, enum sndo_pcm_latency_type latency);
int sndo_pcm_param_access(sndo_pcm_t *pcm, enum sndo_pcm_access_type access);
int sndo_pcm_param_xrun(sndo_pcm_t *pcm, enum sndo_pcm_xrun_type xrun);
/** \} */
/**
* \defgroup PCM_ordinary_access Ring Buffer I/O Functions
* \ingroup PCM_ordinary
* See the \ref pcm_ordinary page for more details.
* \{
*/
/* playback */
int sndo_pcm_pio_ibegin(sndo_pcm_t *pcm, void *ring_buffer, snd_pcm_uframes_t *frames);
int sndo_pcm_pio_iend(sndo_pcm_t *pcm, snd_pcm_uframes_t frames);
int sndo_pcm_pio_nbegin(sndo_pcm_t *pcm, void **ring_buffer, snd_pcm_uframes_t *frames);
int sndo_pcm_pio_nend(sndo_pcm_t *pcm, snd_pcm_uframes_t frames);
/* capture */
int sndo_pcm_cio_ibegin(sndo_pcm_t *pcm, void *ring_buffer, snd_pcm_uframes_t *frames);
int sndo_pcm_cio_iend(sndo_pcm_t *pcm, snd_pcm_uframes_t frames);
int sndo_pcm_cio_nbegin(sndo_pcm_t *pcm, void **ring_buffer, snd_pcm_uframes_t *frames);
int sndo_pcm_cio_nend(sndo_pcm_t *pcm, snd_pcm_uframes_t frames);
/** \} */
#ifdef __cplusplus
}
#endif
#endif /* __ALSA_PCM_SIMPLE_H */

View file

@ -1,127 +0,0 @@
/**
* \file <alsa/pcm_simple.h>
* \brief Application interface library for the ALSA driver
* \author Jaroslav Kysela <perex@suse.cz>
* \date 2003
*
* Application interface library for the ALSA driver.
* See the \ref pcm_simple page for more details.
*
*
* 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
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#ifndef __ALSA_PCM_SIMPLE_H
#define __ALSA_PCM_SIMPLE_H
#include <alsa/asoundlib.h>
/** Simple PCM latency type */
enum snds_pcm_latency_type {
/** normal latency - for standard playback or capture
(estimated latency in one direction 350ms) (default) */
SNDS_PCM_LATENCY_NORMAL = 0,
/** medium latency - software phones etc.
(estimated latency in one direction 50ms) */
SNDS_PCM_LATENCY_MEDIUM,
/** realtime latency - realtime applications (effect processors etc.)
(estimated latency in one direction 5ms) */
SNDS_PCM_LATENCY_REALTIME
};
/** Simple PCM access type */
enum snds_pcm_access_type {
/** interleaved access - channels are interleaved without any gaps among samples (default) */
SNDS_PCM_ACCESS_INTERLEAVED = 0,
/** noninterleaved access - channels are separate without any gaps among samples */
SNDS_PCM_ACCESS_NONINTERLEAVED
};
/** Simple PCM xrun type */
enum snds_pcm_xrun_type {
/** driver / library will ignore all xruns, the stream runs forever (default) */
SNDS_PCM_XRUN_IGNORE = 0,
/** driver / library stops the stream when an xrun occurs */
SNDS_PCM_XRUN_STOP
};
typedef struct snds_pcm snds_pcm_t;
#ifdef __cplusplus
extern "C" {
#endif
/**
* \defgroup PCM_simple PCM Simple Interface
* See the \ref pcm_simple page for more details.
* \{
*/
int snds_pcm_open(snds_pcm_t **pcm, const char *playback_name, const char *capture_name, snd_config_t *lconf);
int snds_pcm_close(snds_pcm_t *pcm);
int snds_pcm_poll_descriptors_count(snds_pcm_t *pcm);
int snds_pcm_poll_descriptors(snds_pcm_t *pcm, struct pollfd *pfds, unsigned int space);
int snds_pcm_poll_descriptors_revents(snds_pcm_t *pcm, struct pollfd *pfds, unsigned int nfds, unsigned short *revents);
int snds_pcm_start(snds_pcm_t *pcm);
int snds_pcm_drop(snds_pcm_t *pcm);
int snds_pcm_drain(snds_pcm_t *pcm);
int snds_pcm_delay(snds_pcm_t *pcm, snd_pcm_sframes_t *delayp);
int snds_pcm_resume(snds_pcm_t *pcm);
int snds_pcm_wait(snds_pcm_t *pcm, int timeout);
snd_pcm_t *snds_pcm_raw_playback(snds_pcm_t *pcm);
snd_pcm_t *snds_pcm_raw_capture(snds_pcm_t *pcm);
/**
* \defgroup PCM_simple_params Parameters Functions
* \ingroup PCM_simple
* See the \ref pcm_simple page for more details.
* \{
*/
int snds_pcm_param_rate(snds_pcm_t *pcm, unsigned int rate, unsigned int *used_rate);
int snds_pcm_param_channels(snds_pcm_t *pcm, unsigned int channels, unsigned int *used_channels);
int snds_pcm_param_format(snds_pcm_t *pcm, snd_pcm_format_t format, snd_pcm_subformat_t subformat);
int snds_pcm_param_latency(snds_pcm_t *pcm, enum snds_pcm_latency_type latency);
int snds_pcm_param_access(snds_pcm_t *pcm, enum snds_pcm_access_type access);
int snds_pcm_param_xrun(snds_pcm_t *pcm, enum snds_pcm_xrun_type xrun);
/** \} */
/**
* \defgroup PCM_simple_access Ring Buffer I/O Functions
* \ingroup PCM_simple
* See the \ref pcm_simple page for more details.
* \{
*/
/* playback */
int snds_pcm_pio_ibegin(snds_pcm_t *pcm, void *ring_buffer, snd_pcm_uframes_t *frames);
int snds_pcm_pio_iend(snds_pcm_t *pcm, snd_pcm_uframes_t frames);
int snds_pcm_pio_nbegin(snds_pcm_t *pcm, void **ring_buffer, snd_pcm_uframes_t *frames);
int snds_pcm_pio_nend(snds_pcm_t *pcm, snd_pcm_uframes_t frames);
/* capture */
int snds_pcm_cio_ibegin(snds_pcm_t *pcm, void *ring_buffer, snd_pcm_uframes_t *frames);
int snds_pcm_cio_iend(snds_pcm_t *pcm, snd_pcm_uframes_t frames);
int snds_pcm_cio_nbegin(snds_pcm_t *pcm, void **ring_buffer, snd_pcm_uframes_t *frames);
int snds_pcm_cio_nend(snds_pcm_t *pcm, snd_pcm_uframes_t frames);
/** \} */
#ifdef __cplusplus
}
#endif
#endif /* __ALSA_PCM_SIMPLE_H */