The SoundCore class provides a simple interface for audio playback.
More...
#include <soundcore.h>
|
virtual bool | event (QEvent *e) overridefinal |
|
The SoundCore class provides a simple interface for audio playback.
- Author
- Ilya Kotov forko.nosp@m.tov0.nosp@m.2@ya..nosp@m.ru
Definition at line 40 of file soundcore.h.
Enumerator |
---|
NO_ENGINE |
|
SAME_ENGINE |
|
ANOTHER_ENGINE |
|
INVALID_SOURCE |
|
Definition at line 253 of file soundcore.h.
SoundCore::SoundCore |
( |
QObject * |
parent = nullptr | ) |
|
|
explicit |
Object constructor.
- Parameters
-
SoundCore::~SoundCore |
( |
| ) |
|
Returns output audio parameters.
Emitted when audio parameters have changed.
- Parameters
-
p | New audio parameters for output. |
int SoundCore::balance |
( |
| ) |
const |
Returns the balance between left and right channels.
void SoundCore::balanceChanged |
( |
int |
balance | ) |
|
|
signal |
Emitted when the balance between left and right channels has changed.
- Parameters
-
balance | new balance value. |
int SoundCore::bitrate |
( |
| ) |
const |
Returns current bitrate (in kbps)
void SoundCore::bitrateChanged |
( |
int |
bitrate | ) |
|
|
signal |
Emitted when bitrate has changed.
- Parameters
-
bitrate | New bitrate (in kbps) |
void SoundCore::bufferingProgress |
( |
int |
progress | ) |
|
|
signal |
This signal is emitted when the stream reader fills it's buffer. The argument progress indicates the current percentage of buffering completed.
void SoundCore::changeVolume |
( |
int |
delta | ) |
|
|
slot |
Changes volume by delta percent
qint64 SoundCore::duration |
( |
| ) |
const |
qint64 SoundCore::elapsed |
( |
| ) |
const |
void SoundCore::elapsedChanged |
( |
qint64 |
time | ) |
|
|
signal |
Tracks elapesed time.
- Parameters
-
time | New track position in milliseconds. |
void SoundCore::eqSettingsChanged |
( |
| ) |
|
|
signal |
Emitted when equalizer settings has changed.
virtual bool SoundCore::event |
( |
QEvent * |
e | ) |
|
|
finaloverrideprivatevirtual |
void SoundCore::finished |
( |
| ) |
|
|
signal |
Emitted when playback has finished.
bool SoundCore::isMuted |
( |
| ) |
const |
int SoundCore::leftVolume |
( |
| ) |
const |
Returns left volume level.
Returns all meta data in map.
Returns the metdata string associated with the given key.
void SoundCore::mutedChanged |
( |
bool |
muted | ) |
|
|
signal |
Emitted when volume has muted or restored
- Parameters
-
muted | new state of the volume (true - muted, false - unmuted) |
bool SoundCore::nextTrackAccepted |
( |
| ) |
const |
Indicates that the current active engine will be used for the next queued track. May be useful for some effect plugins.
void SoundCore::nextTrackRequest |
( |
| ) |
|
|
signal |
Emitted before playback ends. Use this signal to append new url to the queue.
QString SoundCore::path |
( |
| ) |
const |
|
slot |
void SoundCore::pause |
( |
| ) |
|
|
slot |
bool SoundCore::play |
( |
const QString & |
source, |
|
|
bool |
queue = false , |
|
|
qint64 |
offset = -1 |
|
) |
| |
|
slot |
This function plays file or stream with the given path source
. Returns true if playback has been started successful or source is not a local file, otherwise returns false. Useful for invalid files skipping.
Referenced by MusicPlayer::play().
int SoundCore::rightVolume |
( |
| ) |
const |
Returns left volume level.
void SoundCore::seek |
( |
qint64 |
time | ) |
|
|
slot |
void SoundCore::setBalance |
( |
int |
balance | ) |
|
|
slot |
Sets the balance between left and right channels.
- Parameters
-
balance | balance between left and right channels [-100..100]. |
Referenced by MusicPlayer::setEnhanced().
void SoundCore::setMuted |
( |
bool |
mute | ) |
|
|
slot |
Mutes/Restores volume
- Parameters
-
mute | - state of volume (true - mute, false - restore) |
Referenced by MusicPlayer::setMuted().
void SoundCore::setVolume |
( |
int |
left, |
|
|
int |
right |
|
) |
| |
|
slot |
void SoundCore::setVolume |
( |
int |
volume | ) |
|
|
slot |
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]. |
void SoundCore::startNextEngine |
( |
| ) |
|
|
privateslot |
void SoundCore::startNextSource |
( |
| ) |
|
|
privateslot |
This signal is emitted when the state of the SoundCore has changed.
const QHash<QString, QString>& SoundCore::streamInfo |
( |
| ) |
const |
Returns a hash of stream information if available
void SoundCore::streamInfoChanged |
( |
| ) |
|
|
signal |
Emitted when new stream information is available.
void SoundCore::trackInfoChanged |
( |
| ) |
|
|
signal |
Emitted when new track information is available.
int SoundCore::volume |
( |
| ) |
const |
void SoundCore::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. |
void SoundCore::volumeDown |
( |
| ) |
|
|
slot |
Decreases volume by volume adjustment step.
void SoundCore::volumeUp |
( |
| ) |
|
|
slot |
Increases volume by volume adjustment step.
QString SoundCore::m_path |
|
private |
QHash<QString, QString> SoundCore::m_streamInfo |
|
private |
The documentation for this class was generated from the following file: