libmpdclient 2.22
Enumerations | Functions
replay_gain.h File Reference

MPD client library. More...

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

Go to the source code of this file.

Enumerations

enum  mpd_replay_gain_mode {
  MPD_REPLAY_OFF = 0 , MPD_REPLAY_TRACK , MPD_REPLAY_ALBUM , MPD_REPLAY_AUTO ,
  MPD_REPLAY_UNKNOWN
}
 

Functions

enum mpd_replay_gain_mode mpd_parse_replay_gain_name (const char *name)
 
const char * mpd_lookup_replay_gain_mode (enum mpd_replay_gain_mode mode)
 
bool mpd_send_replay_gain_status (struct mpd_connection *connection)
 
enum mpd_replay_gain_mode mpd_recv_replay_gain_status (struct mpd_connection *connection)
 
enum mpd_replay_gain_mode mpd_run_replay_gain_status (struct mpd_connection *connection)
 
bool mpd_send_replay_gain_mode (struct mpd_connection *connection, enum mpd_replay_gain_mode mode)
 
bool mpd_run_replay_gain_mode (struct mpd_connection *connection, enum mpd_replay_gain_mode mode)
 

Detailed Description

MPD client library.

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

Definition in file replay_gain.h.

Enumeration Type Documentation

◆ mpd_replay_gain_mode

MPD's replay gain mode.

Since
libmpdclient 2.19, MPD 0.16.
Enumerator
MPD_REPLAY_OFF 

ignore ReplayGain tag values

MPD_REPLAY_TRACK 

use per-track ReplayGain values

MPD_REPLAY_ALBUM 

use per-album ReplayGain values

MPD_REPLAY_AUTO 

use available ReplayGain value; if both track and album tags are available, prefer track values.

MPD_REPLAY_UNKNOWN 

Unknown mode

Definition at line 53 of file replay_gain.h.

Function Documentation

◆ mpd_parse_replay_gain_name()

enum mpd_replay_gain_mode mpd_parse_replay_gain_name ( const char *  name)

Parse a mpd_pair value to check which replay gain mode it contains.

◆ mpd_lookup_replay_gain_mode()

const char * mpd_lookup_replay_gain_mode ( enum mpd_replay_gain_mode  mode)

Looks up the name of the specified replay gain mode.

Returns
the name, or NULL if the replay gain mode is not valid
Since
libmpdclient 2.19.

◆ mpd_send_replay_gain_status()

bool mpd_send_replay_gain_status ( struct mpd_connection connection)

Queries the current state of replay gain mode on MPD.

Sends the "replay_gain_status" command to MPD. Call mpd_recv_replay_gain_status() to read the response.

Parameters
connectionthe connection to MPD
Returns
true on success, false on error
Since
MPD 0.16, libmpdclient 2.19.

◆ mpd_recv_replay_gain_status()

enum mpd_replay_gain_mode mpd_recv_replay_gain_status ( struct mpd_connection connection)

Receives the current state of replay gain mode on MPD. Shortcut for mpd_recv_pair_named() and mpd_parse_replay_gain_name() ad mpd_return_pair().

Parameters
connectionthe connection to MPD
Returns
mpd_replay_gain_mode object: MPD_REPLAY_UNKNOWN on error (or unknown ReplayGain mode); other modes on success.
Since
MPD 0.16, libmpdclient 2.21.

◆ mpd_run_replay_gain_status()

enum mpd_replay_gain_mode mpd_run_replay_gain_status ( struct mpd_connection connection)

Shortcut for mpd_send_replay_gain_status(), mpd_recv_replay_gain_status() and mpd_response_finish().

Parameters
connectionthe connection to MPD
Returns
mpd_replay_gain_mode object: MPD_REPLAY_UNKNOWN on error (or unknown ReplayGain mode); other modes on success.
Since
MPD 0.16, libmpdclient 2.19.

◆ mpd_send_replay_gain_mode()

bool mpd_send_replay_gain_mode ( struct mpd_connection connection,
enum mpd_replay_gain_mode  mode 
)

Sets the current state of replay gain mode on MPD.

Parameters
connectionthe connection to MPD
modethe desired replay gain mode
Returns
true on success, false on error
Since
MPD 0.16, libmpdclient 2.19.

◆ mpd_run_replay_gain_mode()

bool mpd_run_replay_gain_mode ( struct mpd_connection connection,
enum mpd_replay_gain_mode  mode 
)

Shortcut for mpd_send_replay_gain_mode() and mpd_response_finish().

Parameters
connectionthe connection to MPD
modemode the desired replay gain mode
Returns
true on success, false on error
Since
MPD 0.16, libmpdclient 2.19.