GTK :
Fixed build by removing obsolete sound options SDL : Still broken
This commit is contained in:
parent
43572d4e60
commit
f5c7bb5d28
|
@ -232,6 +232,7 @@ INCLUDE_DIRECTORIES(
|
||||||
IF( CAN_BUILD_GVBAM )
|
IF( CAN_BUILD_GVBAM )
|
||||||
INCLUDE_DIRECTORIES(
|
INCLUDE_DIRECTORIES(
|
||||||
${GTKMM_INCLUDE_DIRS}
|
${GTKMM_INCLUDE_DIRS}
|
||||||
|
${GTKGLMM_INCLUDE_DIRS}
|
||||||
${GLADEMM_INCLUDE_DIRS}
|
${GLADEMM_INCLUDE_DIRS}
|
||||||
)
|
)
|
||||||
ENDIF( CAN_BUILD_GVBAM )
|
ENDIF( CAN_BUILD_GVBAM )
|
||||||
|
|
|
@ -905,108 +905,6 @@
|
||||||
<property name="use_underline">True</property>
|
<property name="use_underline">True</property>
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkMenu" id="SoundMenu_menu">
|
<widget class="GtkMenu" id="SoundMenu_menu">
|
||||||
<child>
|
|
||||||
<widget class="GtkRadioMenuItem" id="SoundOff">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="label" translatable="yes">O_ff</property>
|
|
||||||
<property name="use_underline">True</property>
|
|
||||||
<property name="active">True</property>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<widget class="GtkRadioMenuItem" id="SoundMute">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="label" translatable="yes">_Mute</property>
|
|
||||||
<property name="use_underline">True</property>
|
|
||||||
<property name="group">SoundOff</property>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<widget class="GtkRadioMenuItem" id="SoundOn">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="label" translatable="yes">_On</property>
|
|
||||||
<property name="use_underline">True</property>
|
|
||||||
<property name="group">SoundOff</property>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<widget class="GtkSeparatorMenuItem" id="separator11">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<widget class="GtkCheckMenuItem" id="SoundEcho">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="label" translatable="yes">Echo</property>
|
|
||||||
<property name="use_underline">True</property>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<widget class="GtkCheckMenuItem" id="SoundLowPass">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="label" translatable="yes">Low pass filter</property>
|
|
||||||
<property name="use_underline">True</property>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<widget class="GtkCheckMenuItem" id="SoundReverseStereo">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="label" translatable="yes">Reverse stereo</property>
|
|
||||||
<property name="use_underline">True</property>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<widget class="GtkSeparatorMenuItem" id="separator13">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<widget class="GtkCheckMenuItem" id="SoundChannel1">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="label" translatable="yes">Channel _1</property>
|
|
||||||
<property name="use_underline">True</property>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<widget class="GtkCheckMenuItem" id="SoundChannel2">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="label" translatable="yes">Channel _2</property>
|
|
||||||
<property name="use_underline">True</property>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<widget class="GtkCheckMenuItem" id="SoundChannel3">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="label" translatable="yes">Channel _3</property>
|
|
||||||
<property name="use_underline">True</property>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<widget class="GtkCheckMenuItem" id="SoundChannel4">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="label" translatable="yes">Channel _4</property>
|
|
||||||
<property name="use_underline">True</property>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<widget class="GtkCheckMenuItem" id="SoundChannelA">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="label" translatable="yes">Channel _A</property>
|
|
||||||
<property name="use_underline">True</property>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<widget class="GtkCheckMenuItem" id="SoundChannelB">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="label" translatable="yes">Channel _B</property>
|
|
||||||
<property name="use_underline">True</property>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<widget class="GtkSeparatorMenuItem" id="separator14">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkRadioMenuItem" id="Sound11Khz">
|
<widget class="GtkRadioMenuItem" id="Sound11Khz">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
|
|
|
@ -78,8 +78,8 @@ Window::Window(GtkWindow * _pstWindow, const Glib::RefPtr<Xml> & _poXml) :
|
||||||
m_iSaveTypeMax (SaveNone),
|
m_iSaveTypeMax (SaveNone),
|
||||||
m_iSoundQualityMin(Sound44K),
|
m_iSoundQualityMin(Sound44K),
|
||||||
m_iSoundQualityMax(Sound11K),
|
m_iSoundQualityMax(Sound11K),
|
||||||
m_iSoundVolumeMin (Sound100),
|
m_fSoundVolumeMin (0.50f),
|
||||||
m_iSoundVolumeMax (Sound50),
|
m_fSoundVolumeMax (4.00f),
|
||||||
m_iEmulatorTypeMin(EmulatorAuto),
|
m_iEmulatorTypeMin(EmulatorAuto),
|
||||||
m_iEmulatorTypeMax(EmulatorSGB2),
|
m_iEmulatorTypeMax(EmulatorSGB2),
|
||||||
m_iFilter2xMin (FirstFilter),
|
m_iFilter2xMin (FirstFilter),
|
||||||
|
@ -509,85 +509,6 @@ Window::Window(GtkWindow * _pstWindow, const Glib::RefPtr<Xml> & _poXml) :
|
||||||
|
|
||||||
// Sound menu
|
// Sound menu
|
||||||
//
|
//
|
||||||
std::string sDefaultSoundStatus = m_poSoundConfig->sGetKey("status");
|
|
||||||
|
|
||||||
poCMI = dynamic_cast<Gtk::CheckMenuItem *>(_poXml->get_widget("SoundOff"));
|
|
||||||
if (sDefaultSoundStatus == "off")
|
|
||||||
{
|
|
||||||
poCMI->set_active();
|
|
||||||
vOnSoundStatusToggled(poCMI, SoundOff);
|
|
||||||
}
|
|
||||||
poCMI->signal_toggled().connect(sigc::bind(
|
|
||||||
sigc::mem_fun(*this, &Window::vOnSoundStatusToggled),
|
|
||||||
poCMI, SoundOff));
|
|
||||||
m_poSoundOffItem = poCMI;
|
|
||||||
|
|
||||||
poCMI = dynamic_cast<Gtk::CheckMenuItem *>(_poXml->get_widget("SoundMute"));
|
|
||||||
if (sDefaultSoundStatus == "mute")
|
|
||||||
{
|
|
||||||
poCMI->set_active();
|
|
||||||
vOnSoundStatusToggled(poCMI, SoundMute);
|
|
||||||
}
|
|
||||||
poCMI->signal_toggled().connect(sigc::bind(
|
|
||||||
sigc::mem_fun(*this, &Window::vOnSoundStatusToggled),
|
|
||||||
poCMI, SoundMute));
|
|
||||||
|
|
||||||
poCMI = dynamic_cast<Gtk::CheckMenuItem *>(_poXml->get_widget("SoundOn"));
|
|
||||||
if (sDefaultSoundStatus == "on")
|
|
||||||
{
|
|
||||||
poCMI->set_active();
|
|
||||||
vOnSoundStatusToggled(poCMI, SoundOn);
|
|
||||||
}
|
|
||||||
poCMI->signal_toggled().connect(sigc::bind(
|
|
||||||
sigc::mem_fun(*this, &Window::vOnSoundStatusToggled),
|
|
||||||
poCMI, SoundOn));
|
|
||||||
|
|
||||||
poCMI = dynamic_cast<Gtk::CheckMenuItem *>(_poXml->get_widget("SoundEcho"));
|
|
||||||
poCMI->set_active(m_poSoundConfig->oGetKey<bool>("echo"));
|
|
||||||
vOnSoundEchoToggled(poCMI);
|
|
||||||
poCMI->signal_toggled().connect(sigc::bind(
|
|
||||||
sigc::mem_fun(*this, &Window::vOnSoundEchoToggled),
|
|
||||||
poCMI));
|
|
||||||
|
|
||||||
poCMI = dynamic_cast<Gtk::CheckMenuItem *>(_poXml->get_widget("SoundLowPass"));
|
|
||||||
poCMI->set_active(m_poSoundConfig->oGetKey<bool>("low_pass"));
|
|
||||||
vOnSoundLowPassToggled(poCMI);
|
|
||||||
poCMI->signal_toggled().connect(sigc::bind(
|
|
||||||
sigc::mem_fun(*this, &Window::vOnSoundLowPassToggled),
|
|
||||||
poCMI));
|
|
||||||
|
|
||||||
poCMI = dynamic_cast<Gtk::CheckMenuItem *>(_poXml->get_widget("SoundReverseStereo"));
|
|
||||||
poCMI->set_active(m_poSoundConfig->oGetKey<bool>("reverse_stereo"));
|
|
||||||
vOnSoundReverseToggled(poCMI);
|
|
||||||
poCMI->signal_toggled().connect(sigc::bind(
|
|
||||||
sigc::mem_fun(*this, &Window::vOnSoundReverseToggled),
|
|
||||||
poCMI));
|
|
||||||
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
const char * m_csName;
|
|
||||||
const char * m_csKey;
|
|
||||||
const int m_iSoundChannel;
|
|
||||||
}
|
|
||||||
astSoundChannel[] =
|
|
||||||
{
|
|
||||||
{ "SoundChannel1", "channel_1", 0 },
|
|
||||||
{ "SoundChannel2", "channel_2", 1 },
|
|
||||||
{ "SoundChannel3", "channel_3", 2 },
|
|
||||||
{ "SoundChannel4", "channel_4", 3 },
|
|
||||||
{ "SoundChannelA", "channel_A", 4 },
|
|
||||||
{ "SoundChannelB", "channel_B", 5 }
|
|
||||||
};
|
|
||||||
for (guint i = 0; i < G_N_ELEMENTS(astSoundChannel); i++)
|
|
||||||
{
|
|
||||||
poCMI = dynamic_cast<Gtk::CheckMenuItem *>(_poXml->get_widget(astSoundChannel[i].m_csName));
|
|
||||||
poCMI->set_active(m_poSoundConfig->oGetKey<bool>(astSoundChannel[i].m_csKey));
|
|
||||||
vOnSoundChannelToggled(poCMI, astSoundChannel[i].m_iSoundChannel);
|
|
||||||
poCMI->signal_toggled().connect(sigc::bind(
|
|
||||||
sigc::mem_fun(*this, &Window::vOnSoundChannelToggled),
|
|
||||||
poCMI, astSoundChannel[i].m_iSoundChannel));
|
|
||||||
}
|
|
||||||
|
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
const char * m_csName;
|
const char * m_csName;
|
||||||
|
@ -618,29 +539,29 @@ Window::Window(GtkWindow * _pstWindow, const Glib::RefPtr<Xml> & _poXml) :
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
const char * m_csName;
|
const char * m_csName;
|
||||||
const ESoundVolume m_eSoundVolume;
|
const float m_fSoundVolume;
|
||||||
}
|
}
|
||||||
astSoundVolume[] =
|
astSoundVolume[] =
|
||||||
{
|
{
|
||||||
{ "Volume25", Sound25 },
|
{ "Volume25", 0.25f },
|
||||||
{ "Volume50", Sound50 },
|
{ "Volume50", 0.50f },
|
||||||
{ "Volume100", Sound100 },
|
{ "Volume100", 1.00f },
|
||||||
{ "Volume200", Sound200 },
|
{ "Volume200", 2.00f },
|
||||||
{ "Volume300", Sound300 },
|
{ "Volume300", 3.00f },
|
||||||
{ "Volume400", Sound400 }
|
{ "Volume400", 4.00f }
|
||||||
};
|
};
|
||||||
ESoundVolume eDefaultSoundVolume = (ESoundVolume)m_poSoundConfig->oGetKey<int>("volume");
|
float fDefaultSoundVolume = m_poSoundConfig->oGetKey<float>("volume");
|
||||||
for (guint i = 0; i < G_N_ELEMENTS(astSoundVolume); i++)
|
for (guint i = 0; i < G_N_ELEMENTS(astSoundVolume); i++)
|
||||||
{
|
{
|
||||||
poCMI = dynamic_cast<Gtk::CheckMenuItem *>(_poXml->get_widget(astSoundVolume[i].m_csName));
|
poCMI = dynamic_cast<Gtk::CheckMenuItem *>(_poXml->get_widget(astSoundVolume[i].m_csName));
|
||||||
if (astSoundVolume[i].m_eSoundVolume == eDefaultSoundVolume)
|
if (astSoundVolume[i].m_fSoundVolume == fDefaultSoundVolume)
|
||||||
{
|
{
|
||||||
poCMI->set_active();
|
poCMI->set_active();
|
||||||
vOnSoundVolumeToggled(poCMI, eDefaultSoundVolume);
|
vOnSoundVolumeToggled(poCMI, fDefaultSoundVolume);
|
||||||
}
|
}
|
||||||
poCMI->signal_toggled().connect(sigc::bind(
|
poCMI->signal_toggled().connect(sigc::bind(
|
||||||
sigc::mem_fun(*this, &Window::vOnSoundVolumeToggled),
|
sigc::mem_fun(*this, &Window::vOnSoundVolumeToggled),
|
||||||
poCMI, astSoundVolume[i].m_eSoundVolume));
|
poCMI, astSoundVolume[i].m_fSoundVolume));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Gameboy menu
|
// Gameboy menu
|
||||||
|
@ -934,7 +855,6 @@ void Window::vInitSystem()
|
||||||
systemVerbose = 0;
|
systemVerbose = 0;
|
||||||
systemSaveUpdateCounter = SYSTEM_SAVE_NOT_UPDATED;
|
systemSaveUpdateCounter = SYSTEM_SAVE_NOT_UPDATED;
|
||||||
systemFrameSkip = 2;
|
systemFrameSkip = 2;
|
||||||
soundOffFlag = true;
|
|
||||||
|
|
||||||
systemRenderedFrames = 0;
|
systemRenderedFrames = 0;
|
||||||
systemFPS = 0;
|
systemFPS = 0;
|
||||||
|
@ -1031,7 +951,7 @@ void Window::vInitConfig()
|
||||||
m_poSoundConfig->vSetKey("channel_A", true );
|
m_poSoundConfig->vSetKey("channel_A", true );
|
||||||
m_poSoundConfig->vSetKey("channel_B", true );
|
m_poSoundConfig->vSetKey("channel_B", true );
|
||||||
m_poSoundConfig->vSetKey("quality", Sound22K );
|
m_poSoundConfig->vSetKey("quality", Sound22K );
|
||||||
m_poSoundConfig->vSetKey("volume", Sound100 );
|
m_poSoundConfig->vSetKey("volume", 1.00f );
|
||||||
|
|
||||||
// Input section
|
// Input section
|
||||||
//
|
//
|
||||||
|
@ -1067,6 +987,8 @@ void Window::vCheckConfig()
|
||||||
{
|
{
|
||||||
int iValue;
|
int iValue;
|
||||||
int iAdjusted;
|
int iAdjusted;
|
||||||
|
float fValue;
|
||||||
|
float fAdjusted;
|
||||||
std::string sValue;
|
std::string sValue;
|
||||||
|
|
||||||
// Directories section
|
// Directories section
|
||||||
|
@ -1204,11 +1126,11 @@ void Window::vCheckConfig()
|
||||||
m_poSoundConfig->vSetKey("quality", iAdjusted);
|
m_poSoundConfig->vSetKey("quality", iAdjusted);
|
||||||
}
|
}
|
||||||
|
|
||||||
iValue = m_poSoundConfig->oGetKey<int>("volume");
|
fValue = m_poSoundConfig->oGetKey<float>("volume");
|
||||||
iAdjusted = CLAMP(iValue, m_iSoundVolumeMin, m_iSoundVolumeMax);
|
fAdjusted = CLAMP(fValue, m_fSoundVolumeMin, m_fSoundVolumeMax);
|
||||||
if (iValue != iAdjusted)
|
if (fValue != fAdjusted)
|
||||||
{
|
{
|
||||||
m_poSoundConfig->vSetKey("volume", iAdjusted);
|
m_poSoundConfig->vSetKey("volume", fAdjusted);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Input section
|
// Input section
|
||||||
|
|
|
@ -111,16 +111,6 @@ protected:
|
||||||
Sound11K = 4
|
Sound11K = 4
|
||||||
};
|
};
|
||||||
|
|
||||||
enum ESoundVolume
|
|
||||||
{
|
|
||||||
Sound100,
|
|
||||||
Sound200,
|
|
||||||
Sound300,
|
|
||||||
Sound400,
|
|
||||||
Sound25,
|
|
||||||
Sound50
|
|
||||||
};
|
|
||||||
|
|
||||||
enum EEmulatorType
|
enum EEmulatorType
|
||||||
{
|
{
|
||||||
EmulatorAuto,
|
EmulatorAuto,
|
||||||
|
@ -168,13 +158,8 @@ protected:
|
||||||
virtual void vOnShowSpeedToggled(Gtk::CheckMenuItem * _poCMI, int _iShowSpeed);
|
virtual void vOnShowSpeedToggled(Gtk::CheckMenuItem * _poCMI, int _iShowSpeed);
|
||||||
virtual void vOnSaveTypeToggled(Gtk::CheckMenuItem * _poCMI, int _iSaveType);
|
virtual void vOnSaveTypeToggled(Gtk::CheckMenuItem * _poCMI, int _iSaveType);
|
||||||
virtual void vOnFlashSizeToggled(Gtk::CheckMenuItem * _poCMI, int _iFlashSize);
|
virtual void vOnFlashSizeToggled(Gtk::CheckMenuItem * _poCMI, int _iFlashSize);
|
||||||
virtual void vOnSoundStatusToggled(Gtk::CheckMenuItem * _poCMI, int _iSoundStatus);
|
|
||||||
virtual void vOnSoundEchoToggled(Gtk::CheckMenuItem * _poCMI);
|
|
||||||
virtual void vOnSoundLowPassToggled(Gtk::CheckMenuItem * _poCMI);
|
|
||||||
virtual void vOnSoundReverseToggled(Gtk::CheckMenuItem * _poCMI);
|
|
||||||
virtual void vOnSoundChannelToggled(Gtk::CheckMenuItem * _poCMI, int _iSoundChannel);
|
|
||||||
virtual void vOnSoundQualityToggled(Gtk::CheckMenuItem * _poCMI, int _iSoundQuality);
|
virtual void vOnSoundQualityToggled(Gtk::CheckMenuItem * _poCMI, int _iSoundQuality);
|
||||||
virtual void vOnSoundVolumeToggled(Gtk::CheckMenuItem * _poCMI, int _iSoundVolume);
|
virtual void vOnSoundVolumeToggled(Gtk::CheckMenuItem * _poCMI, float _fSoundVolume);
|
||||||
virtual void vOnGBBorderToggled(Gtk::CheckMenuItem * _poCMI);
|
virtual void vOnGBBorderToggled(Gtk::CheckMenuItem * _poCMI);
|
||||||
virtual void vOnGBPrinterToggled(Gtk::CheckMenuItem * _poCMI);
|
virtual void vOnGBPrinterToggled(Gtk::CheckMenuItem * _poCMI);
|
||||||
virtual void vOnEmulatorTypeToggled(Gtk::CheckMenuItem * _poCMI, int _iEmulatorType);
|
virtual void vOnEmulatorTypeToggled(Gtk::CheckMenuItem * _poCMI, int _iEmulatorType);
|
||||||
|
@ -212,8 +197,8 @@ private:
|
||||||
const int m_iSaveTypeMax;
|
const int m_iSaveTypeMax;
|
||||||
const int m_iSoundQualityMin;
|
const int m_iSoundQualityMin;
|
||||||
const int m_iSoundQualityMax;
|
const int m_iSoundQualityMax;
|
||||||
const int m_iSoundVolumeMin;
|
const float m_fSoundVolumeMin;
|
||||||
const int m_iSoundVolumeMax;
|
const float m_fSoundVolumeMax;
|
||||||
const int m_iEmulatorTypeMin;
|
const int m_iEmulatorTypeMin;
|
||||||
const int m_iEmulatorTypeMax;
|
const int m_iEmulatorTypeMax;
|
||||||
const int m_iFilter2xMin;
|
const int m_iFilter2xMin;
|
||||||
|
|
|
@ -752,95 +752,6 @@ void Window::vOnFlashSizeToggled(Gtk::CheckMenuItem * _poCMI, int _iFlashSize)
|
||||||
m_poCoreConfig->vSetKey("flash_size", _iFlashSize);
|
m_poCoreConfig->vSetKey("flash_size", _iFlashSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Window::vOnSoundStatusToggled(Gtk::CheckMenuItem * _poCMI, int _iSoundStatus)
|
|
||||||
{
|
|
||||||
if (! _poCMI->get_active())
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string sSoundStatus;
|
|
||||||
switch (_iSoundStatus)
|
|
||||||
{
|
|
||||||
case SoundOff:
|
|
||||||
soundOffFlag = true;
|
|
||||||
if (systemSoundOn)
|
|
||||||
{
|
|
||||||
soundShutdown();
|
|
||||||
}
|
|
||||||
sSoundStatus = "off";
|
|
||||||
break;
|
|
||||||
case SoundMute:
|
|
||||||
soundDisable(0x30f);
|
|
||||||
sSoundStatus = "mute";
|
|
||||||
break;
|
|
||||||
case SoundOn:
|
|
||||||
if (soundOffFlag)
|
|
||||||
{
|
|
||||||
soundOffFlag = false;
|
|
||||||
if (! soundInit())
|
|
||||||
{
|
|
||||||
m_poSoundOffItem->set_active();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
soundEnable(0x30f);
|
|
||||||
sSoundStatus = "on";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
m_poSoundConfig->vSetKey("status", sSoundStatus);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Window::vOnSoundEchoToggled(Gtk::CheckMenuItem * _poCMI)
|
|
||||||
{
|
|
||||||
soundEcho = _poCMI->get_active();
|
|
||||||
m_poSoundConfig->vSetKey("echo", soundEcho);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Window::vOnSoundLowPassToggled(Gtk::CheckMenuItem * _poCMI)
|
|
||||||
{
|
|
||||||
soundLowPass = _poCMI->get_active();
|
|
||||||
m_poSoundConfig->vSetKey("low_pass", soundLowPass);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Window::vOnSoundReverseToggled(Gtk::CheckMenuItem * _poCMI)
|
|
||||||
{
|
|
||||||
soundReverse = _poCMI->get_active();
|
|
||||||
m_poSoundConfig->vSetKey("reverse_stereo", soundReverse);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Window::vOnSoundChannelToggled(Gtk::CheckMenuItem * _poCMI, int _iSoundChannel)
|
|
||||||
{
|
|
||||||
int iShift = _iSoundChannel;
|
|
||||||
if (_iSoundChannel > 3)
|
|
||||||
{
|
|
||||||
iShift += 4;
|
|
||||||
}
|
|
||||||
int iFlag = 1 << iShift;
|
|
||||||
int iActive = soundGetEnable() & 0x30f;
|
|
||||||
if (_poCMI->get_active())
|
|
||||||
{
|
|
||||||
iActive |= iFlag;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
iActive &= ~iFlag;
|
|
||||||
}
|
|
||||||
soundEnable(iActive);
|
|
||||||
soundDisable(~iActive & 0x30f);
|
|
||||||
|
|
||||||
const char * acsChannels[] =
|
|
||||||
{
|
|
||||||
"channel_1",
|
|
||||||
"channel_2",
|
|
||||||
"channel_3",
|
|
||||||
"channel_4",
|
|
||||||
"channel_A",
|
|
||||||
"channel_B"
|
|
||||||
};
|
|
||||||
m_poSoundConfig->vSetKey(acsChannels[_iSoundChannel], _poCMI->get_active());
|
|
||||||
}
|
|
||||||
|
|
||||||
void Window::vOnSoundQualityToggled(Gtk::CheckMenuItem * _poCMI, int _iSoundQuality)
|
void Window::vOnSoundQualityToggled(Gtk::CheckMenuItem * _poCMI, int _iSoundQuality)
|
||||||
{
|
{
|
||||||
if (! _poCMI->get_active())
|
if (! _poCMI->get_active())
|
||||||
|
@ -860,14 +771,14 @@ void Window::vOnSoundQualityToggled(Gtk::CheckMenuItem * _poCMI, int _iSoundQual
|
||||||
m_poSoundConfig->vSetKey("quality", _iSoundQuality);
|
m_poSoundConfig->vSetKey("quality", _iSoundQuality);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Window::vOnSoundVolumeToggled(Gtk::CheckMenuItem * _poCMI, int _iSoundVolume)
|
void Window::vOnSoundVolumeToggled(Gtk::CheckMenuItem * _poCMI, float _iSoundVolume)
|
||||||
{
|
{
|
||||||
if (! _poCMI->get_active())
|
if (! _poCMI->get_active())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
soundVolume = _iSoundVolume;
|
soundSetVolume(_iSoundVolume);
|
||||||
m_poSoundConfig->vSetKey("volume", _iSoundVolume);
|
m_poSoundConfig->vSetKey("volume", _iSoundVolume);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue