>OK. I modified that full duplex program to store the # of available
>samples for input and output in a history buffer. This history is then
>printed back at the end. The numbers confirm that the input and output
>are drifting and are not synchronous. The OUTPUT stream always has
>period size samples available while the INPUT starts out close to the
>period size and drifts up until it reaches 2 * period (I only have 2
>fragments) where I get XRUNs in both INPUT and OUTPUT streams, which
>re-syncs the two streams again. I tried 48khz as well as 44.1khz, period
>sizes of 384 and 1024. All these have the same problems, although it
>does modify the behavior of how fast they drift, etc. This explains the
>crackling sound that fades in and out. I'm assuming the playback pointer
>gets over written by the record pointer. Do they use the same buffer?
>Why would streams on the same sound card not be synchronized? This would
>seem like the same behavior one would get with 2 separate sound cards.

this is somewhat like the kind of behaviour one sees on the
trident. why are they not synchronized? well, in part because they
designed the h/w to have *independent* playback and capture streams,
which reflects typical consumer use. if you force the playback and
capture streams to be totally synced, then you make the life of the
programmer more difficult. "the programmer" here means one or both of
the driver writer and the app programmer. notice how much work is
necessary to share the hammerfall - there is only one h/w pointer
which is moving whether the device is open for playback or capture or
both. this is really nice for full duplex DAW-style operation, but
really rather unpleasant if you wanted (say) 12 stereo devices that
appear to be completely independent of each other when they are opened
for playback or capture. remember: very few device driver APIs specify
sample sync-ed full duplex. they just say you can move data in both
directions "at the same time". they don't say "in 100% sample
sync". thats partly why ASIO drivers don't exist for quite a lot of
the h/w that is otherwise supported under windows and macos (well, its
part of the reason, anyway).

just ramblin', whats new ...

--p



_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to