2 ==============================================================================
4 This file is part of the JUCE library.
5 Copyright (c) 2022 - Raw Material Software Limited
7 JUCE is an open source library subject to commercial or open-source
10 The code included in this file is provided under the terms of the ISC license
11 http://www.isc.org/downloads/software-support-policy/isc-license. Permission
12 To use, copy, modify, and/or distribute this software for any purpose with or
13 without fee is hereby granted provided that the above copyright notice and
14 this permission notice appear in all copies.
16 JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
17 EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
20 ==============================================================================
26 //==============================================================================
28 Contains functions to control the system's master volume.
32 class JUCE_API SystemAudioVolume
35 //==============================================================================
36 /** Returns the operating system's current volume level in the range 0 to 1.0 */
37 static float JUCE_CALLTYPE
getGain();
39 /** Attempts to set the operating system's current volume level.
40 @param newGain the level, between 0 and 1.0
41 @returns true if the operation succeeds
43 static bool JUCE_CALLTYPE
setGain (float newGain
);
45 /** Returns true if the system's audio output is currently muted. */
46 static bool JUCE_CALLTYPE
isMuted();
48 /** Attempts to mute the operating system's audio output.
49 @param shouldBeMuted true if you want it to be muted
50 @returns true if the operation succeeds
52 static bool JUCE_CALLTYPE
setMuted (bool shouldBeMuted
);
55 SystemAudioVolume(); // Don't instantiate this class, just call its static fns.
56 JUCE_DECLARE_NON_COPYABLE (SystemAudioVolume
)