![]() |
LIDL Soundboard
1.9.0
A simple soundboard, yet better than EXP Soundboard forsenE
|
Inherits QObject. More...
#include <soundwrapper.h>
Public Slots | |
void | Play () |
Tell the player to play the sound according to the playback mode. More... | |
void | Stop () |
Tell the player to stop playing the sound. More... | |
void | OutputDeviceChanged (int) |
Set the main output device of the player according to the combo box in the UI. More... | |
void | VACDeviceChanged (int) |
Set the VAC output device of the player according to the combo box in the UI. More... | |
void | clearShorcut () |
Clears the shortcut of the wrapper. (Display purposes) More... | |
Signals | |
void | UnexistantFile () |
Used to send warning to main ui that a file doesn't exist. More... | |
void | ErrorPlaying (QString) |
Used to send a warning to main ui that an error happened playing a file. More... | |
void | NowPlaying (QString) |
Used to send a message to main ui that a file is playing. More... | |
void | holdPTTProxy (int) |
This signal is sent whenever the "holdPTT" signal of the player is sent. More... | |
Public Member Functions | |
SoundWrapper (QObject *parent=nullptr) | |
SoundWrapper (QVector< LIDL::SoundFile * > fileList, LIDL::Playback playbackMode, QKeySequence shortcut, int shortcutVirtualKey=-1, int mainOutput=-1, int vacOutput=-1, QObject *parent=nullptr) | |
Main constructor of sound wrappers. More... | |
SoundWrapper (QVector< QString > fileList, LIDL::Playback playbackMode, int mainVolume, int vacVolume, int mainOutput, int vacOutput, QObject *parent=nullptr) | |
ILL EAGLE ILL EAGLE ILL EAGLE ILL EAGLE ILL EAGLE ILL EAGLE ILL EAGLE. More... | |
SoundWrapper (SoundWrapper *&other) | |
SoundWrapper. More... | |
QVector< LIDL::SoundFile * > | getSoundList () |
QKeySequence | getKeySequence () |
LIDL::Playback | getPlayMode () |
QString | getSoundListAsQString () |
QList< QStandardItem * > | getSoundAsItem () |
int | addSound (QString filename, float mainVolume=1.0, float vacVolume=1.0) |
Used by OpenEXPJson to add the revelant sound files. More... | |
void | setPlayerMainOutput (int index) |
Set the index of the main output device. More... | |
void | setPlayerVACOutput (int index) |
Set the index of the VAC output device. More... | |
int | getMainDevice () |
int | getVacDevice () |
unsigned int | getShortcutVirtualKey () |
QJsonObject | GetWrapperAsObject () const |
GetWrapperAsObject. More... | |
Private Member Functions | |
bool | checkFileExistence (QString fileName) |
Private Attributes | |
QVector< LIDL::SoundFile * > | _soundList |
LIDL::Playback | _playMode |
QKeySequence | _keySequence |
unsigned int | _virtualKey |
CustomPlayer * | _player |
Friends | |
bool | operator== (const SoundWrapper &a, const SoundWrapper &b) |
Deprecated. More... | |
bool | operator!= (const SoundWrapper &a, const SoundWrapper &b) |
Deprecated. More... | |
Inherits QObject.
Soundwrapper class contains all the data necessary to play one or several sounds, as well as a player capable of playing them.
|
explicit |
SoundWrapper::SoundWrapper | ( | QVector< LIDL::SoundFile * > | fileList, |
LIDL::Playback | playbackMode, | ||
QKeySequence | shortcut, | ||
int | shortcutVirtualKey = -1 , |
||
int | mainOutput = -1 , |
||
int | vacOutput = -1 , |
||
QObject * | parent = nullptr |
||
) |
Main constructor of sound wrappers.
Used to construct a soundwrapper object, used 99% of the time, except when opening EXP SOUNDBOARD json files.
fileList | The wrapper's sound list. Each sound file is associated with two volumes (Main and VAC). |
playbackMode | The playback mode of this wrapper. |
shortcut | The keysequence to be displayed in the UI. |
shortcutVirtualKey | =-1, The shortcut's virtual key to be registered in the windows api. |
mainOutput | The index of the main output. |
vacOutput | The index of the VAC ouput |
*parent | A pointer to the parent (not used). |
References _keySequence, _player, _playMode, _soundList, _virtualKey, getPlayMode(), getSoundList(), CustomPlayer::SetPlaybackMode(), setPlayerMainOutput(), setPlayerVACOutput(), and CustomPlayer::SetPlaylist().
SoundWrapper::SoundWrapper | ( | QVector< QString > | fileList, |
LIDL::Playback | playbackMode, | ||
int | mainVolume, | ||
int | vacVolume, | ||
int | mainOutput, | ||
int | vacOutput, | ||
QObject * | parent = nullptr |
||
) |
ILL EAGLE ILL EAGLE ILL EAGLE ILL EAGLE ILL EAGLE ILL EAGLE ILL EAGLE.
Main constructor of sound wrappers.
Used to construct a soundwrapper object when opening an EXP SOUNDBOARD json files.
fileList | The wrapper's sound list. Each sound file is associated with two volumes (Main and VAC). |
playbackMode | The playback mode of this wrapper. |
shortcut | The keysequence to be displayed in the UI. |
shortcutVirtualKey | =-1, The shortcut's virtual key to be registered in the windows api. |
mainOutput | The index of the main output. |
vacOutput | The index of the VAC ouput |
*parent | A pointer to the parent (not used). |
References _player, _playMode, addSound(), getPlayMode(), getSoundList(), CustomPlayer::SetPlaybackMode(), setPlayerMainOutput(), setPlayerVACOutput(), and CustomPlayer::SetPlaylist().
SoundWrapper::SoundWrapper | ( | SoundWrapper *& | other | ) |
other | Used by when copying sound from another profile :) |
References _player, _playMode, _soundList, CustomPlayer::GetOutputDevice(), getPlayMode(), getSoundList(), CustomPlayer::GetVACDevice(), CustomPlayer::SetPlaybackMode(), setPlayerMainOutput(), setPlayerVACOutput(), and CustomPlayer::SetPlaylist().
int SoundWrapper::addSound | ( | QString | filename, |
float | mainVolume = 1.0 , |
||
float | vacVolume = 1.0 |
||
) |
Used by OpenEXPJson to add the revelant sound files.
filename | the file to be added. |
mainVolume | main output volume. |
vacVolume | VAC output volume. |
References _soundList.
Referenced by SoundWrapper().
|
private |
|
slot |
Clears the shortcut of the wrapper. (Display purposes)
Will get called whenever clearing the shortcut is needed. Swap the existing key sequence with a blank one.
References _keySequence.
|
signal |
Used to send a warning to main ui that an error happened playing a file.
Referenced by SoundboardMainUI::addSound(), and SoundWrapper().
QKeySequence SoundWrapper::getKeySequence | ( | ) |
References _keySequence.
Referenced by getSoundAsItem(), SoundboardMainUI::SwapWrappers(), and WrapperProperties::WrapperProperties().
int SoundWrapper::getMainDevice | ( | ) |
References _player, and CustomPlayer::GetOutputDevice().
Referenced by SoundboardMainUI::SwapWrappers().
LIDL::Playback SoundWrapper::getPlayMode | ( | ) |
References _playMode.
Referenced by getSoundAsItem(), SoundWrapper(), SoundboardMainUI::SwapWrappers(), and WrapperProperties::WrapperProperties().
unsigned int SoundWrapper::getShortcutVirtualKey | ( | ) |
References _virtualKey.
Referenced by SoundboardMainUI::SwapWrappers(), and WrapperProperties::WrapperProperties().
QList< QStandardItem * > SoundWrapper::getSoundAsItem | ( | ) |
References _soundList, _virtualKey, LIDL::Auto, LIDL::AutoLoop, LIDL::Cancer, LIDL::CHORUS, LIDL::COMPRESSOR, LIDL::DISTORTION, LIDL::ECHO, LIDL::FLANGER, LIDL::GARGLE, getKeySequence(), getPlayMode(), getSoundListAsQString(), LIDL::Sequential, and LIDL::Singleton.
QVector< LIDL::SoundFile * > SoundWrapper::getSoundList | ( | ) |
References _soundList.
Referenced by SoundWrapper(), SoundboardMainUI::SwapWrappers(), and WrapperProperties::WrapperProperties().
QString SoundWrapper::getSoundListAsQString | ( | ) |
References _soundList, and UnexistantFile().
Referenced by getSoundAsItem().
int SoundWrapper::getVacDevice | ( | ) |
References _player, and CustomPlayer::GetVACDevice().
Referenced by SoundboardMainUI::SwapWrappers().
QJsonObject SoundWrapper::GetWrapperAsObject | ( | ) | const |
|
signal |
This signal is sent whenever the "holdPTT" signal of the player is sent.
It is used to tell the settingscontroller to hold the PTT key for the duration of the sound played.
Referenced by SoundboardMainUI::addSound(), and SoundWrapper().
|
signal |
Used to send a message to main ui that a file is playing.
Referenced by SoundboardMainUI::addSound(), and SoundWrapper().
|
slot |
Set the main output device of the player according to the combo box in the UI.
References _player, and CustomPlayer::SetOutputDevice().
|
slot |
Tell the player to play the sound according to the playback mode.
References _player, and CustomPlayer::PlayNext().
void SoundWrapper::setPlayerMainOutput | ( | int | index | ) |
Set the index of the main output device.
index | The new index |
References _player, and CustomPlayer::SetOutputDevice().
Referenced by SoundWrapper().
void SoundWrapper::setPlayerVACOutput | ( | int | index | ) |
Set the index of the VAC output device.
index | The new index |
References _player, and CustomPlayer::SetVACDevice().
Referenced by SoundWrapper().
|
slot |
Tell the player to stop playing the sound.
References _player, and CustomPlayer::Stop().
|
signal |
Used to send warning to main ui that a file doesn't exist.
This function will check if the local file exists (when opening a soundboard). It will also check if a remote file exists using a tcp/tsl socket to check the MIME type.
Referenced by SoundboardMainUI::addSound(), and getSoundListAsQString().
|
slot |
Set the VAC output device of the player according to the combo box in the UI.
References _player, and CustomPlayer::SetVACDevice().
|
friend |
Deprecated.
a | The soundwrapper to be compared against. |
b | The second soundwrapper. |
|
friend |
Deprecated.
a | The soundwrapper to be compared against. |
b | The second soundwrapper. |
|
private |
Key Sequence of the shortcut playing the sound. Can be empty. Used for displayed purposes.
Referenced by clearShorcut(), getKeySequence(), GetWrapperAsObject(), operator==(), and SoundWrapper().
|
private |
Player that will play the sound according to their volume, SFX, and playback settings.
Referenced by getMainDevice(), getVacDevice(), OutputDeviceChanged(), Play(), setPlayerMainOutput(), setPlayerVACOutput(), SoundWrapper(), Stop(), and VACDeviceChanged().
|
private |
Variable holding the playback mode (enumeration defined in EnumsAndStruct.h .
Referenced by getPlayMode(), GetWrapperAsObject(), and SoundWrapper().
|
private |
Vector containing the files.
Referenced by addSound(), getSoundAsItem(), getSoundList(), getSoundListAsQString(), GetWrapperAsObject(), operator==(), and SoundWrapper().
|
private |
Virtual Key of the shortcut playing the sound. Needed to register it into windows API.
Referenced by getShortcutVirtualKey(), getSoundAsItem(), GetWrapperAsObject(), operator==(), and SoundWrapper().