libdisplaydevice latest
C++ library to modify display devices.
display_device::AudioContextInterface Class Referenceabstract

A class for capturing associated audio context (settings, info or whatever). More...

#include <src/common/include/display_device/audio_context_interface.h>

Inheritance diagram for display_device::AudioContextInterface:
[legend]

Public Member Functions

virtual bool capture ()=0
 Capture audio context for currently active devices.
 
virtual bool isCaptured () const =0
 Check if the context is already captured.
 
virtual void release ()=0
 Release captured audio context for the devices (if any).
 
virtual ~AudioContextInterface ()=default
 Default virtual destructor.
 

Detailed Description

A class for capturing associated audio context (settings, info or whatever).

Some of the display devices have audio devices associated with them. Turning off and on the devices will not necessarily restore them as the default audio devices for the system.

Member Function Documentation

◆ capture()

virtual bool display_device::AudioContextInterface::capture ( )
nodiscardpure virtual

Capture audio context for currently active devices.

Returns
True if the contexts could be captured, false otherwise.

*Examples**

AudioContextInterface* iface = getIface(...);
const auto result { iface->capture() };
A class for capturing associated audio context (settings, info or whatever).
Definition audio_context_interface.h:15
virtual bool capture()=0
Capture audio context for currently active devices.

Implemented in display_device::NoopAudioContext.

◆ isCaptured()

virtual bool display_device::AudioContextInterface::isCaptured ( ) const
nodiscardpure virtual

Check if the context is already captured.

Returns
True if the context is captured, false otherwise.

*Examples**

AudioContextInterface* iface = getIface(...);
const auto result { iface->isCaptured() };
virtual bool isCaptured() const =0
Check if the context is already captured.

Implemented in display_device::NoopAudioContext.

◆ release()

virtual void display_device::AudioContextInterface::release ( )
pure virtual

Release captured audio context for the devices (if any).

*Examples**

AudioContextInterface* iface = getIface(...);
const auto result { iface->release() };
virtual void release()=0
Release captured audio context for the devices (if any).

Implemented in display_device::NoopAudioContext.


The documentation for this class was generated from the following file: