Linux: PulseAudio programmatically find connected client

Working on making a manager for PulseAudio. This manager needs to be able to change the volume from the different clients along with other settings. The first task was figuring out how PulseAudio even knew what clients are connected to it.

  1. To interact with PulseAudio, use the Main Loop Abstraction.
    • Pretty good example on their doxygen area
    • pa_threaded_mainloop_new
    • pa_threaded_mainloop_get_api
    • pa_context_new
    • pa_context_set_state_callback(state_callback)
    • pa_context_connect
    • pa_threaded_mainloop_start
  2. PulseAudio gives access to callbacks to retrieve information.
    • Within state_callback
    • pa_context_get_client_info_list(client_callback)
    • pa_context_get_sink_info_list(sink_callback)

Reference:

http://freedesktop.org/software/pulseaudio/doxygen/async.html

Advertisements
This entry was posted in Linux and tagged , , , . Bookmark the permalink.

One Response to Linux: PulseAudio programmatically find connected client

  1. anthonyvenable110 says:

    Reblogged this on anthonyvenable110.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s