On Jun 29 22:00:28, Jacob Meuser wrote:
> On Tue, Jun 29, 2010 at 11:21:56PM +0200, Jan Stary wrote:
> > On Jun 29 07:14:08, Jan Stary wrote:
> > > This is a fresh snapshot, with a fresh mplayer from snapshot packages.
> > 
> > i386, I forgot.
> > 
> > > $ mplayer file.wav 
> > > MPlayer SVN-r30866 (C) 2000-2010 MPlayer Team
> > > 
> > > Playing file.wav.
> > > Audio only file format detected.
> > > ==========================================================================
> > > Opening audio decoder: [pcm] Uncompressed PCM audio decoder
> > > AUDIO: 48000 Hz, 2 ch, s24le, 2304.0 kbit/100.00% (ratio:
> > > 288000->288000)
> > > Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
> > > ==========================================================================
> > > ao2: unsupported format
> > > ao2: 48000 Hz  2 chans  s24le [0x11]
> > > [AO SUN] Can't open audio device /dev/audio, Device busy  -> nosound.
> > > DVB card number must be between 1 and 4
> > > AO: [null] 48000Hz 2ch s24le (3 bytes per sample)
> > > Video: no video
> > > Starting playback...
> > > A:   0.1 (00.0) of 330.0 (05:30.0) ??,?% 
> > > Exiting... (Quit)
> > > 
> > > 
> > > 'aucat -l' is running (from rc.conf.local).
> > > The file is just fine, sox plays it all right.
> > > When I convert the file to 16bit, mplayer plays it too.
> > > 
> > > $ sox file.wav -b 16 /tmp/file.wav
> > > $ mplayer /tmp/file.wav
> > > MPlayer SVN-r30866 (C) 2000-2010 MPlayer Team
> > > 
> > > Playing /tmp/file.wav.
> > > Audio only file format detected.
> > > ==========================================================================
> > > Opening audio decoder: [pcm] Uncompressed PCM audio decoder
> > > AUDIO: 48000 Hz, 2 ch, s16le, 1536.0 kbit/100.00% (ratio:
> > > 192000->192000)
> > > Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
> > > ==========================================================================
> > > AO: [sndio] 48000Hz 2ch s16le (2 bytes per sample)
> > > Video: no video
> > > Starting playback...
> > > A:   8.8 (08.7) of 330.0 (05:30.0)  4.3% 
> > > Exiting... (Quit)
> > > 
> > > What is the problem here? mplayer tries to open
> > > /dev/audio directly (using libao) instead of connecting
> > > to the aucat server? Or is this a libao problem?
> > > 
> > > The second run (playing the 16bit file) seems to suggest
> > > mplayer does know how to talk to sndio (a running aucat).
> > > So why doesn't mplayer try to use sndio in the 24bit case, too?
> > 
> > No really, what is it that makes mplayer
> > 
> > (1) play a given file using libao [AO SUN] which tries
> > to open /dev/audio (and fails because /dev/audio is already
> > opened by the running aucat) in one case
> > 
> > and
> > 
> > (2) play another file using sndio, which works
> > in the other case?
> > 
> > Also, what't the point of (1) falling back to AO NULL
> > and going through the file while playing nothing?
> > Is this AO behaviour (as opposed to mplayer's logic)?
> 
> sorry for the late reply.
> 
> the problem is really simple: the sndio backend in mplayer doesn't yet
> support 24-bit formats.  that will be fixed soon.

Am I right at thinking that if an application asks a running aucat
"can you play (e.g.) 24bit WAV for me", the answer is always "yes"?
If so, does that mean that mplayer's backend just has to ask,
which it doesn't now? And if so, can you please point me to the right
place in the code - I would like to try it and learn a bit about sndio.

> now, as far as mplayer falling back to other backends, I guess
> the idea is: if the first choice doesn't work, try something else.*
> and the reason it finally falls back to AO NULL is for audio+video
> files, the video will (at least attempt to) play even if the
> audio won't.

That's right, from mplayer's point of view, there is still a video
stream to play (even when, in this case, there is not :-).

> finally, the libao2 in mplayer has really nothing to do with libao,
> afaics.  why it's called libao2 and only exists in mplayer, I'm not
> curious enough to research.

Oh well, similarly named libraries ...

> * I'll save the ranting about umpteen different not really universally
> useful** audio APIs until sndio(7) is fully working on loonix and the
> other BSDs, which will hopefully be completed in the next few months.

That would be a sad day for all the people who lay awake at nights
thinking "I sure hope sndio doesn't get any more awesome". Time to
start reading Hannu Savolainen's blog again I guess :-)

> ** have you noticed, almost all ports use sndio?

Yes I have; I went through the list you posted some time ago,
only to find out that all the ports I use / care about were
already converted by you.

Please be assured that I very much appreciate the work you and Alex
do on OpenBSD's audio. I just wanted to understand.

        Thank you for your time

                Jan

Reply via email to