mirror of https://github.com/mpv-player/mpv
Audio delay bugfix
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3138 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
32646569d9
commit
abf8696e5e
|
@ -110,7 +110,7 @@ static int init(int rate,int channels,int format,int flags){
|
|||
return 0;
|
||||
}
|
||||
|
||||
ao_data.bps=(channels+1)*rate;
|
||||
ao_data.bps=channels*rate;
|
||||
if(format != AFMT_U8 && format != AFMT_S8)
|
||||
ao_data.bps*=2;
|
||||
|
||||
|
|
|
@ -144,7 +144,7 @@ static int init(int rate,int channels,int format,int flags){
|
|||
printf("SDL: using %s audio driver\n", ao_subdevice);
|
||||
}
|
||||
|
||||
ao_data.bps=(channels+1)*rate;
|
||||
ao_data.bps=channels*rate;
|
||||
if(format != AFMT_U8 && format != AFMT_S8)
|
||||
ao_data.bps*=2;
|
||||
|
||||
|
|
|
@ -459,6 +459,6 @@ static float get_delay(){
|
|||
if (info.play.samples && enable_sample_timing == RTSC_ENABLED)
|
||||
return (float)(queued_samples - info.play.samples) / (float)byte_per_sec;
|
||||
else
|
||||
return (flaot)((queued_bursts - info.play.eof) * ao_data.outburst) / (float)byte_per_sec;
|
||||
return (float)((queued_bursts - info.play.eof) * ao_data.outburst) / (float)byte_per_sec;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue