mirror of
https://github.com/libretro/RetroArch
synced 2025-04-16 08:43:10 +00:00
Use av_samples_get_buffer_size.
This commit is contained in:
parent
9508cc4eb3
commit
9ce3331f04
@ -137,7 +137,11 @@ static bool init_audio(struct ff_audio_info *audio, struct ffemu_params *param)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
audio->buffer = (int16_t*)av_malloc(audio->codec->frame_size * param->channels * sizeof(int16_t));
|
audio->buffer = (int16_t*)av_malloc(av_samples_get_buffer_size(NULL,
|
||||||
|
audio->codec->channels,
|
||||||
|
audio->codec->frame_size,
|
||||||
|
audio->codec->sample_fmt, 1));
|
||||||
|
|
||||||
if (!audio->buffer)
|
if (!audio->buffer)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user