![]() |
Just Intonation
Version 1.3.1 (19)
Explore key-independent dynamically adapting tuning in just intonation
|
Class for playing a startup soundThis module manages to play a short audio file at startup (welcome jingle). More...
#include <startupsound.h>
Public Slots | |
void | enable (bool enabled) |
Public slot: Enable / disable startup sound. More... | |
void | play (double volume) |
Play startup sound. More... | |
Public Member Functions | |
StartupSound (const QString &resourcefile) | |
Constructor. More... | |
bool | isEnabled () |
StartupSound::isEnabled. More... | |
void | setVerbosity (int verbosity) |
Set the verbosity level of the class-specific messages. More... | |
int | getVerbosity () |
Get the actual verbosity level. More... | |
Private Attributes | |
QString | mResourceFile |
Resource file object. More... | |
QMediaPlayer | mPlayer |
Pointer to the player. More... | |
Class for playing a startup sound
This module manages to play a short audio file at startup (welcome jingle).
This module manages to play a short audio file at startup. The file should be stored both in mp3 format (for Apple) and int ogg format (for Linux and Android) as resource files (qrc:/...). The QMediaPlayer forwards the request to a platform-dependent streamer. Since some streamers cannot process resource files directly, the audio file (specified when calling the constructor) is first downloaded and then played.
Definition at line 46 of file startupsound.h.
StartupSound::StartupSound | ( | const QString & | resourcefile | ) |
Constructor.
resourcefile | : Location of the resource audio file |
Definition at line 41 of file startupsound.cpp.
|
slot |
Public slot: Enable / disable startup sound.
This function enables or disables the startup sounds and stores this information in the QSettings.
enabled | : True if startup sound is enabled, false otherwise |
Definition at line 75 of file startupsound.cpp.
|
inherited |
bool StartupSound::isEnabled | ( | ) |
Definition at line 58 of file startupsound.cpp.
|
slot |
Play startup sound.
This function plays the startup sound from a resource that was specified when calling the constructor. A QMediaPlayer is created dynamically in the heap and it is not deleted. Therefore, do not use this function repeatedly for recurrent sounds.
volume | : Volume [0..1] |
Definition at line 95 of file startupsound.cpp.
|
inherited |
|
private |
Pointer to the player.
Definition at line 59 of file startupsound.h.
|
private |
Resource file object.
Definition at line 58 of file startupsound.h.