On Monday 19 March 2018 19:55:11 fredvs wrote:
> Hello Martin.
>
> > That means you first call snd_pcm_drop() and then you close and reopen
> > the audio object?
>
> With your workaround ?
This is the code from original pcaudiolib
"
int
alsa_object_flush(struct audio_object *object)
{
struct alsa_object *self = to_alsa_object(object);
if (!self) return 0;
// Using snd_pcm_drop does not discard the audio, so reopen the device
// to reset the sound buffer.
if (self->is_open) {
audio_object_close(object);
return audio_object_open(object, self->format, self->rate,
self->channels);
}
return 0;
}
"
please see the master branch:
https://gitlab.com/mseide-msegui/pcaudiolib/tree/master
I made no workaround.
> Yes, it call snd_pcm_drop() but it is like doing nothing.
> Did you read/study mt post from Mar 18, 2018; 5:20pm?
>
> You will see that snd_pcm_drop() call, in fine, timer.stop that seems not
> working.
>
> > Doesn't this crash a running write operatipns in another thread?
>
> Sorry, but I did not note this, for me no crash...
>
For me that is no sufficient argument. If one thread holds resources it is
forbidden to free them in another thread.
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