A few questions about termination

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

 



On Fri, 24.07.09 11:17, Andreas ?man (andreas at lonelycoder.com) wrote:

> Hi,
>
> If my application receives a PA_CONTEXT_TERMINATED or PA_CONTEXT_FAILED
> event, will all the active streams be automatically destroyed by the  
> library or do I have to do that myself?

No. Stream state changes do not result in freeing of any
resources. You always have to drop all references you are keeping
(with pa_stream_unref()) before resources are freed.

> Second, If I chose 'terminate' from pavucontrol on my application's
> stream the app receives an PA_STREAM_FAILED event. I would expect
> it to be PA_STREAM_TERMINATED.

The PA_STREAM_TERMINATED state is only entered if you locally change
terminate a stream by calling pa_stream_disconnect(). Any error or
externally triggered state change is forward to you as a
PA_STREAM_FAILED state.

Lennart

-- 
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net
http://0pointer.net/lennart/           GnuPG 0x1A015CC4



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux