mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-03 09:01:52 -05:00
New async notification API. Removed obsolete surround. Cleaning
This commit is contained in:
parent
57469ec597
commit
157f47aedd
35 changed files with 436 additions and 1581 deletions
|
|
@ -747,20 +747,13 @@ int snd_pcm_route_open(snd_pcm_t **pcmp, const char *name,
|
|||
route->plug.slave = slave;
|
||||
route->plug.close_slave = close_slave;
|
||||
|
||||
pcm = calloc(1, sizeof(snd_pcm_t));
|
||||
if (!pcm) {
|
||||
err = snd_pcm_new(&pcm, SND_PCM_TYPE_ROUTE, name, slave->stream, slave->mode);
|
||||
if (err < 0) {
|
||||
free(route);
|
||||
return -ENOMEM;
|
||||
return err;
|
||||
}
|
||||
if (name)
|
||||
pcm->name = strdup(name);
|
||||
pcm->type = SND_PCM_TYPE_ROUTE;
|
||||
pcm->stream = slave->stream;
|
||||
pcm->mode = slave->mode;
|
||||
pcm->ops = &snd_pcm_route_ops;
|
||||
pcm->op_arg = pcm;
|
||||
pcm->fast_ops = &snd_pcm_plugin_fast_ops;
|
||||
pcm->fast_op_arg = pcm;
|
||||
pcm->private_data = route;
|
||||
pcm->poll_fd = slave->poll_fd;
|
||||
pcm->hw_ptr = &route->plug.hw_ptr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue