mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
Renamed stop -> drop in API
This commit is contained in:
parent
ebae7ebeb2
commit
057f56de06
10 changed files with 21 additions and 24 deletions
|
|
@ -386,8 +386,8 @@ int pcm_shm_cmd(client_t *client)
|
|||
case SND_PCM_IOCTL_DRAIN:
|
||||
ctrl->result = snd_pcm_drain(pcm);
|
||||
break;
|
||||
case SND_PCM_IOCTL_STOP:
|
||||
ctrl->result = snd_pcm_stop(pcm);
|
||||
case SND_PCM_IOCTL_DROP:
|
||||
ctrl->result = snd_pcm_drop(pcm);
|
||||
break;
|
||||
case SND_PCM_IOCTL_PAUSE:
|
||||
ctrl->result = snd_pcm_pause(pcm, ctrl->u.pause);
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ int snd_pcm_channel_setup(snd_pcm_t *handle, snd_pcm_channel_setup_t *setup);
|
|||
int snd_pcm_status(snd_pcm_t *handle, snd_pcm_status_t *status);
|
||||
int snd_pcm_prepare(snd_pcm_t *handle);
|
||||
int snd_pcm_start(snd_pcm_t *handle);
|
||||
int snd_pcm_stop(snd_pcm_t *handle);
|
||||
int snd_pcm_drop(snd_pcm_t *handle);
|
||||
int snd_pcm_drain(snd_pcm_t *handle);
|
||||
int snd_pcm_pause(snd_pcm_t *handle, int enable);
|
||||
int snd_pcm_state(snd_pcm_t *handle);
|
||||
|
|
|
|||
|
|
@ -185,10 +185,10 @@ int snd_pcm_start(snd_pcm_t *pcm)
|
|||
return pcm->fast_ops->start(pcm->fast_op_arg);
|
||||
}
|
||||
|
||||
int snd_pcm_stop(snd_pcm_t *pcm)
|
||||
int snd_pcm_drop(snd_pcm_t *pcm)
|
||||
{
|
||||
assert(pcm);
|
||||
return pcm->fast_ops->stop(pcm->fast_op_arg);
|
||||
return pcm->fast_ops->drop(pcm->fast_op_arg);
|
||||
}
|
||||
|
||||
int snd_pcm_drain(snd_pcm_t *pcm)
|
||||
|
|
@ -411,7 +411,7 @@ static assoc_t starts[] = { START(EXPLICIT), START(DATA), END };
|
|||
static assoc_t readys[] = { READY(FRAGMENT), READY(ASAP), END };
|
||||
static assoc_t xfers[] = { XFER(INTERLEAVED), XFER(NONINTERLEAVED), END };
|
||||
static assoc_t mmaps[] = { MMAP(INTERLEAVED), MMAP(NONINTERLEAVED), END };
|
||||
static assoc_t xrun_acts[] = { XRUN_ACT(STOP), XRUN_ACT(DROP), END };
|
||||
static assoc_t xrun_acts[] = { XRUN_ACT(DRAIN), XRUN_ACT(DROP), END };
|
||||
static assoc_t onoff[] = { {0, "OFF", NULL}, {1, "ON", NULL}, {-1, "ON", NULL}, END };
|
||||
|
||||
int snd_pcm_dump_setup(snd_pcm_t *pcm, FILE *fp)
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@
|
|||
#include <sys/socket.h>
|
||||
#include <sys/poll.h>
|
||||
#include <sys/un.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/mman.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netdb.h>
|
||||
|
|
@ -171,9 +170,8 @@ static int snd_pcm_client_shm_close(snd_pcm_t *pcm)
|
|||
return result;
|
||||
}
|
||||
|
||||
static int snd_pcm_client_shm_nonblock(snd_pcm_t *pcm, int nonblock)
|
||||
static int snd_pcm_client_shm_nonblock(snd_pcm_t *pcm ATTRIBUTE_UNUSED, int nonblock ATTRIBUTE_UNUSED)
|
||||
{
|
||||
/* FIXME */
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -350,12 +348,12 @@ static int snd_pcm_client_shm_start(snd_pcm_t *pcm)
|
|||
return ctrl->result;
|
||||
}
|
||||
|
||||
static int snd_pcm_client_shm_stop(snd_pcm_t *pcm)
|
||||
static int snd_pcm_client_shm_drop(snd_pcm_t *pcm)
|
||||
{
|
||||
snd_pcm_client_t *client = pcm->private;
|
||||
snd_pcm_client_shm_t *ctrl = client->u.shm.ctrl;
|
||||
int err;
|
||||
ctrl->cmd = SND_PCM_IOCTL_STOP;
|
||||
ctrl->cmd = SND_PCM_IOCTL_DROP;
|
||||
err = snd_pcm_client_shm_action(pcm);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
|
@ -566,7 +564,7 @@ struct snd_pcm_fast_ops snd_pcm_client_fast_ops = {
|
|||
delay: snd_pcm_client_shm_delay,
|
||||
prepare: snd_pcm_client_shm_prepare,
|
||||
start: snd_pcm_client_shm_start,
|
||||
stop: snd_pcm_client_shm_stop,
|
||||
drop: snd_pcm_client_shm_drop,
|
||||
drain: snd_pcm_client_shm_drain,
|
||||
pause: snd_pcm_client_shm_pause,
|
||||
rewind: snd_pcm_client_shm_rewind,
|
||||
|
|
|
|||
|
|
@ -104,10 +104,10 @@ static int snd_pcm_file_start(snd_pcm_t *pcm)
|
|||
return snd_pcm_start(file->slave);
|
||||
}
|
||||
|
||||
static int snd_pcm_file_stop(snd_pcm_t *pcm)
|
||||
static int snd_pcm_file_drop(snd_pcm_t *pcm)
|
||||
{
|
||||
snd_pcm_file_t *file = pcm->private;
|
||||
return snd_pcm_stop(file->slave);
|
||||
return snd_pcm_drop(file->slave);
|
||||
}
|
||||
|
||||
static int snd_pcm_file_drain(snd_pcm_t *pcm)
|
||||
|
|
@ -340,7 +340,7 @@ struct snd_pcm_fast_ops snd_pcm_file_fast_ops = {
|
|||
delay: snd_pcm_file_delay,
|
||||
prepare: snd_pcm_file_prepare,
|
||||
start: snd_pcm_file_start,
|
||||
stop: snd_pcm_file_stop,
|
||||
drop: snd_pcm_file_drop,
|
||||
drain: snd_pcm_file_drain,
|
||||
pause: snd_pcm_file_pause,
|
||||
rewind: snd_pcm_file_rewind,
|
||||
|
|
|
|||
|
|
@ -198,11 +198,11 @@ static int snd_pcm_hw_start(snd_pcm_t *pcm)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int snd_pcm_hw_stop(snd_pcm_t *pcm)
|
||||
static int snd_pcm_hw_drop(snd_pcm_t *pcm)
|
||||
{
|
||||
snd_pcm_hw_t *hw = pcm->private;
|
||||
int fd = hw->fd;
|
||||
if (ioctl(fd, SND_PCM_IOCTL_STOP) < 0)
|
||||
if (ioctl(fd, SND_PCM_IOCTL_DROP) < 0)
|
||||
return -errno;
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -453,7 +453,7 @@ struct snd_pcm_fast_ops snd_pcm_hw_fast_ops = {
|
|||
delay: snd_pcm_hw_delay,
|
||||
prepare: snd_pcm_hw_prepare,
|
||||
start: snd_pcm_hw_start,
|
||||
stop: snd_pcm_hw_stop,
|
||||
drop: snd_pcm_hw_drop,
|
||||
drain: snd_pcm_hw_drain,
|
||||
pause: snd_pcm_hw_pause,
|
||||
rewind: snd_pcm_hw_rewind,
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ struct snd_pcm_fast_ops {
|
|||
int (*status)(snd_pcm_t *pcm, snd_pcm_status_t *status);
|
||||
int (*prepare)(snd_pcm_t *pcm);
|
||||
int (*start)(snd_pcm_t *pcm);
|
||||
int (*stop)(snd_pcm_t *pcm);
|
||||
int (*drop)(snd_pcm_t *pcm);
|
||||
int (*drain)(snd_pcm_t *pcm);
|
||||
int (*pause)(snd_pcm_t *pcm, int enable);
|
||||
int (*state)(snd_pcm_t *pcm);
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <sys/poll.h>
|
||||
#include <sys/uio.h>
|
||||
#include "pcm_local.h"
|
||||
|
||||
size_t snd_pcm_mmap_avail(snd_pcm_t *pcm)
|
||||
|
|
|
|||
|
|
@ -136,10 +136,10 @@ int snd_pcm_plugin_start(snd_pcm_t *pcm)
|
|||
return snd_pcm_start(plugin->slave);
|
||||
}
|
||||
|
||||
int snd_pcm_plugin_stop(snd_pcm_t *pcm)
|
||||
int snd_pcm_plugin_drop(snd_pcm_t *pcm)
|
||||
{
|
||||
snd_pcm_plugin_t *plugin = pcm->private;
|
||||
return snd_pcm_stop(plugin->slave);
|
||||
return snd_pcm_drop(plugin->slave);
|
||||
}
|
||||
|
||||
int snd_pcm_plugin_drain(snd_pcm_t *pcm)
|
||||
|
|
@ -396,7 +396,7 @@ struct snd_pcm_fast_ops snd_pcm_plugin_fast_ops = {
|
|||
delay: snd_pcm_plugin_delay,
|
||||
prepare: snd_pcm_plugin_prepare,
|
||||
start: snd_pcm_plugin_start,
|
||||
stop: snd_pcm_plugin_stop,
|
||||
drop: snd_pcm_plugin_drop,
|
||||
drain: snd_pcm_plugin_drain,
|
||||
pause: snd_pcm_plugin_pause,
|
||||
rewind: snd_pcm_plugin_rewind,
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ int snd_pcm_plugin_state(snd_pcm_t *pcm);
|
|||
int snd_pcm_plugin_delay(snd_pcm_t *pcm, ssize_t *delayp);
|
||||
int snd_pcm_plugin_prepare(snd_pcm_t *pcm);
|
||||
int snd_pcm_plugin_start(snd_pcm_t *pcm);
|
||||
int snd_pcm_plugin_stop(snd_pcm_t *pcm);
|
||||
int snd_pcm_plugin_drop(snd_pcm_t *pcm);
|
||||
int snd_pcm_plugin_drain(snd_pcm_t *pcm);
|
||||
int snd_pcm_plugin_pause(snd_pcm_t *pcm, int enable);
|
||||
ssize_t snd_pcm_plugin_rewind(snd_pcm_t *pcm, size_t frames);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue