The IMMMasterAudio class provides behavior for modifying the master audio settings for all audio devices in the system. The application can set, query and save the headphones', speakers', and master volume settings for the system. When any of the multimedia devices are opened, they query the master audio settings and automatically adjust their settings accordingly.
You can construct and destruct objects of this class.
![]() |
public:
virtual ~IMMMasterAudio()
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
IMMMasterAudio()
Windows | OS/2 | AIX |
Yes | Yes | No |
Use these members to set, query, and save the headphones' setting.
![]() |
public:
bool areHeadphonesEnabled( SettingSource source = current, IMMDevice::CallType call = IMMDevice::wait ) const
Returns if the headphones' setting is enabled for the passed-in source (either the current setting or the saved setting); otherwise, returns false.
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
virtual IMMMasterAudio& disableHeadphones( IMMDevice::CallType call = IMMDevice::wait )
Turns the headphones' settings off.
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
virtual IMMMasterAudio& enableHeadphones( bool enable = true, IMMDevice::CallType call = IMMDevice::wait )
Turns the headphones' settings either off or on.
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
virtual IMMMasterAudio& saveHeadphonesSetting( IMMDevice::CallType call = IMMDevice::wait )
Saves the current headphones' setting of the operating system.
Windows | OS/2 | AIX |
Yes | Yes | No |
Use these members to set, query, and save the speakers' setting.
![]() |
public:
bool areSpeakersEnabled( SettingSource source = current, IMMDevice::CallType call = IMMDevice::wait ) const
Returns true if the speakers' setting is enabled for the passed-in source (either the current setting or the saved setting); otherwise, returns false.
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
virtual IMMMasterAudio& disableSpeakers( IMMDevice::CallType call = IMMDevice::wait )
Turns the speakers' setting off.
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
virtual IMMMasterAudio& enableSpeakers( bool enable = true, IMMDevice::CallType call = IMMDevice::wait )
Turns the speakers' setting either on or off.
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
virtual IMMMasterAudio& saveSpeakersSetting( IMMDevice::CallType call = IMMDevice::wait )
Saves the current speakers' setting of the operating system.
Windows | OS/2 | AIX |
Yes | Yes | No |
Use these members to set, query, and save the master volume setting.
![]() |
public:
virtual IMMMasterAudio& saveVolume( IMMDevice::CallType call = IMMDevice::wait )
Saves the current master volume setting of the operating system.
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
virtual IMMMasterAudio& setVolume( unsigned long volume, IMMDevice::CallType call = IMMDevice::wait )
Sets the master volume for the operating system.
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
unsigned long volume( SettingSource source = current, IMMDevice::CallType call = IMMDevice::wait ) const
Returns the master volume setting for either the current setting or the saved setting to a percent of the maximum audio level.
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
enum SettingSource { saved=0x00004000L, current=0x00008000L }
Enumeration that specifies which setting to query and set.
Windows | OS/2 | AIX |
Yes | Yes | No |
virtual ~INotifier()
virtual INotifier& disableNotification() = 0
virtual INotifier& enableNotification( bool enable = true ) = 0
INotifier()
virtual bool isEnabledForNotification() const = 0
virtual INotifier& notifyObservers( const INotificationEvent& event ) = 0
virtual INotifier& notifyObserversAsync( const INotificationEvent& event )
const IThreadId& threadId() const
virtual ~IStandardNotifier()
virtual IStandardNotifier& disableNotification()
virtual IStandardNotifier& enableNotification( bool enable = true )
virtual bool isEnabledForNotification() const
IStandardNotifier()
IStandardNotifier(const IStandardNotifier& copy)
virtual INotifierAddress notifierAddress() const
virtual IStandardNotifier& notifyObservers( const INotificationEvent& anEvent )
virtual IStandardNotifier& notifyObserversAsync( const INotificationEvent& anEvent )
IStandardNotifier& operator =( const IStandardNotifier& aStandardNotifier )
static INotificationId const allChangesId
static INotificationId const deleteId
virtual IStandardNotifier& addObserver( IObserver& observer, const IInterest& interest )
virtual IStandardNotifier& notifyObservers( const INotificationId& nId )
virtual IObserverList& observerList( const IInterest* anInterest = 0 ) const
virtual IStandardNotifier& removeAllObservers()
virtual IStandardNotifier& removeObserver( IObserver& observer, const IInterest& interest )
virtual IStandardNotifier& removeObserver( IObserver& observer )
virtual INotifier& addObserver( IObserver& observer, const IInterest& interest )
virtual INotifier& notifyObservers( const INotificationId& id ) = 0
virtual IObserverList& observerList( const IInterest* anInterest = 0 ) const = 0
virtual INotifier& removeAllObservers() = 0
virtual INotifier& removeObserver( IObserver& observer, const IInterest& interest )
virtual INotifier& removeObserver(IObserver& observer) = 0