Logo Search packages:      
Sourcecode: pulseaudio version File versions

void pa_stream_set_moved_callback ( pa_stream p,
pa_stream_notify_cb_t  cb,
void *  userdata 
)

Set the callback function that is called whenever the stream is moved to a different sink/source. Use pa_stream_get_device_name()or pa_stream_get_device_index() to query the new sink/source. This notification is only generated when the server is at least 0.9.8.

Since:
0.9.8

Definition at line 1652 of file stream.c.

References PA_STREAM_FAILED, and PA_STREAM_TERMINATED.

                                                                                          {
    pa_assert(s);
    pa_assert(PA_REFCNT_VALUE(s) >= 1);

    if (s->state == PA_STREAM_TERMINATED || s->state == PA_STREAM_FAILED)
        return;

    s->moved_callback = cb;
    s->moved_userdata = userdata;
}


Generated by  Doxygen 1.6.0   Back to index