Skip to content
Permalink
Browse files
GME,ADL,OPN: Added Gain "g=" path argument support
It allows to control the volume level of certain songs played through three of these libraries.
  • Loading branch information
Wohlstand committed Oct 15, 2019
1 parent 659631b commit 0ebf7efd30c046f9e98f8bde4432ee682eea2336
Show file tree
Hide file tree
Showing 5 changed files with 491 additions and 361 deletions.
@@ -103,7 +103,7 @@ MusPlayer_Qt::MusPlayer_Qt(QWidget *parent) : QMainWindow(parent),
//ui->playListPop->setVisible(false);

ui->volume->setValue(setup.value("Volume", 128).toInt());
m_prevTrackID = ui->trackID->value();
m_prevTrackID = ui->trackID->value();
ui->gme_setup->setEnabled(false);
ui->tempoFrame->setEnabled(false);

@@ -404,7 +404,7 @@ void MusPlayer_Qt::on_play_clicked()
#if defined(SDL_MIXER_X) || defined(SDL_MIXER_GE21)
QString midiRawArgs = m_setupMidi->getRawMidiArgs();
if(ui->gme_setup->isEnabled())
musicPath += "|" + ui->trackID->text();
musicPath += "|" + ui->trackID->text() + ";" + midiRawArgs;
else if((PGE_MusicPlayer::type == MUS_MID || PGE_MusicPlayer::type == MUS_ADLMIDI))
{
if(midiRawArgs.isEmpty())
@@ -457,7 +457,10 @@ void SetupMidi::on_midiRawArgs_editingFinished()
{
if(ui->midiRawArgs->isModified())
{
if(Mix_PlayingMusicStream(PGE_MusicPlayer::play_mus) && (PGE_MusicPlayer::type == MUS_MID || PGE_MusicPlayer::type == MUS_ADLMIDI))
if(Mix_PlayingMusicStream(PGE_MusicPlayer::play_mus) &&
(PGE_MusicPlayer::type == MUS_MID ||
PGE_MusicPlayer::type == MUS_ADLMIDI ||
PGE_MusicPlayer::type == MUS_GME))
{
emit songRestartNeeded();
}

0 comments on commit 0ebf7ef

Please sign in to comment.