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

@ -1,4 +1,4 @@
SUBDIRS=control mixer simple_mixer pcm simple_pcm rawmidi timer hwdep seq instr compat conf
SUBDIRS=control mixer ordinary_mixer pcm ordinary_pcm rawmidi timer hwdep seq instr compat conf
EXTRA_DIST=Versions
COMPATNUM=@LIBTOOL_VERSION_INFO@
@ -10,9 +10,9 @@ endif
lib_LTLIBRARIES = libasound.la
libasound_la_SOURCES = conf.c confmisc.c input.c output.c async.c error.c dlmisc.c socket.c shmarea.c
libasound_la_LIBADD = control/libcontrol.la
mixer/libmixer.la simple_mixer/libsimplemixer.la \
pcm/libpcm.la simple_pcm/libsimplepcm.la \
libasound_la_LIBADD = control/libcontrol.la \
mixer/libmixer.la ordinary_mixer/libordinarymixer.la \
pcm/libpcm.la ordinary_pcm/libordinarypcm.la \
rawmidi/librawmidi.la timer/libtimer.la \
hwdep/libhwdep.la seq/libseq.la instr/libinstr.la \
compat/libcompat.la -lm -ldl -lpthread
@ -26,14 +26,14 @@ control/libcontrol.la:
mixer/libmixer.la:
$(MAKE) -C mixer libmixer.la
simple_mixer/libsimplemixer.la:
$(MAKE) -C simple_mixer libsimplemixer.la
ordinary_mixer/libordinarymixer.la:
$(MAKE) -C ordinary_mixer libordinarymixer.la
pcm/libpcm.la:
$(MAKE) -C pcm libpcm.la
simple_pcm/libsimplepcm.la:
$(MAKE) -C simple_pcm libsimplepcm.la
ordinary_pcm/libordinarypcm.la:
$(MAKE) -C ordinary_pcm libordinarypcm.la
rawmidi/librawmidi.la:
$(MAKE) -C rawmidi librawmidi.la

View file

@ -0,0 +1,13 @@
SUBDIRS =
DIST_SUBDIRS =
EXTRA_LTLIBRARIES = libordinarymixer.la
libordinarymixer_la_SOURCES = ordinary_mixer.c
noinst_HEADERS =
alsadir = $(datadir)/alsa
all: libordinarymixer.la
INCLUDES=-I$(top_srcdir)/include

View file

