mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 15:22:15 +00:00
- added a gme_stereodepth CVAR.
This commit is contained in:
parent
3412bdf5dc
commit
03ac816e83
3 changed files with 27 additions and 0 deletions
|
@ -279,6 +279,10 @@ void MusInfo::TimidityVolumeChanged()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MusInfo::GMEDepthChanged(float val)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void MusInfo::FluidSettingInt(const char *, int)
|
void MusInfo::FluidSettingInt(const char *, int)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,6 +84,7 @@ public:
|
||||||
virtual void FluidSettingNum(const char *setting, double value); // "
|
virtual void FluidSettingNum(const char *setting, double value); // "
|
||||||
virtual void FluidSettingStr(const char *setting, const char *value); // "
|
virtual void FluidSettingStr(const char *setting, const char *value); // "
|
||||||
virtual void WildMidiSetOption(int opt, int set);
|
virtual void WildMidiSetOption(int opt, int set);
|
||||||
|
virtual void GMEDepthChanged(float val);
|
||||||
|
|
||||||
void Start(bool loop, float rel_vol = -1.f, int subsong = 0);
|
void Start(bool loop, float rel_vol = -1.f, int subsong = 0);
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
#include <gme/gme.h>
|
#include <gme/gme.h>
|
||||||
#include "v_text.h"
|
#include "v_text.h"
|
||||||
#include "files.h"
|
#include "files.h"
|
||||||
|
#include "templates.h"
|
||||||
|
|
||||||
// MACROS ------------------------------------------------------------------
|
// MACROS ------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -67,6 +68,7 @@ protected:
|
||||||
bool StartTrack(int track, bool getcritsec=true);
|
bool StartTrack(int track, bool getcritsec=true);
|
||||||
bool GetTrackInfo();
|
bool GetTrackInfo();
|
||||||
int CalcSongLength();
|
int CalcSongLength();
|
||||||
|
void GMEDepthChanged(float val);
|
||||||
|
|
||||||
static bool Read(SoundStream *stream, void *buff, int len, void *userdata);
|
static bool Read(SoundStream *stream, void *buff, int len, void *userdata);
|
||||||
};
|
};
|
||||||
|
@ -84,6 +86,12 @@ protected:
|
||||||
// Currently not used.
|
// Currently not used.
|
||||||
CVAR (Float, spc_amp, 1.875f, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
CVAR (Float, spc_amp, 1.875f, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||||
|
|
||||||
|
CUSTOM_CVAR(Float, gme_stereodepth, 0.f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||||
|
{
|
||||||
|
if (currSong != nullptr)
|
||||||
|
currSong->GMEDepthChanged(self);
|
||||||
|
}
|
||||||
|
|
||||||
// PRIVATE DATA DEFINITIONS ------------------------------------------------
|
// PRIVATE DATA DEFINITIONS ------------------------------------------------
|
||||||
|
|
||||||
// CODE --------------------------------------------------------------------
|
// CODE --------------------------------------------------------------------
|
||||||
|
@ -146,6 +154,7 @@ MusInfo *GME_OpenSong(FileReader &reader, const char *fmt)
|
||||||
reader.Seek(fpos, SEEK_SET);
|
reader.Seek(fpos, SEEK_SET);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
gme_set_stereo_depth(emu, clamp(*gme_stereodepth, 0.f, 1.f));
|
||||||
return new GMESong(emu, sample_rate);
|
return new GMESong(emu, sample_rate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -189,6 +198,19 @@ GMESong::~GMESong()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//==========================================================================
|
||||||
|
//
|
||||||
|
// GMESong :: GMEDepthChanged
|
||||||
|
//
|
||||||
|
//==========================================================================
|
||||||
|
|
||||||
|
void GMESong::GMEDepthChanged(float val)
|
||||||
|
{
|
||||||
|
if (Emu != nullptr)
|
||||||
|
gme_set_stereo_depth(Emu, clamp(val, 0.f, 1.f));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
//
|
//
|
||||||
// GMESong :: Play
|
// GMESong :: Play
|
||||||
|
|
Loading…
Reference in a new issue