alsa: use snd_pcm_sframes_t instead of int
snd_pcm_writei() returns the type snd_pcm_sframes_t, not int. Use the correct variable type.
This commit is contained in:
parent
855054fee1
commit
cff29f5e86
@ -490,12 +490,11 @@ static size_t
|
|||||||
alsa_play(void *data, const void *chunk, size_t size, GError **error)
|
alsa_play(void *data, const void *chunk, size_t size, GError **error)
|
||||||
{
|
{
|
||||||
struct alsa_data *ad = data;
|
struct alsa_data *ad = data;
|
||||||
int ret;
|
|
||||||
|
|
||||||
size /= ad->frame_size;
|
size /= ad->frame_size;
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
ret = ad->writei(ad->pcm, chunk, size);
|
snd_pcm_sframes_t ret = ad->writei(ad->pcm, chunk, size);
|
||||||
if (ret > 0)
|
if (ret > 0)
|
||||||
return ret * ad->frame_size;
|
return ret * ad->frame_size;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user