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. 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. 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. * 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. ** have you noticed, almost all ports use sndio? -- jake...@sdf.lonestar.org SDF Public Access UNIX System - http://sdf.lonestar.org