### IMMMasterAudio

  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.

### IMMMasterAudio - Member Functions and Data by Group

### Constructors & Destructor

You can construct and destruct objects of this class.

~IMMMasterAudio

      public:
      virtual ~IMMMasterAudio()

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

IMMMasterAudio

      public:
      IMMMasterAudio()

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

### Headphones

Use these members to set, query, and save the headphones' setting.

areHeadphonesEnabled

      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.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

disableHeadphones

      public:
      virtual IMMMasterAudio&
        disableHeadphones( IMMDevice::CallType call = IMMDevice::wait )

  Turns the headphones' settings off.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

enableHeadphones

      public:
      virtual IMMMasterAudio&
        enableHeadphones( bool enable = true,
                          IMMDevice::CallType call = IMMDevice::wait )

  Turns the headphones' settings either off or on.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

saveHeadphonesSetting

      public:
      virtual IMMMasterAudio&
        saveHeadphonesSetting( IMMDevice::CallType call = IMMDevice::wait )

  Saves the current headphones' setting of the operating system.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

### Speakers

Use these members to set, query, and save the speakers' setting.

areSpeakersEnabled

      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.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

disableSpeakers

      public:
      virtual IMMMasterAudio&
        disableSpeakers( IMMDevice::CallType call = IMMDevice::wait )

  Turns the speakers' setting off.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

enableSpeakers

      public:
      virtual IMMMasterAudio&
        enableSpeakers( bool enable = true,
                        IMMDevice::CallType call = IMMDevice::wait )

  Turns the speakers' setting either on or off.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

saveSpeakersSetting

      public:
      virtual IMMMasterAudio&
        saveSpeakersSetting( IMMDevice::CallType call = IMMDevice::wait )

  Saves the current speakers' setting of the operating system.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

### Volume

Use these members to set, query, and save the master volume setting.

saveVolume

      public:
      virtual IMMMasterAudio&
        saveVolume( IMMDevice::CallType call = IMMDevice::wait )

  Saves the current master volume setting of the operating system.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

setVolume

      public:
      virtual IMMMasterAudio&
        setVolume( unsigned long volume,
                   IMMDevice::CallType call = IMMDevice::wait )

  Sets the master volume for the operating system.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

volume

      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.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

### IMMMasterAudio - Enumerations

SettingSource

      enum SettingSource { saved=0x00004000L,
                           current=0x00008000L }

  Enumeration that specifies which setting to query and set.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

### IMMMasterAudio - Inherited Member Functions and Data

#### Inherited Public Functions

  INotifier

  -     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

  IStandardNotifier

  -     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 )

#### Inherited Public Data

  INotifier

  -     static INotificationId const allChangesId

  -     static INotificationId const deleteId

#### Inherited Protected Functions

  IStandardNotifier

  -     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 )

  INotifier

  -     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

#### Inherited Protected Data

  - None