The VolumeHandler class provides volume control access.
More...
#include <volumehandler.h>
The VolumeHandler class provides volume control access.
- Author
- Ilya Kotov forko.nosp@m.tov0.nosp@m.2@ya..nosp@m.ru
Definition at line 36 of file volumehandler.h.
VolumeHandler::VolumeHandler |
( |
QObject * |
parent = nullptr | ) |
|
|
explicit |
Object constructor.
- Parameters
-
VolumeHandler::~VolumeHandler |
( |
| ) |
|
void VolumeHandler::apply |
( |
Buffer * |
b, |
|
|
int |
chan |
|
) |
| |
Changes buffer volume (software mode only).
- Parameters
-
b | Buffer pointer. |
chan | Number of channels. |
int VolumeHandler::balance |
( |
| ) |
const |
Returns the balance between left and right channels.
void VolumeHandler::balanceChanged |
( |
int |
balance | ) |
|
|
signal |
Emitted when the balance between left and right channels has changed.
- Parameters
-
balance | New balance value. |
void VolumeHandler::changeVolume |
( |
int |
delta | ) |
|
Changes volume by delta percent
void VolumeHandler::checkVolume |
( |
| ) |
|
|
slot |
Forces the volumeChanged signal to emit.
bool VolumeHandler::isMuted |
( |
| ) |
const |
Returns true if volume is muted, otherwise returns false.
int VolumeHandler::left |
( |
| ) |
const |
Returns left channel volume.
void VolumeHandler::mutedChanged |
( |
bool |
muted | ) |
|
|
signal |
Emitted when volume mute state has changed
- Parameters
-
muted | New volume mute state. |
void VolumeHandler::reload |
( |
| ) |
|
|
slot |
Updates volume configuration
int VolumeHandler::right |
( |
| ) |
const |
Returns right channel volume.
void VolumeHandler::setBalance |
( |
int |
balance | ) |
|
Sets the balance between left and right channels.
- Parameters
-
balance | balance between left and right channels [-100..100]. |
void VolumeHandler::setMuted |
( |
bool |
muted | ) |
|
Sets volume mute state to muted.
void VolumeHandler::setVolume |
( |
int |
left, |
|
|
int |
right |
|
) |
| |
Setups volume level. Subclass should reimplement this fucntion.
- Parameters
-
left | Left channel volume level. It should be 0..100 |
right | Right channel volume level. It should be 0..100 |
void VolumeHandler::setVolume |
( |
int |
volume | ) |
|
Sets the volume of the left and right channels with keeping of the balance.
- Parameters
-
volume | volume of the left and right channels [0..100]. |
int VolumeHandler::volume |
( |
| ) |
const |
Returns the maximum volume of the left and right channels.
void VolumeHandler::volumeChanged |
( |
int |
volume | ) |
|
|
signal |
Emitted when the highest volume of the left and right channels has changed.
- Parameters
-
volume | New value of the highest volume of the left and right channels. |
std::atomic_bool VolumeHandler::m_apply = ATOMIC_VAR_INIT(false) |
|
private |
std::atomic_bool VolumeHandler::m_muted = ATOMIC_VAR_INIT(false) |
|
private |
QMutex VolumeHandler::m_mutex |
|
private |
bool VolumeHandler::m_prev_block = false |
|
private |
double VolumeHandler::m_scaleLeft = 0 |
|
private |
double VolumeHandler::m_scaleRight = 0 |
|
private |
QTimer* VolumeHandler::m_timer = nullptr |
|
private |
Volume* VolumeHandler::m_volume = nullptr |
|
private |
The documentation for this class was generated from the following file: