mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-10 13:30:01 -05:00
Fixed return value
This commit is contained in:
parent
31c7d12284
commit
22b1b2a64d
3 changed files with 7 additions and 3 deletions
|
|
@ -86,6 +86,8 @@ static ssize_t block_transfer(snd_pcm_plugin_t *plugin,
|
|||
}
|
||||
result = snd_pcm_readv(plugin->handle, vec, count);
|
||||
}
|
||||
if (result < 0)
|
||||
return result;
|
||||
return snd_pcm_plugin_dst_size_to_samples(plugin, result);
|
||||
} else {
|
||||
return -EINVAL;
|
||||
|
|
|
|||
|
|
@ -87,6 +87,8 @@ static ssize_t stream_transfer(snd_pcm_plugin_t *plugin,
|
|||
}
|
||||
result = snd_pcm_readv(plugin->handle, vec, count);
|
||||
}
|
||||
if (result < 0)
|
||||
return result;
|
||||
return snd_pcm_plugin_dst_size_to_samples(plugin, result);
|
||||
} else {
|
||||
return -EINVAL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue