libmpdclient 2.22
Functions
mixer.h File Reference

MPD client library. More...

#include <stdbool.h>
Include dependency graph for mixer.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool mpd_send_set_volume (struct mpd_connection *connection, unsigned volume)
 
bool mpd_run_set_volume (struct mpd_connection *connection, unsigned volume)
 
bool mpd_send_change_volume (struct mpd_connection *connection, int relative_volume)
 
bool mpd_run_change_volume (struct mpd_connection *connection, int relative_volume)
 
bool mpd_send_get_volume (struct mpd_connection *connection)
 
int mpd_run_get_volume (struct mpd_connection *connection)
 

Detailed Description

MPD client library.

Functions for manipulating MPD's mixer controls.

Do not include this header directly. Use mpd/client.h instead.

Definition in file mixer.h.

Function Documentation

◆ mpd_send_set_volume()

bool mpd_send_set_volume ( struct mpd_connection connection,
unsigned  volume 
)

Sets the volume of all output devices.

Parameters
connectionthe connection to MPD
volumethe volume, an integer between 0 and 100
Returns
true on success, false on error

◆ mpd_run_set_volume()

bool mpd_run_set_volume ( struct mpd_connection connection,
unsigned  volume 
)

Shortcut for mpd_send_set_volume() and mpd_response_finish().

Parameters
connectionthe connection to MPD
volumethe volume, an integer between 0 and 100
Returns
true on success, false on error

◆ mpd_send_change_volume()

bool mpd_send_change_volume ( struct mpd_connection connection,
int  relative_volume 
)

Changes the volume of all output devices.

Parameters
connectionthe connection to MPD
relative_volumethe relative volume, an integer between -100 and 100
Returns
true on success, false on error
Since
libmpdclient 2.9

◆ mpd_run_change_volume()

bool mpd_run_change_volume ( struct mpd_connection connection,
int  relative_volume 
)

Shortcut for mpd_send_change_volume() and mpd_response_finish().

Parameters
connectionthe connection to MPD
relative_volumethe relative volume, an integer between -100 and 100
Returns
true on success, false on error
Since
libmpdclient 2.9

◆ mpd_send_get_volume()

bool mpd_send_get_volume ( struct mpd_connection connection)

Sends the "getvol" command to MPD. Call mpd_recv_pair() to read the response line.

Parameters
connectiona valid and connected mpd_connection
Returns
true on success
Since
libmpdclient 2.20, MPD 0.23

◆ mpd_run_get_volume()

int mpd_run_get_volume ( struct mpd_connection connection)

Shortcut for mpd_send_get_volume(), mpd_recv_pair_named() and mpd_response_finish().

Parameters
connectiona valid and connected mpd_connection
Returns
volume on success or -1 on error
Since
libmpdclient 2.20, MPD 0.23