Mercurial > mplayer.hg
comparison libao2/ao_oss.c @ 3455:921a78c7b4aa
limit get_space return <= MAX_OUTBURST, whilst always an exact number of fragments
author | steve |
---|---|
date | Tue, 11 Dec 2001 09:23:57 +0000 |
parents | 66134af21278 |
children | f648f699eda6 |
comparison
equal
deleted
inserted
replaced
3454:78057c7120f6 | 3455:921a78c7b4aa |
---|---|
239 int playsize=ao_data.outburst; | 239 int playsize=ao_data.outburst; |
240 | 240 |
241 #ifdef SNDCTL_DSP_GETOSPACE | 241 #ifdef SNDCTL_DSP_GETOSPACE |
242 if(ioctl(audio_fd, SNDCTL_DSP_GETOSPACE, &zz)!=-1){ | 242 if(ioctl(audio_fd, SNDCTL_DSP_GETOSPACE, &zz)!=-1){ |
243 // calculate exact buffer space: | 243 // calculate exact buffer space: |
244 return zz.fragments*zz.fragsize; | 244 playsize = zz.fragments*zz.fragsize; |
245 if (playsize > MAX_OUTBURST) | |
246 playsize = (MAX_OUTBURST / zz.fragsize) * zz.fragsize; | |
247 return playsize; | |
245 } | 248 } |
246 #endif | 249 #endif |
247 | 250 |
248 // check buffer | 251 // check buffer |
249 #ifdef HAVE_AUDIO_SELECT | 252 #ifdef HAVE_AUDIO_SELECT |