mirror of
https://github.com/mpv-player/mpv
synced 2025-04-01 00:07:33 +00:00
Make the ao_alsa play function always process a multiple of ao_data.outburst
except for the last chunk. Should fix high CPU usage reported e.g. here: http://bugs.gentoo.org/show_bug.cgi?id=286020 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29748 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
2946fb53a7
commit
a79706df46
@ -763,8 +763,11 @@ static void reset(void)
|
||||
|
||||
static int play(void* data, int len, int flags)
|
||||
{
|
||||
int num_frames = len / bytes_per_sample;
|
||||
int num_frames;
|
||||
snd_pcm_sframes_t res = 0;
|
||||
if (!(flags & AOPLAY_FINAL_CHUNK))
|
||||
len = len / ao_data.outburst * ao_data.outburst;
|
||||
num_frames = len / bytes_per_sample;
|
||||
|
||||
//mp_msg(MSGT_AO,MSGL_ERR,"alsa-play: frames=%i, len=%i\n",num_frames,len);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user