myMPD
Internal API documentation
Loading...
Searching...
No Matches
volume.c File Reference

myMPD volume API More...

#include "compile_time.h"
#include "src/mympd_api/volume.h"
#include "src/lib/api.h"
#include "src/lib/json/json_rpc.h"
#include "src/lib/log.h"
#include "src/lib/mpdclient.h"
#include "src/mympd_client/errorhandler.h"
#include "src/mympd_client/volume.h"
Include dependency graph for volume.c:

Functions

sds mympd_api_volume_set (struct t_partition_state *partition_state, unsigned volume_min, unsigned volume_max, sds buffer, enum mympd_cmd_ids cmd_id, unsigned request_id, unsigned volume)
 
sds mympd_api_volume_change (struct t_partition_state *partition_state, unsigned volume_min, unsigned volume_max, sds buffer, unsigned request_id, int relative_volume)
 

Detailed Description

myMPD volume API

Function Documentation

◆ mympd_api_volume_change()

sds mympd_api_volume_change ( struct t_partition_state partition_state,
unsigned  volume_min,
unsigned  volume_max,
sds  buffer,
unsigned  request_id,
int  relative_volume 
)

Changes the volume by relative_volume

Parameters
partition_statepointer to partition state
volume_minminimum volume
volume_maxmaximum volume
bufferalready allocated sds string to append the response
request_idjsonrpc request id
relative_volumethe relative volume between -100 and 100
Returns
pointer to buffer

◆ mympd_api_volume_set()

sds mympd_api_volume_set ( struct t_partition_state partition_state,
unsigned  volume_min,
unsigned  volume_max,
sds  buffer,
enum mympd_cmd_ids  cmd_id,
unsigned  request_id,
unsigned  volume 
)

Sets an absolute volume level

Parameters
partition_statepointer to partition state
volume_minminimum volume
volume_maxmaximum volume
bufferalready allocated sds string to append the response
cmd_idjsonrpc method
request_idjsonrpc request id
volumevolume percent to set
Returns
pointer to buffer