[MPlayer-dev-eng] Re: BUG! Fwd: [MPlayer-users] bugreport: alsa9 ... desync

Tobias Diedrich td at sim.uni-hannover.de
Mon Oct 7 14:24:26 CEST 2002


Arpi wrote:

> > -    ao_data.bps = channels; /* really this is bytes per frame so bad
> > varname */.
> > +    ao_data.bps = channels * rate_hz;.
> 
> imho it's true only for 8bit mode!?
> ao_data.bps is bytes per second.

No, it gets multiplicated by samplesize later.

> > +    bytes_per_sample = ao_data.bps / ao_data.samplerate;.
> will be always 1
Should at least be channels, but it really is bytes_per_sample.
See lines 273 and 277:
    switch(alsa_format)
      {
      case SND_PCM_FORMAT_S16_LE:
      case SND_PCM_FORMAT_U16_LE:
	ao_data.bps *= 2;
	break;
      case SND_PCM_FORMAT_S32_LE:
      case SND_PCM_FORMAT_S32_BE:
	ao_data.bps *= 4;
	break;

-- 
Tobias								PGP: 0x9AC7E0BC
This mail is made of 100% recycled bits
Now playing: Kajiura Yuki: .hack//SIGN OST2 06 - bear
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20021007/d87d61d9/attachment.pgp>


More information about the MPlayer-dev-eng mailing list