@ -1,17 +1,17 @@
/**
* \file simple_mixer/simple_mixer.c
* \ingroup Mixer_simple
* \brief Simple mixer interface
* \file ordinary_mixer/ordinary_mixer.c
* \ingroup Mixer_ordinary
* \brief Ordinary mixer interface
* \author Jaroslav Kysela <perex@suse.cz>
* \date 2003
*
* Simple mixer interface is a high level abtraction for soundcard's
* Ordinary mixer interface is a high level abtraction for soundcard's
* mixing.
*
* See the \ref Mixer_simple page for more details.
* See the \ref Mixer_ordinary page for more details.
*/
/*
* Simple Mixer Interface - main file
* Ordinary Mixer Interface - main file
* Copyright (c) 2003 by Jaroslav Kysela <perex@suse.cz>
*
* This library is free software; you can redistribute it and/or modify
@ -30,18 +30,18 @@
*
*/
/*! \page Mixer_simple Simple mixer interface
/*! \page Mixer_ordinary Ordinary mixer interface
<P>Write something here</P>
\section Mixer_simple_overview
\section Mixer_ordinary_overview
Write something here
*/
/**
* \example ../test/simple_mixer.c
* \anchor example_simple_mixer
* \example ../test/ordinary_mixer.c
* \anchor example_ordinary_mixer
*/
#include <stdio.h>
@ -56,21 +56,21 @@ Write something here
#include <sys/mman.h>
#include <limits.h>
#include "local.h"
#include "mixer_simple.h"
#include "mixer_ordinary.h"
struct snds_mixer {
struct sndo_mixer {
snd_mixer_t *mixer;
};
/**
* \brief Opens a simple mixer instance
* \param pmixer Returned simple mixer handle
* \param playback_name ASCII identifier of the simple mixer handle (playback controls)
* \param capture_name ASCII identifier of the simple mixer handle (capture controls)
* \brief Opens a ordinary mixer instance
* \param pmixer Returned ordinary mixer handle
* \param playback_name ASCII identifier of the ordinary mixer handle (playback controls)
* \param capture_name ASCII identifier of the ordinary mixer handle (capture controls)
* \param lconf Local configuration (might be NULL - use global configuration)
* \return 0 on success otherwise a negative error code
*/
int snds_mixer_open(snds_mixer_t **pmixer,
int sndo_mixer_open(sndo_mixer_t **pmixer,
const char *playback_name,
const char *capture_name,
snd_config_t *lconf)
@ -80,82 +80,82 @@ int snds_mixer_open(snds_mixer_t **pmixer,
}
/**
* \brief Closes a simple mixer instance
* \param mixer Simple mixer handle to close
* \brief Closes a ordinary mixer instance
* \param mixer Ordinary mixer handle to close
* \return 0 on success otherwise a negative error code
*/
int snds_mixer_close(snds_mixer_t *mixer)
int sndo_mixer_close(sndo_mixer_t *mixer)
{
return -ENODEV;
}
/**
* \brief get count of poll descriptors for simple mixer handle
* \param mixer simple mixer handle
* \brief get count of poll descriptors for ordinary mixer handle
* \param mixer ordinary mixer handle
* \return count of poll descriptors
*/
int snds_mixer_poll_descriptors_count(snds_mixer_t *mixer)
int sndo_mixer_poll_descriptors_count(sndo_mixer_t *mixer)
{
return snd_mixer_poll_descriptors_count(mixer->mixer);
}
/**
* \brief get poll descriptors
* \param mixer simple mixer handle
* \param mixer ordinary mixer handle
* \param pfds array of poll descriptors
* \param space space in the poll descriptor array
* \return count of filled descriptors
*/
int snds_mixer_poll_descriptors(snds_mixer_t *mixer, struct pollfd *pfds, unsigned int space)
int sndo_mixer_poll_descriptors(sndo_mixer_t *mixer, struct pollfd *pfds, unsigned int space)
{
return snd_mixer_poll_descriptors(mixer->mixer, pfds, space);
}
/**
* \brief get returned events from poll descriptors
* \param mixer simple mixer handle
* \param mixer ordinary mixer handle
* \param pfds array of poll descriptors
* \param nfds count of poll descriptors
* \param revents returned events
* \return zero if success, otherwise a negative error code
*/
int snds_mixer_poll_descriptors_revents(snds_mixer_t *mixer, struct pollfd *pfds, unsigned int nfds, unsigned short *revents)
int sndo_mixer_poll_descriptors_revents(sndo_mixer_t *mixer, struct pollfd *pfds, unsigned int nfds, unsigned short *revents)
{
return snd_mixer_poll_descriptors_revents(mixer->mixer, pfds, nfds, revents);
}
/**
* \brief get simple mixer io control value
* \param mixer simple mixer handle
* \brief get ordinary mixer io control value
* \param mixer ordinary mixer handle
* \param type io type
* \param val returned value
* \return zero if success, otherwise a negative error code
*/
int snds_mixer_io_get(snds_mixer_t *mixer, enum snds_mixer_io_type type, int *val)
int sndo_mixer_io_get(sndo_mixer_t *mixer, enum sndo_mixer_io_type type, int *val)
{
return -ENODEV;
}
/**
* \brief set simple mixer io control value
* \param mixer simple mixer handle
* \brief set ordinary mixer io control value
* \param mixer ordinary mixer handle
* \param type io type
* \param val desired value
* \return zero if success, otherwise a negative error code
*/
int snds_mixer_io_set(snds_mixer_t *mixer, enum snds_mixer_io_type type, int val)
int sndo_mixer_io_set(sndo_mixer_t *mixer, enum sndo_mixer_io_type type, int val)
{
return -ENODEV;
}
/**
* \brief get simple mixer io control change notification
* \param mixer simple mixer handle
* \brief get ordinary mixer io control change notification
* \param mixer ordinary mixer handle
* \param changed list of changed io types
* \param changed_array_size size of list of changed io types
* \return zero if success, otherwise a negative error code
*/
int snds_mixer_io_change(snds_mixer_t *mixer, enum snds_mixer_io_type *changed, int changed_array_size)
int sndo_mixer_io_change(sndo_mixer_t *mixer, enum sndo_mixer_io_type *changed, int changed_array_size)
{
return -ENODEV;
}

View file

@ -1,13 +1,13 @@
SUBDIRS =
DIST_SUBDIRS =
EXTRA_LTLIBRARIES = libsimplemixer.la
EXTRA_LTLIBRARIES = libordinarypcm.la
libsimplemixer_la_SOURCES = simple_mixer.c
libordinarypcm_la_SOURCES = ordinary_pcm.c
noinst_HEADERS =
alsadir = $(datadir)/alsa
all: libsimplemixer.la
all: libordinarypcm.la
INCLUDES=-I$(top_srcdir)/include

View file

@ -1,17 +1,17 @@
/**
* \file simple_pcm/simple_pcm.c
* \ingroup PCM_simple
* \brief Simple PCM interface
* \file ordinary_pcm/ordinary_pcm.c
* \ingroup PCM_ordinary
* \brief Ordinary PCM interface
* \author Jaroslav Kysela <perex@suse.cz>
* \date 2003
*
* Simple PCM interface is a high level abtraction for
* Ordinary PCM interface is a high level abtraction for
* digital audio streaming.
*
* See the \ref PCM_simple page for more details.
* See the \ref PCM_ordinary page for more details.
*/
/*
* Simple PCM Interface - main file
* Ordinary PCM Interface - main file
* Copyright (c) 2003 by Jaroslav Kysela <perex@suse.cz>
*
* This library is free software; you can redistribute it and/or modify
@ -30,18 +30,18 @@
*
*/
/*! \page PCM_simple Simple PCM interface
/*! \page PCM_ordinary Ordinary PCM interface
<P>Write something here</P>
\section PCM_simple_overview
\section PCM_ordinary_overview
Write something here
*/
/**
* \example ../test/simple_pcm.c
* \anchor example_simple_pcm
* \example ../test/ordinary_pcm.c
* \anchor example_ordinary_pcm
*/
#include <stdio.h>
@ -56,23 +56,23 @@ Write something here
#include <sys/mman.h>
#include <limits.h>
#include "local.h"
#include "pcm_simple.h"
#include "pcm_ordinary.h"
struct snds_pcm {
struct sndo_pcm {
snd_pcm_t *playback;
snd_pcm_t *capture;
snd_pcm_t *master;
};
/**
* \brief Opens a simple pcm instance
* \param ppcm Returned simple pcm handle
* \param playback_name ASCII identifier of the simple pcm handle (playback)
* \param capture_name ASCII identifier of the simple pcm handle (capture)
* \brief Opens a ordinary pcm instance
* \param ppcm Returned ordinary pcm handle
* \param playback_name ASCII identifier of the ordinary pcm handle (playback)
* \param capture_name ASCII identifier of the ordinary pcm handle (capture)
* \param lconf Local configuration (might be NULL - use global configuration)
* \return 0 on success otherwise a negative error code
*/
int snds_pcm_open(snds_pcm_t **ppcm,
int sndo_pcm_open(sndo_pcm_t **ppcm,
const char *playback_name,
const char *capture_name,
snd_config_t *lconf)
@ -82,21 +82,21 @@ int snds_pcm_open(snds_pcm_t **ppcm,
}
/**
* \brief Closes a simple pcm instance
* \param pcm Simple pcm handle to close
* \brief Closes a ordinary pcm instance
* \param pcm Ordinary pcm handle to close
* \return 0 on success otherwise a negative error code
*/
int snds_pcm_close(snds_pcm_t *pcm)
int sndo_pcm_close(sndo_pcm_t *pcm)
{
return -ENODEV;
}
/**
* \brief get count of poll descriptors for simple pcm handle
* \param pcm simple pcm handle
* \brief get count of poll descriptors for ordinary pcm handle
* \param pcm ordinary pcm handle
* \return count of poll descriptors
*/
int snds_pcm_poll_descriptors_count(snds_pcm_t *pcm)
int sndo_pcm_poll_descriptors_count(sndo_pcm_t *pcm)
{
int err, res = 0;
@ -111,12 +111,12 @@ int snds_pcm_poll_descriptors_count(snds_pcm_t *pcm)
/**
* \brief get poll descriptors
* \param pcm simple pcm handle
* \param pcm ordinary pcm handle
* \param pfds array of poll descriptors
* \param space space in the poll descriptor array
* \return count of filled descriptors
*/
int snds_pcm_poll_descriptors(snds_pcm_t *pcm, struct pollfd *pfds, unsigned int space)
int sndo_pcm_poll_descriptors(sndo_pcm_t *pcm, struct pollfd *pfds, unsigned int space)
{
int playback, err, res = 0;
@ -138,13 +138,13 @@ int snds_pcm_poll_descriptors(snds_pcm_t *pcm, struct pollfd *pfds, unsigned int
/**
* \brief get returned events from poll descriptors
* \param pcm simple pcm handle
* \param pcm ordinary pcm handle
* \param pfds array of poll descriptors
* \param nfds count of poll descriptors
* \param revents returned events
* \return zero if success, otherwise a negative error code
*/
int snds_pcm_poll_descriptors_revents(snds_pcm_t *pcm, struct pollfd *pfds, unsigned int nfds, unsigned short *revents)
int sndo_pcm_poll_descriptors_revents(sndo_pcm_t *pcm, struct pollfd *pfds, unsigned int nfds, unsigned short *revents)
{
int playback, err;
unsigned short _revents;
@ -166,10 +166,10 @@ int snds_pcm_poll_descriptors_revents(snds_pcm_t *pcm, struct pollfd *pfds, unsi
/**
* \brief Start a PCM
* \param pcm simple PCM handle
* \param pcm ordinary PCM handle
* \return 0 on success otherwise a negative error code
*/
int snds_pcm_start(snds_pcm_t *pcm)
int sndo_pcm_start(sndo_pcm_t *pcm)
{
/* the streams are linked, so use only one stream */
return snd_pcm_start(pcm->master);
@ -177,10 +177,10 @@ int snds_pcm_start(snds_pcm_t *pcm)
/**
* \brief Stop a PCM dropping pending frames
* \param pcm simple PCM handle
* \param pcm ordinary PCM handle
* \return 0 on success otherwise a negative error code
*/
int snds_pcm_drop(snds_pcm_t *pcm)
int sndo_pcm_drop(sndo_pcm_t *pcm)
{
/* the streams are linked, so use only one stream */
return snd_pcm_drop(pcm->master);
@ -196,7 +196,7 @@ int snds_pcm_drop(snds_pcm_t *pcm)
* the PCM.
* For capture stop PCM permitting to retrieve residual frames.
*/
int snds_pcm_drain(snds_pcm_t *pcm)
int sndo_pcm_drain(sndo_pcm_t *pcm)
{
/* the streams are linked, so use only one stream */
return snd_pcm_drain(pcm->master);
@ -204,7 +204,7 @@ int snds_pcm_drain(snds_pcm_t *pcm)
/**
* \brief Obtain delay for a running PCM handle
* \param pcm simple PCM handle
* \param pcm ordinary PCM handle
* \param delayp Returned delay in frames
* \return 0 on success otherwise a negative error code
*
@ -214,7 +214,7 @@ int snds_pcm_drain(snds_pcm_t *pcm)
* negative on playback underrun and greater than buffer size on
* capture overrun.
*/
int snds_pcm_delay(snds_pcm_t *pcm, snd_pcm_sframes_t *delayp)
int sndo_pcm_delay(sndo_pcm_t *pcm, snd_pcm_sframes_t *delayp)
{
int err = 0;
snd_pcm_sframes_t pdelay, cdelay;
@ -237,7 +237,7 @@ int snds_pcm_delay(snds_pcm_t *pcm, snd_pcm_sframes_t *delayp)
/**
* \brief Resume from suspend, no samples are lost
* \param pcm simple PCM handle
* \param pcm ordinary PCM handle
* \return 0 on success otherwise a negative error code
* \retval -EAGAIN resume can't be proceed immediately (audio hardware is probably still suspended)
* \retval -ENOSYS hardware doesn't support this feature
@ -247,20 +247,20 @@ int snds_pcm_delay(snds_pcm_t *pcm, snd_pcm_sframes_t *delayp)
* this feature, when an -ENOSYS error is returned, use the snd_pcm_prepare
* function to recovery.
*/
int snds_pcm_resume(snds_pcm_t *pcm)
int sndo_pcm_resume(sndo_pcm_t *pcm)
{
return snd_pcm_resume(pcm->master);
}
/**
* \brief Wait for a PCM to become ready
* \param pcm simple PCM handle
* \param pcm ordinary PCM handle
* \param timeout maximum time in milliseconds to wait
* \return a positive value on success otherwise a negative error code
* \retval 0 timeout occurred
* \retval 1 PCM stream is ready for I/O
*/
int snds_pcm_wait(snds_pcm_t *pcm, int timeout)
int sndo_pcm_wait(sndo_pcm_t *pcm, int timeout)
{
struct pollfd pfd[2];
unsigned short p_revents, c_revents;
@ -295,90 +295,90 @@ int snds_pcm_wait(snds_pcm_t *pcm, int timeout)
/**
* \brief Get raw (lowlevel) playback PCM handle
* \param pcm simple PCM handle
* \param pcm ordinary PCM handle
* \return raw (lowlevel) capture PCM handle or NULL
*/
snd_pcm_t *snds_pcm_raw_playback(snds_pcm_t *pcm)
snd_pcm_t *sndo_pcm_raw_playback(sndo_pcm_t *pcm)
{
return pcm->playback;
}
/**
* \brief Get raw (lowlevel) capture PCM handle
* \param pcm simple PCM handle
* \param pcm ordinary PCM handle
* \return raw (lowlevel) capture PCM handle or NULL
*/
snd_pcm_t *snds_pcm_raw_capture(snds_pcm_t *pcm)
snd_pcm_t *sndo_pcm_raw_capture(sndo_pcm_t *pcm)
{
return pcm->capture;
}
int snds_pcm_param_rate(snds_pcm_t *pcm, unsigned int rate, unsigned int *used_rate)
int sndo_pcm_param_rate(sndo_pcm_t *pcm, unsigned int rate, unsigned int *used_rate)
{
return -EIO;
}
int snds_pcm_param_channels(snds_pcm_t *pcm, unsigned int channels, unsigned int *used_channels)
int sndo_pcm_param_channels(sndo_pcm_t *pcm, unsigned int channels, unsigned int *used_channels)
{
return -EIO;
}
int snds_pcm_param_format(snds_pcm_t *pcm, snd_pcm_format_t format, snd_pcm_subformat_t subformat)
int sndo_pcm_param_format(sndo_pcm_t *pcm, snd_pcm_format_t format, snd_pcm_subformat_t subformat)
{
return -EIO;
}
int snds_pcm_param_latency(snds_pcm_t *pcm, enum snds_pcm_latency_type latency)
int sndo_pcm_param_latency(sndo_pcm_t *pcm, enum sndo_pcm_latency_type latency)
{
return -EIO;
}
int snds_pcm_param_access(snds_pcm_t *pcm, enum snds_pcm_access_type access)
int sndo_pcm_param_access(sndo_pcm_t *pcm, enum sndo_pcm_access_type access)
{
return -EIO;
}
int snds_pcm_param_xrun(snds_pcm_t *pcm, enum snds_pcm_xrun_type xrun)
int sndo_pcm_param_xrun(sndo_pcm_t *pcm, enum sndo_pcm_xrun_type xrun)
{
return -EIO;
}
int snds_pcm_pio_ibegin(snds_pcm_t *pcm, void *ring_buffer, snd_pcm_uframes_t *frames)
int sndo_pcm_pio_ibegin(sndo_pcm_t *pcm, void *ring_buffer, snd_pcm_uframes_t *frames)
{
return -EIO;
}
int snds_pcm_pio_iend(snds_pcm_t *pcm, snd_pcm_uframes_t frames)
int sndo_pcm_pio_iend(sndo_pcm_t *pcm, snd_pcm_uframes_t frames)
{
return -EIO;
}
int snds_pcm_pio_nbegin(snds_pcm_t *pcm, void **ring_buffer, snd_pcm_uframes_t *frames)
int sndo_pcm_pio_nbegin(sndo_pcm_t *pcm, void **ring_buffer, snd_pcm_uframes_t *frames)
{
return -EIO;
}
int snds_pcm_pio_nend(snds_pcm_t *pcm, snd_pcm_uframes_t frames)
int sndo_pcm_pio_nend(sndo_pcm_t *pcm, snd_pcm_uframes_t frames)
{
return -EIO;
}
int snds_pcm_cio_ibegin(snds_pcm_t *pcm, void *ring_buffer, snd_pcm_uframes_t *frames)
int sndo_pcm_cio_ibegin(sndo_pcm_t *pcm, void *ring_buffer, snd_pcm_uframes_t *frames)
{
return -EIO;
}
int snds_pcm_cio_iend(snds_pcm_t *pcm, snd_pcm_uframes_t frames)
int sndo_pcm_cio_iend(sndo_pcm_t *pcm, snd_pcm_uframes_t frames)
{
return -EIO;
}
int snds_pcm_cio_nbegin(snds_pcm_t *pcm, void **ring_buffer, snd_pcm_uframes_t *frames)
int sndo_pcm_cio_nbegin(sndo_pcm_t *pcm, void **ring_buffer, snd_pcm_uframes_t *frames)
{
return -EIO;
}
int snds_pcm_cio_nend(snds_pcm_t *pcm, snd_pcm_uframes_t frames)
int sndo_pcm_cio_nend(sndo_pcm_t *pcm, snd_pcm_uframes_t frames)
{
return -EIO;
}

View file

@ -1,13 +0,0 @@
SUBDIRS =
DIST_SUBDIRS =
EXTRA_LTLIBRARIES = libsimplepcm.la
libsimplepcm_la_SOURCES = simple_pcm.c
noinst_HEADERS =
alsadir = $(datadir)/alsa
all: libsimplepcm.la
INCLUDES=-I$(top_srcdir)/include