[Scummvm-cvs-logs] SF.net SVN: scummvm: [27826] scummvm/branches/gsoc2007-mixer/gui
dogmatixman at users.sourceforge.net
dogmatixman at users.sourceforge.net
Sun Jul 1 16:58:09 CEST 2007
Revision: 27826
http://scummvm.svn.sourceforge.net/scummvm/?rev=27826&view=rev
Author: dogmatixman
Date: 2007-07-01 07:58:09 -0700 (Sun, 01 Jul 2007)
Log Message:
-----------
GUI options changes to allow the type of rate converter to be selected.
Modified Paths:
--------------
scummvm/branches/gsoc2007-mixer/gui/options.cpp
scummvm/branches/gsoc2007-mixer/gui/options.h
scummvm/branches/gsoc2007-mixer/gui/theme-config.cpp
scummvm/branches/gsoc2007-mixer/gui/themes/classic080.ini
scummvm/branches/gsoc2007-mixer/gui/themes/modern.ini
Modified: scummvm/branches/gsoc2007-mixer/gui/options.cpp
===================================================================
--- scummvm/branches/gsoc2007-mixer/gui/options.cpp 2007-07-01 14:19:12 UTC (rev 27825)
+++ scummvm/branches/gsoc2007-mixer/gui/options.cpp 2007-07-01 14:58:09 UTC (rev 27826)
@@ -87,6 +87,12 @@
"Subtitles Only"
};
+const char *OptionsDialog::_rateConverterDesc[] = {
+ "Linear (low qual, faster)",
+ "Filtering (high qual, slower)",
+ 0
+};
+
void OptionsDialog::init() {
_enableGraphicSettings = false;
_gfxPopUp = 0;
@@ -96,6 +102,7 @@
_enableAudioSettings = false;
_midiPopUp = 0;
_outputRatePopUp = 0;
+ _rateConverterPopUp = 0;
_enableMIDISettings = false;
_multiMidiCheckbox = 0;
_mt32Checkbox = 0;
@@ -187,6 +194,13 @@
_outputRatePopUp->setSelected(i);
}
}
+
+ if (_rateConverterPopUp) {
+ if (ConfMan.hasKey("rate_converter", _domain))
+ _rateConverterPopUp->setSelected(ConfMan.getInt("rate_converter", _domain));
+ else
+ _rateConverterPopUp->setSelected(0);
+ }
if (_multiMidiCheckbox) {
@@ -323,6 +337,14 @@
ConfMan.removeKey("output_rate", _domain);
}
}
+
+ if (_rateConverterPopUp) {
+ if (_enableAudioSettings) {
+ ConfMan.setInt("rate_converter", _rateConverterPopUp->getSelectedTag(), _domain);
+ } else {
+ ConfMan.removeKey("rate_converter", _domain);
+ }
+ }
// MIDI options
if (_multiMidiCheckbox) {
@@ -451,6 +473,7 @@
_midiPopUp->setEnabled(enabled);
_outputRatePopUp->setEnabled(enabled);
+ _rateConverterPopUp->setEnabled(enabled);
}
void OptionsDialog::setMIDISettingsState(bool enabled) {
@@ -555,6 +578,12 @@
_outputRatePopUp->appendEntry(outputRateLabels[i], outputRateValues[i]);
}
+ _rateConverterPopUp = new PopUpWidget(boss, prefix + "auRateConverterPopup", "Resampler:", labelWidth);
+
+ for (int i = 0; _rateConverterDesc[i]; i++) {
+ _rateConverterPopUp->appendEntry(_rateConverterDesc[i], i);
+ }
+
_enableAudioSettings = true;
}
Modified: scummvm/branches/gsoc2007-mixer/gui/options.h
===================================================================
--- scummvm/branches/gsoc2007-mixer/gui/options.h 2007-07-01 14:19:12 UTC (rev 27825)
+++ scummvm/branches/gsoc2007-mixer/gui/options.h 2007-07-01 14:58:09 UTC (rev 27826)
@@ -97,6 +97,8 @@
bool _enableAudioSettings;
PopUpWidget *_midiPopUp;
PopUpWidget *_outputRatePopUp;
+ PopUpWidget *_rateConverterPopUp;
+ static const char *_rateConverterDesc[];
//
// MIDI controls
Modified: scummvm/branches/gsoc2007-mixer/gui/theme-config.cpp
===================================================================
--- scummvm/branches/gsoc2007-mixer/gui/theme-config.cpp 2007-07-01 14:19:12 UTC (rev 27825)
+++ scummvm/branches/gsoc2007-mixer/gui/theme-config.cpp 2007-07-01 14:58:09 UTC (rev 27826)
@@ -399,6 +399,8 @@
"opYoffset=(opYoffset + buttonHeight + 4)\n"
"auSampleRatePopup=(aux - 5) (opYoffset - 1) (auw + 5) (kLineHeight + 2)\n"
"opYoffset=(opYoffset + buttonHeight + 4)\n"
+"auRateConverterPopup=(aux - 5) (opYoffset - 1) (auw + 5) (kLineHeight + 2)\n"
+"opYoffset=(opYoffset + buttonHeight + 4)\n"
"\n"
"[volumeControls]\n"
"vctextw=(95 + vcAudioTabIndent)\n"
Modified: scummvm/branches/gsoc2007-mixer/gui/themes/classic080.ini
===================================================================
--- scummvm/branches/gsoc2007-mixer/gui/themes/classic080.ini 2007-07-01 14:19:12 UTC (rev 27825)
+++ scummvm/branches/gsoc2007-mixer/gui/themes/classic080.ini 2007-07-01 14:58:09 UTC (rev 27826)
@@ -317,6 +317,8 @@
opYoffset=(opYoffset + buttonHeight + 4)
auSampleRatePopup=(aux - 5) (opYoffset - 1) (auw + 5) (kLineHeight + 2)
opYoffset=(opYoffset + buttonHeight + 4)
+auRateConverterPopup=(aux - 5) (opYoffset - 1) (auw + 5) (kLineHeight + 2)
+opYoffset=(opYoffset + buttonHeight + 4)
[volumeControls]
vctextw=(95 + vcAudioTabIndent)
Modified: scummvm/branches/gsoc2007-mixer/gui/themes/modern.ini
===================================================================
--- scummvm/branches/gsoc2007-mixer/gui/themes/modern.ini 2007-07-01 14:19:12 UTC (rev 27825)
+++ scummvm/branches/gsoc2007-mixer/gui/themes/modern.ini 2007-07-01 14:58:09 UTC (rev 27826)
@@ -494,6 +494,8 @@
opYoffset=(opYoffset + prev.h + ySeparation)
auSampleRatePopup=aux (opYoffset - 1) prev.w kPopUpHeight
opYoffset=(opYoffset + prev.h + ySeparation)
+auRateConverterPopup=aux (opYoffset - 1) prev.w kPopUpHeight
+opYoffset=(opYoffset + prev.h + ySeparation)
[volumeControls]
vcx=(opXoffset + xBorder)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list