MixerAll, Volume: add "pure" attributes

This commit is contained in:
Max Kellermann 2013-10-25 00:15:55 +02:00
parent ac8e5be9f4
commit c1ba47beee
2 changed files with 8 additions and 0 deletions

View File

@ -25,10 +25,13 @@
#ifndef MPD_MIXER_ALL_HXX
#define MPD_MIXER_ALL_HXX
#include "Compiler.h"
/**
* Returns the average volume of all available mixers (range 0..100).
* Returns -1 if no mixer can be queried.
*/
gcc_pure
int
mixer_all_get_volume(void);
@ -46,6 +49,7 @@ mixer_all_set_volume(unsigned volume);
* software mixers. See #software_mixer_plugin. This function fails
* if no software mixer is configured.
*/
gcc_pure
int
mixer_all_get_software_volume(void);

View File

@ -20,12 +20,15 @@
#ifndef MPD_VOLUME_HXX
#define MPD_VOLUME_HXX
#include "Compiler.h"
#include <stdio.h>
void volume_init(void);
void volume_finish(void);
gcc_pure
int volume_level_get(void);
bool volume_level_change(unsigned volume);
@ -41,6 +44,7 @@ void save_sw_volume_state(FILE *fp);
* determine whether the state has changed and the state file should
* be saved.
*/
gcc_pure
unsigned
sw_volume_state_get_hash(void);