On 03/12/2018 02:28 PM, fredvs wrote:
> Hello Martin.
>
> You are the champion.
>
> Using this:
>
> audioobj := create_audio_device_object('sysdefault', nil, nil);
>
> makes that PulseAudio is not used anymore but the alsa kernel driver
> directly !
>
> And...
>
> The sound is perfect and the duration with loops is ok, like using
> PulseAudio.
>
The problem with "pure" alsa mode is that
"
int
alsa_object_flush(struct audio_object *object)
{
struct alsa_object *self = to_alsa_object(object);
if (self && self->handle){
snd_pcm_drop(self->handle);
}
"
despite the documentation:
https://www.alsa-project.org/alsa-doc/alsa-lib/group___p_c_m.html#ga7000ca6010a1a2739daddff8e2fbb440
"
This function stops the PCM immediately. The pending samples on the
buffer are ignored.
For processing all pending samples, use ::snd_pcm_drain() instead.
The function is thread-safe when built with the proper option.
"
does not drop all buffers. You can test it in mono mode if you change
the sine frequency. A short time both tones are audible.
Martin
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk