mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-04 13:30:08 -05:00
Fixed mmaped access..
This commit is contained in:
parent
8abf9370b5
commit
8328751e64
5 changed files with 15 additions and 39 deletions
|
|
@ -55,21 +55,6 @@ static ssize_t block_transfer(snd_pcm_plugin_t *plugin,
|
|||
}
|
||||
}
|
||||
|
||||
static int block_action(snd_pcm_plugin_t *plugin, snd_pcm_plugin_action_t action)
|
||||
{
|
||||
struct block_private_data *data;
|
||||
|
||||
if (plugin == NULL)
|
||||
return -EINVAL;
|
||||
data = (struct block_private_data *)snd_pcm_plugin_extra_data(plugin);
|
||||
if (action == DRAIN && data->channel == SND_PCM_CHANNEL_PLAYBACK) {
|
||||
return snd_pcm_drain_playback(data->pcm);
|
||||
} else if (action == FLUSH) {
|
||||
return snd_pcm_flush_channel(data->pcm, data->channel);
|
||||
}
|
||||
return 0; /* silenty ignore other actions */
|
||||
}
|
||||
|
||||
int snd_pcm_plugin_build_block(snd_pcm_t *pcm, int channel, snd_pcm_plugin_t **r_plugin)
|
||||
{
|
||||
struct block_private_data *data;
|
||||
|
|
@ -90,7 +75,6 @@ int snd_pcm_plugin_build_block(snd_pcm_t *pcm, int channel, snd_pcm_plugin_t **r
|
|||
data->pcm = pcm;
|
||||
data->channel = channel;
|
||||
plugin->transfer = block_transfer;
|
||||
plugin->action = block_action;
|
||||
*r_plugin = plugin;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue