SoundCore Class Reference
The
SoundCore class provides a simple interface for audio playback.
More...
#include <soundcore.h>
List of all members.
Detailed Description
The
SoundCore class provides a simple interface for audio playback.
- Author:
- Ilya Kotov <forkotov02@hotmail.ru>
Constructor & Destructor Documentation
| SoundCore::SoundCore |
( |
QObject * |
parent = 0 |
) |
|
Object constructor.
- Parameters:
-
| SoundCore::~SoundCore |
( |
|
) |
|
Member Function Documentation
| void SoundCore::aboutToFinish |
( |
|
) |
[signal] |
Emitted before the playback ends.
| int SoundCore::bitrate |
( |
|
) |
|
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.
| int SoundCore::channels |
( |
|
) |
|
| void SoundCore::channelsChanged |
( |
int |
channels |
) |
[signal] |
Emitted when channels number has changed.
- Parameters:
-
| channels | New channels number. |
| qint64 SoundCore::elapsed |
( |
|
) |
|
Returns the current time (in milliseconds).
| void SoundCore::elapsedChanged |
( |
qint64 |
time |
) |
[signal] |
Tracks elapesed time.
- Parameters:
-
| time | New track position in milliseconds. |
| void SoundCore::finished |
( |
|
) |
[signal] |
Emitted when playback has finished.
| quint32 SoundCore::frequency |
( |
|
) |
|
Returns current sample rate (in Hz).
| void SoundCore::frequencyChanged |
( |
quint32 |
frequency |
) |
[signal] |
Emitted when samplerate has changed.
- Parameters:
-
| frequency | New sample rate (in Hz) |
| static SoundCore* SoundCore::instance |
( |
|
) |
[static] |
| int SoundCore::leftVolume |
( |
|
) |
|
Returns left volume level.
Returns the metdata string associated with the given key.
Returns all meta data in map.
| void SoundCore::metaDataChanged |
( |
|
) |
[signal] |
Emitted when new metadata is available.
| 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.
| int SoundCore::precision |
( |
|
) |
|
Returns sample size (in bits).
| void SoundCore::precisionChanged |
( |
int |
precision |
) |
[signal] |
Emitted when sample size has changed.
- Parameters:
-
| precision | New sample size (in bits) |
| int SoundCore::rightVolume |
( |
|
) |
|
Returns left volume level.
| void SoundCore::seek |
( |
qint64 |
pos |
) |
[slot] |
This function sets the current play position to pos in milliseconds.
| void SoundCore::setEQ |
( |
double |
bands[10], |
|
|
double |
preamp | |
|
) |
| | |
Sets equalizer settings. Each item of bands[] and reamp should be -20.0..20.0
| void SoundCore::setEQEnabled |
( |
bool |
on |
) |
|
Enables equalizer if on is true or disables it if on is false
| void SoundCore::setVolume |
( |
int |
left, |
|
|
int |
right | |
|
) |
| | [slot] |
Sets volume.
- Parameters:
-
| left | - volume of the left channel [0..100]. |
| right | - volume of the right channel [0..100]. |
Returns the current state.
| void SoundCore::stateChanged |
( |
Qmmp::State |
newState |
) |
[signal] |
This signal is emitted when the state of the SoundCore has changed.
| void SoundCore::stop |
( |
|
) |
[slot] |
| qint64 SoundCore::totalTime |
( |
|
) |
const |
Returns length in milliseconds
| const QString SoundCore::url |
( |
|
) |
[slot] |
This function returns file path or stream url.
| void SoundCore::volumeChanged |
( |
int |
left, |
|
|
int |
right | |
|
) |
| | [signal] |
Emitted when volume has changed.
- Parameters:
-
| left | Left channel volume level. It should be [0..100] |
| right | Right channel volume level. It should be [0..100] |
The documentation for this class was generated from the following file: