tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Peculiar audio behaviour (9.1)



mouse%Rodents-Montreal.ORG@localhost (Mouse) writes:

>If the software opens /dev/audio0 and configures it the way it wants
>and then simply writes to it (two octets - one sample - at a time), the
>audio writes block for ridiculously long times (tens of milliseconds).
>It's not syscall overhead; if I instead have it open /dev/null and skip
>the audio setup ioctls, the writes complete fast.


Apparently the writes do block. Audio is played in terms of blocks,
not single samples and when buffers are full a write waits until
at least one block has been played. You also have to seed at least
two (?) buffers before playback starts.

Another confusing thing can be that you write to a virtual audio
channel. The audio hardware plays a mixed and possibly resampled
buffer.

Have a look at output from 'audiocfg list' to see what parameters
the hardware is actually using.


N.B. writing single samples generates a ton of overhead.



Home | Main Index | Thread Index | Old Index