diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-04-21 03:26:29 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-04-21 03:26:29 +0300 |
commit | d83a092ae6271c78a66e1ef3de6e6f6eb40a566e (patch) | |
tree | 454a8f6abc314ceb717b73fd5ee676efa9768c4c /src/gui | |
parent | 188bfbdc024afe71be191d17a12bf5bf12077065 (diff) | |
download | manaverse-d83a092ae6271c78a66e1ef3de6e6f6eb40a566e.tar.gz manaverse-d83a092ae6271c78a66e1ef3de6e6f6eb40a566e.tar.bz2 manaverse-d83a092ae6271c78a66e1ef3de6e6f6eb40a566e.tar.xz manaverse-d83a092ae6271c78a66e1ef3de6e6f6eb40a566e.zip |
Add audio frequency and audio channels settings.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/setup_audio.cpp | 16 | ||||
-rw-r--r-- | src/gui/setup_audio.h | 3 |
2 files changed, 18 insertions, 1 deletions
diff --git a/src/gui/setup_audio.cpp b/src/gui/setup_audio.cpp index 69ca4e759..c5efa63ad 100644 --- a/src/gui/setup_audio.cpp +++ b/src/gui/setup_audio.cpp @@ -31,7 +31,6 @@ #include "gui/widgets/layouthelper.h" #include "gui/widgets/namesmodel.h" #include "gui/widgets/scrollarea.h" -#include "gui/widgets/setupitem.h" #include "utils/gettext.h" @@ -80,6 +79,18 @@ Setup_Audio::Setup_Audio() new SetupItemSlider(_("Music volume"), "", "musicVolume", this, "musicVolumeEvent", 0, sound.getMaxVolume(), 150, true); + new SetupItemIntTextField(_("Audio frequency"), "", + "audioFrequency", this, "audioFrequencyEvent", 14000, 192000); + + mChannelsList = new SetupItemNames(); + mChannelsList->push_back(_("mono")); + mChannelsList->push_back(_("stereo")); + mChannelsList->push_back(_("surround")); + mChannelsList->push_back(_("surround+center+lfe")); + new SetupItemSlider2(_("Audio channels"), "", "audioChannels", this, + "audioChannels", 1, 4, mChannelsList); + + new SetupItemLabel(_("Sound effects"), "", this); new SetupItemSound(_("Information dialog sound"), "", @@ -121,6 +132,9 @@ Setup_Audio::~Setup_Audio() { delete mSoundModel; mSoundModel = nullptr; + + delete mChannelsList; + mChannelsList = nullptr; } void Setup_Audio::apply() diff --git a/src/gui/setup_audio.h b/src/gui/setup_audio.h index 21b661bcb..e79beaab0 100644 --- a/src/gui/setup_audio.h +++ b/src/gui/setup_audio.h @@ -25,6 +25,7 @@ #include "guichanfwd.h" +#include "gui/widgets/setupitem.h" #include "gui/widgets/setuptabscroll.h" #include <guichan/actionlistener.hpp> @@ -40,6 +41,8 @@ class Setup_Audio : public SetupTabScroll private: gcn::ListModel *mSoundModel; + + SetupItemNames *mChannelsList; }; #endif |