Volume bridge which supports the manipulation of the platform's audio volume settings.
The CYIAudioVolumeBridge available on iOS & tvOS is usually used in conjunction with the MPVolumeView, which is a class in the iOS SDK responsible for media playback. This view is required to manipulate the volume directly. The bridge, however, can still be used to read and monitor the volume directly.
#include <platform/YiAudioVolumeBridge.h>
Public Member Functions | |
| virtual | ~CYIAudioVolumeBridge () |
| virtual bool | AdjustVolume (float fPercentage)=0 |
| virtual bool | SetMuteEnabled (bool bEnabled)=0 |
| virtual bool | GetVolume (float &fPercentage)=0 |
| virtual void | StartObservingVolumeChanges ()=0 |
| virtual void | StopObservingVolumeChanges ()=0 |
Public Attributes | |
| CYISignal | PlatformVolumeChanged |
|
inlinevirtual |
|
pure virtual |
Adjusts the volume by the specified fPercentage. The percentage value is in in the range from 0.0 to 1.0; the platform must normalize this to whatever range makes sense. This function will return false if the bridge call was not successful.
|
pure virtual |
Gets the current volume as a normalized parameter in the range from 0.0 to 1.0, storing it in the parameter fPercentage. This function will return false if the bridge call was not successful.
|
pure virtual |
Enables or disables muted volume on the platform. This function will return false if the bridge call was not successful.
|
pure virtual |
Start system volume change observation. This is required to subscribe the notification of hardware volume button press.
|
pure virtual |
Stop system volume change observation that subscribes the notification of hardware volume button press.
| CYISignal CYIAudioVolumeBridge::PlatformVolumeChanged |