https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d301d6a3780b485ab9a7e…
commit d301d6a3780b485ab9a7e958916e7b6480071291
Author: Eric Kohl <eric.kohl(a)reactos.org>
AuthorDate: Sun Jan 20 15:57:34 2019 +0100
Commit: Eric Kohl <eric.kohl(a)reactos.org>
CommitDate: Sun Jan 20 15:59:30 2019 +0100
[MMSYS] Add the speaker volume dialog.
Retrieve information on the channels and initialize the trackbars accordingly.
---
dll/cpl/mmsys/CMakeLists.txt | 1 +
dll/cpl/mmsys/lang/bg-BG.rc | 7 +++
dll/cpl/mmsys/lang/cs-CZ.rc | 7 +++
dll/cpl/mmsys/lang/de-DE.rc | 23 ++++---
dll/cpl/mmsys/lang/el-GR.rc | 7 +++
dll/cpl/mmsys/lang/en-US.rc | 7 +++
dll/cpl/mmsys/lang/es-ES.rc | 7 +++
dll/cpl/mmsys/lang/fr-FR.rc | 7 +++
dll/cpl/mmsys/lang/he-IL.rc | 7 +++
dll/cpl/mmsys/lang/id-ID.rc | 7 +++
dll/cpl/mmsys/lang/it-IT.rc | 7 +++
dll/cpl/mmsys/lang/ja-JP.rc | 7 +++
dll/cpl/mmsys/lang/nl-NL.rc | 7 +++
dll/cpl/mmsys/lang/no-NO.rc | 7 +++
dll/cpl/mmsys/lang/pl-PL.rc | 7 +++
dll/cpl/mmsys/lang/pt-BR.rc | 7 +++
dll/cpl/mmsys/lang/ro-RO.rc | 7 +++
dll/cpl/mmsys/lang/ru-RU.rc | 7 +++
dll/cpl/mmsys/lang/sk-SK.rc | 7 +++
dll/cpl/mmsys/lang/sq-AL.rc | 7 +++
dll/cpl/mmsys/lang/tr-TR.rc | 7 +++
dll/cpl/mmsys/lang/uk-UA.rc | 7 +++
dll/cpl/mmsys/lang/zh-CN.rc | 7 +++
dll/cpl/mmsys/lang/zh-TW.rc | 7 +++
dll/cpl/mmsys/mmsys.c | 14 +++--
dll/cpl/mmsys/mmsys.h | 19 +++++-
dll/cpl/mmsys/resource.h | 8 +++
dll/cpl/mmsys/speakervolume.c | 141 ++++++++++++++++++++++++++++++++++++++++++
dll/cpl/mmsys/volume.c | 8 +--
29 files changed, 347 insertions(+), 21 deletions(-)
diff --git a/dll/cpl/mmsys/CMakeLists.txt b/dll/cpl/mmsys/CMakeLists.txt
index 5d1665ba07..885b40621f 100644
--- a/dll/cpl/mmsys/CMakeLists.txt
+++ b/dll/cpl/mmsys/CMakeLists.txt
@@ -4,6 +4,7 @@ spec2def(mmsys.cpl mmsys.spec)
list(APPEND SOURCE
mmsys.c
sounds.c
+ speakervolume.c
volume.c
audio.c
voice.c
diff --git a/dll/cpl/mmsys/lang/bg-BG.rc b/dll/cpl/mmsys/lang/bg-BG.rc
index 68401bf7f2..eae4099f57 100644
--- a/dll/cpl/mmsys/lang/bg-BG.rc
+++ b/dll/cpl/mmsys/lang/bg-BG.rc
@@ -234,6 +234,13 @@ BEGIN
IDS_CPLDESCRIPTION "Променя звуковата наредба за компютъра ви или настройките за
говорителите и записващите устройства."
IDS_NO_SOUND "(Няма)"
IDS_NO_DEVICES "No Devices"
+ IDS_SPEAKER_VOLUME "Speaker Volume"
+ IDS_SPEAKER_LEFT "&Left:"
+ IDS_SPEAKER_RIGHT "&Right:"
+ IDS_SPEAKER_CENTER "&Center:"
+ IDS_SPEAKER_BACK_LEFT "&Back left:"
+ IDS_SPEAKER_BACK_RIGHT "B&ack right:"
+ IDS_SPEAKER_LOW_FREQUENCY "Low &Frequency:"
5825 "Програмна грешка"
5826 "Затваряне на прозоред"
5827 "Опасно слаба батерия"
diff --git a/dll/cpl/mmsys/lang/cs-CZ.rc b/dll/cpl/mmsys/lang/cs-CZ.rc
index 54083af812..c106c3d100 100644
--- a/dll/cpl/mmsys/lang/cs-CZ.rc
+++ b/dll/cpl/mmsys/lang/cs-CZ.rc
@@ -239,6 +239,13 @@ BEGIN
IDS_CPLDESCRIPTION "Upraví zvukové schéma Vašeho počítače, nebo nastaví
reproduktory a nahrávací zařízení."
IDS_NO_SOUND "(Není)"
IDS_NO_DEVICES "No Devices"
+ IDS_SPEAKER_VOLUME "Speaker Volume"
+ IDS_SPEAKER_LEFT "&Left:"
+ IDS_SPEAKER_RIGHT "&Right:"
+ IDS_SPEAKER_CENTER "&Center:"
+ IDS_SPEAKER_BACK_LEFT "&Back left:"
+ IDS_SPEAKER_BACK_RIGHT "B&ack right:"
+ IDS_SPEAKER_LOW_FREQUENCY "Low &Frequency:"
5825 "Chyba programu"
5826 "Ukončení programu"
5827 "Varování při kritickém stavu baterie"
diff --git a/dll/cpl/mmsys/lang/de-DE.rc b/dll/cpl/mmsys/lang/de-DE.rc
index 4aec9627c8..50e9f76a34 100644
--- a/dll/cpl/mmsys/lang/de-DE.rc
+++ b/dll/cpl/mmsys/lang/de-DE.rc
@@ -182,35 +182,35 @@ BEGIN
LTEXT "Bezeichnung erscheint hier.", 9506, 8, 4, 212, 24
LTEXT "Niedrig", 9473, 65, 31, 22, 8
LTEXT "", 9472, 5, 31, 55, 8
- CONTROL "Slider1", 9475, "MSCTLS_TRACKBAR32", WS_TABSTOP |
0x00000401, 87, 29, 108, 17
+ CONTROL "Slider1", 9475, "MSCTLS_TRACKBAR32", TBS_AUTOTICKS |
TBS_DOWNISLEFT | WS_TABSTOP, 87, 29, 108, 17
LTEXT "Hoch", 9474, 202, 31, 17, 8
LTEXT "Niedrig", 9477, 65, 50, 22, 8
LTEXT "", 9476, 5, 50, 55, 8
- CONTROL "Slider1", 9479, "MSCTLS_TRACKBAR32", WS_TABSTOP |
0x00000401, 87, 48, 108, 17
+ CONTROL "Slider1", 9479, "MSCTLS_TRACKBAR32", TBS_AUTOTICKS |
TBS_DOWNISLEFT | WS_TABSTOP, 87, 48, 108, 17
LTEXT "Hoch", 9478, 202, 50, 17, 8
LTEXT "Niedrig", 9481, 65, 69, 22, 8
LTEXT "", 9480, 5, 69, 55, 8
- CONTROL "Slider1", 9483, "MSCTLS_TRACKBAR32", WS_TABSTOP |
0x00000401, 87, 67, 108, 17
+ CONTROL "Slider1", 9483, "MSCTLS_TRACKBAR32", TBS_AUTOTICKS |
TBS_DOWNISLEFT | WS_TABSTOP, 87, 67, 108, 17
LTEXT "Hoch", 9482, 202, 69, 17, 8
LTEXT "Niedrig", 9485, 65, 88, 22, 8
LTEXT "", 9484, 5, 88, 55, 8
- CONTROL "Slider1", 9487, "MSCTLS_TRACKBAR32", WS_TABSTOP |
0x00000401, 87, 86, 108, 17
+ CONTROL "Slider1", 9487, "MSCTLS_TRACKBAR32", TBS_AUTOTICKS |
TBS_DOWNISLEFT | WS_TABSTOP, 87, 86, 108, 17
LTEXT "Hoch", 9486, 202, 88, 17, 8
LTEXT "Niedrig", 9489, 65, 107, 22, 8
LTEXT "", 9488, 5, 107, 55, 8
- CONTROL "Slider1", 9491, "MSCTLS_TRACKBAR32", WS_TABSTOP |
0x00000401, 87, 105, 108, 17
+ CONTROL "Slider1", 9491, "MSCTLS_TRACKBAR32", TBS_AUTOTICKS |
TBS_DOWNISLEFT | WS_TABSTOP, 87, 105, 108, 17
LTEXT "Hoch", 9490, 202, 107, 17, 8
LTEXT "Niedrig", 9493, 65, 126, 22, 8
LTEXT "", 9492, 5, 126, 55, 8
- CONTROL "Slider1", 9495, "MSCTLS_TRACKBAR32", WS_TABSTOP |
0x00000401, 87, 124, 108, 17
+ CONTROL "Slider1", 9495, "MSCTLS_TRACKBAR32", TBS_AUTOTICKS |
TBS_DOWNISLEFT | WS_TABSTOP, 87, 124, 108, 17
LTEXT "Hoch", 9494, 202, 126, 17, 8
LTEXT "Niedrig", 9497, 65, 145, 22, 8
LTEXT "", 9496, 5, 145, 55, 8
- CONTROL "Slider1", 9499, "MSCTLS_TRACKBAR32", WS_TABSTOP |
0x00000401, 87, 143, 108, 17
+ CONTROL "Slider1", 9499, "MSCTLS_TRACKBAR32", TBS_AUTOTICKS |
TBS_DOWNISLEFT | WS_TABSTOP, 87, 143, 108, 17
LTEXT "Hoch", 9498, 202, 145, 17, 8
LTEXT "Niedrig", 9501, 65, 164, 22, 8
LTEXT "", 9500, 5, 164, 55, 8
- CONTROL "Slider1", 9503, "MSCTLS_TRACKBAR32", WS_TABSTOP |
0x00000401, 87, 162, 108, 17
+ CONTROL "Slider1", 9503, "MSCTLS_TRACKBAR32", TBS_AUTOTICKS |
TBS_DOWNISLEFT | WS_TABSTOP, 87, 162, 108, 17
LTEXT "Hoch", 9502, 202, 164, 17, 8
AUTOCHECKBOX "&Alle Regler auf einmal betätigen", 9504, 5, 185, 216, 9
PUSHBUTTON "Standard &wiederherstellen", 9505, 110, 199, 110, 14
@@ -234,6 +234,13 @@ BEGIN
IDS_CPLDESCRIPTION "Ändert das Klangschema Ihres Computers oder konfiguriert die
Einstellungen für Ihre Lautsprecher und Aufnahmegeräte."
IDS_NO_SOUND "(Kein)"
IDS_NO_DEVICES "Keine Geräte"
+ IDS_SPEAKER_VOLUME "Lautsprecherlautstärke"
+ IDS_SPEAKER_LEFT "&Links:"
+ IDS_SPEAKER_RIGHT "&Rechts:"
+ IDS_SPEAKER_CENTER "&Zentriert:"
+ IDS_SPEAKER_BACK_LEFT "&Hinten links:"
+ IDS_SPEAKER_BACK_RIGHT "H&inten rechts:"
+ IDS_SPEAKER_LOW_FREQUENCY "Niedrige Frequenz:"
5825 "Programmfehler"
5826 "Programm schließen"
5827 "Alarm bei kritischem Batteriestand"
diff --git a/dll/cpl/mmsys/lang/el-GR.rc b/dll/cpl/mmsys/lang/el-GR.rc
index bbb48d7302..a5fe8585ea 100644
--- a/dll/cpl/mmsys/lang/el-GR.rc
+++ b/dll/cpl/mmsys/lang/el-GR.rc
@@ -234,6 +234,13 @@ BEGIN
IDS_CPLDESCRIPTION "Αλλάζει το σχήμα ήχου του υπολογιστή ή τροποποιεί τις
ρυθμίσεις για τα ηχεία και τις συσκευές εγγραφής ήχου."
IDS_NO_SOUND "(None)"
IDS_NO_DEVICES "No Devices"
+ IDS_SPEAKER_VOLUME "Speaker Volume"
+ IDS_SPEAKER_LEFT "&Left:"
+ IDS_SPEAKER_RIGHT "&Right:"
+ IDS_SPEAKER_CENTER "&Center:"
+ IDS_SPEAKER_BACK_LEFT "&Back left:"
+ IDS_SPEAKER_BACK_RIGHT "B&ack right:"
+ IDS_SPEAKER_LOW_FREQUENCY "Low &Frequency:"
5825 "Program error"
5826 "Close program"
5827 "Critical Battery Alarm"
diff --git a/dll/cpl/mmsys/lang/en-US.rc b/dll/cpl/mmsys/lang/en-US.rc
index dee8b78851..706ba52c64 100644
--- a/dll/cpl/mmsys/lang/en-US.rc
+++ b/dll/cpl/mmsys/lang/en-US.rc
@@ -234,6 +234,13 @@ BEGIN
IDS_CPLDESCRIPTION "Changes the sound scheme for your computer, or configure the
settings for your speakers and recording devices."
IDS_NO_SOUND "(None)"
IDS_NO_DEVICES "No Devices"
+ IDS_SPEAKER_VOLUME "Speaker Volume"
+ IDS_SPEAKER_LEFT "&Left:"
+ IDS_SPEAKER_RIGHT "&Right:"
+ IDS_SPEAKER_CENTER "&Center:"
+ IDS_SPEAKER_BACK_LEFT "&Back left:"
+ IDS_SPEAKER_BACK_RIGHT "B&ack right:"
+ IDS_SPEAKER_LOW_FREQUENCY "Low &Frequency:"
5825 "Program error"
5826 "Close program"
5827 "Critical Battery Alarm"
diff --git a/dll/cpl/mmsys/lang/es-ES.rc b/dll/cpl/mmsys/lang/es-ES.rc
index e5f2df82f6..c44ea433b5 100644
--- a/dll/cpl/mmsys/lang/es-ES.rc
+++ b/dll/cpl/mmsys/lang/es-ES.rc
@@ -234,6 +234,13 @@ BEGIN
IDS_CPLDESCRIPTION "Cambie la combinación de sonidos del equipo, o configure sus
altavoces y dispositivos de grabación."
IDS_NO_SOUND "(Ninguno)"
IDS_NO_DEVICES "Sin dispositivos"
+ IDS_SPEAKER_VOLUME "Speaker Volume"
+ IDS_SPEAKER_LEFT "&Left:"
+ IDS_SPEAKER_RIGHT "&Right:"
+ IDS_SPEAKER_CENTER "&Center:"
+ IDS_SPEAKER_BACK_LEFT "&Back left:"
+ IDS_SPEAKER_BACK_RIGHT "B&ack right:"
+ IDS_SPEAKER_LOW_FREQUENCY "Low &Frequency:"
5825 "Error del programa"
5826 "Cerrar programa"
5827 "Alarma de nivel crítico de carga de batería"
diff --git a/dll/cpl/mmsys/lang/fr-FR.rc b/dll/cpl/mmsys/lang/fr-FR.rc
index 9eb336404f..9e054c5128 100644
--- a/dll/cpl/mmsys/lang/fr-FR.rc
+++ b/dll/cpl/mmsys/lang/fr-FR.rc
@@ -234,6 +234,13 @@ BEGIN
IDS_CPLDESCRIPTION "Change le modèle de sons de votre ordinateur, ou configure
les paramètres de vos hauts-parleurs et de vos périphériques d'enregistrement."
IDS_NO_SOUND "(Aucun)"
IDS_NO_DEVICES "Aucun périphérique"
+ IDS_SPEAKER_VOLUME "Speaker Volume"
+ IDS_SPEAKER_LEFT "&Left:"
+ IDS_SPEAKER_RIGHT "&Right:"
+ IDS_SPEAKER_CENTER "&Center:"
+ IDS_SPEAKER_BACK_LEFT "&Back left:"
+ IDS_SPEAKER_BACK_RIGHT "B&ack right:"
+ IDS_SPEAKER_LOW_FREQUENCY "Low &Frequency:"
5825 "Erreur programme"
5826 "Fermeture programme"
5827 "Alarme batterie critique"
diff --git a/dll/cpl/mmsys/lang/he-IL.rc b/dll/cpl/mmsys/lang/he-IL.rc
index 893e207e6b..e11c91debb 100644
--- a/dll/cpl/mmsys/lang/he-IL.rc
+++ b/dll/cpl/mmsys/lang/he-IL.rc
@@ -236,6 +236,13 @@ BEGIN
IDS_CPLDESCRIPTION "Changes the sound scheme for your computer, or configure the
settings for your speakers and recording devices."
IDS_NO_SOUND "(ללא)"
IDS_NO_DEVICES "אין התקנים"
+ IDS_SPEAKER_VOLUME "Speaker Volume"
+ IDS_SPEAKER_LEFT "&Left:"
+ IDS_SPEAKER_RIGHT "&Right:"
+ IDS_SPEAKER_CENTER "&Center:"
+ IDS_SPEAKER_BACK_LEFT "&Back left:"
+ IDS_SPEAKER_BACK_RIGHT "B&ack right:"
+ IDS_SPEAKER_LOW_FREQUENCY "Low &Frequency:"
5825 "שגיאת תכנית"
5826 "סגירת תכנית"
5827 "רמת סוללה קריטית"
diff --git a/dll/cpl/mmsys/lang/id-ID.rc b/dll/cpl/mmsys/lang/id-ID.rc
index 13619732a3..f82339ae46 100644
--- a/dll/cpl/mmsys/lang/id-ID.rc
+++ b/dll/cpl/mmsys/lang/id-ID.rc
@@ -234,6 +234,13 @@ BEGIN
IDS_CPLDESCRIPTION "Mengubah skema suara untuk komputer anda, atau
mengkonfigurasi setelan untuk speaker dan device perekaman anda."
IDS_NO_SOUND "(None)"
IDS_NO_DEVICES "No Devices"
+ IDS_SPEAKER_VOLUME "Speaker Volume"
+ IDS_SPEAKER_LEFT "&Left:"
+ IDS_SPEAKER_RIGHT "&Right:"
+ IDS_SPEAKER_CENTER "&Center:"
+ IDS_SPEAKER_BACK_LEFT "&Back left:"
+ IDS_SPEAKER_BACK_RIGHT "B&ack right:"
+ IDS_SPEAKER_LOW_FREQUENCY "Low &Frequency:"
5825 "Program error"
5826 "Close program"
5827 "Critical Battery Alarm"
diff --git a/dll/cpl/mmsys/lang/it-IT.rc b/dll/cpl/mmsys/lang/it-IT.rc
index 9ad8e067a2..ca68071359 100644
--- a/dll/cpl/mmsys/lang/it-IT.rc
+++ b/dll/cpl/mmsys/lang/it-IT.rc
@@ -234,6 +234,13 @@ BEGIN
IDS_CPLDESCRIPTION "Cambia lo schema dei suoni per il tuo computer o configura
le impostazioni per gli altoparlanti e i dispositivi di registrazione."
IDS_NO_SOUND "(nessuno)"
IDS_NO_DEVICES "No Devices"
+ IDS_SPEAKER_VOLUME "Speaker Volume"
+ IDS_SPEAKER_LEFT "&Left:"
+ IDS_SPEAKER_RIGHT "&Right:"
+ IDS_SPEAKER_CENTER "&Center:"
+ IDS_SPEAKER_BACK_LEFT "&Back left:"
+ IDS_SPEAKER_BACK_RIGHT "B&ack right:"
+ IDS_SPEAKER_LOW_FREQUENCY "Low &Frequency:"
5825 "Errore del programma"
5826 "Chiudere il programma"
5827 "Allarme di batteria critica"
diff --git a/dll/cpl/mmsys/lang/ja-JP.rc b/dll/cpl/mmsys/lang/ja-JP.rc
index d7e045dde5..6761945992 100644
--- a/dll/cpl/mmsys/lang/ja-JP.rc
+++ b/dll/cpl/mmsys/lang/ja-JP.rc
@@ -234,6 +234,13 @@ BEGIN
IDS_CPLDESCRIPTION "コンピューターの音声スキームを変更するか、スピーカーと録音デバイスの設定を変更します。"
IDS_NO_SOUND "(なし)"
IDS_NO_DEVICES "デバイスがありません"
+ IDS_SPEAKER_VOLUME "Speaker Volume"
+ IDS_SPEAKER_LEFT "&Left:"
+ IDS_SPEAKER_RIGHT "&Right:"
+ IDS_SPEAKER_CENTER "&Center:"
+ IDS_SPEAKER_BACK_LEFT "&Back left:"
+ IDS_SPEAKER_BACK_RIGHT "B&ack right:"
+ IDS_SPEAKER_LOW_FREQUENCY "Low &Frequency:"
5825 "プログラム エラー"
5826 "プログラムを閉じる"
5827 "重大なバッテリー警告音"
diff --git a/dll/cpl/mmsys/lang/nl-NL.rc b/dll/cpl/mmsys/lang/nl-NL.rc
index a2e5164de0..5cce5c978a 100644
--- a/dll/cpl/mmsys/lang/nl-NL.rc
+++ b/dll/cpl/mmsys/lang/nl-NL.rc
@@ -234,6 +234,13 @@ BEGIN
IDS_CPLDESCRIPTION "Verander het geluidsschema van uw computer of configureer de
aanwezige geluidsapparatuur."
IDS_NO_SOUND "(Geen)"
IDS_NO_DEVICES "No Devices"
+ IDS_SPEAKER_VOLUME "Speaker Volume"
+ IDS_SPEAKER_LEFT "&Left:"
+ IDS_SPEAKER_RIGHT "&Right:"
+ IDS_SPEAKER_CENTER "&Center:"
+ IDS_SPEAKER_BACK_LEFT "&Back left:"
+ IDS_SPEAKER_BACK_RIGHT "B&ack right:"
+ IDS_SPEAKER_LOW_FREQUENCY "Low &Frequency:"
5825 "Program error"
5826 "Close program"
5827 "Critical Battery Alarm"
diff --git a/dll/cpl/mmsys/lang/no-NO.rc b/dll/cpl/mmsys/lang/no-NO.rc
index e89585fba4..bcc81dcbd2 100644
--- a/dll/cpl/mmsys/lang/no-NO.rc
+++ b/dll/cpl/mmsys/lang/no-NO.rc
@@ -234,6 +234,13 @@ BEGIN
IDS_CPLDESCRIPTION "Endre lydenheten for din datamaskin, eller konfigurer
innstillinger for dine høytaller og opptak enheter."
IDS_NO_SOUND "(Ingen)"
IDS_NO_DEVICES "Ingen enheter"
+ IDS_SPEAKER_VOLUME "Speaker Volume"
+ IDS_SPEAKER_LEFT "&Left:"
+ IDS_SPEAKER_RIGHT "&Right:"
+ IDS_SPEAKER_CENTER "&Center:"
+ IDS_SPEAKER_BACK_LEFT "&Back left:"
+ IDS_SPEAKER_BACK_RIGHT "B&ack right:"
+ IDS_SPEAKER_LOW_FREQUENCY "Low &Frequency:"
5825 "Programfeil"
5826 "Avslutt program"
5827 "Kritisk batteri Alarm"
diff --git a/dll/cpl/mmsys/lang/pl-PL.rc b/dll/cpl/mmsys/lang/pl-PL.rc
index 1388a788e1..b359e86906 100644
--- a/dll/cpl/mmsys/lang/pl-PL.rc
+++ b/dll/cpl/mmsys/lang/pl-PL.rc
@@ -247,6 +247,13 @@ BEGIN
IDS_CPLDESCRIPTION "Zmień schemat dźwiękowy dla tego komputera lub skonfiguruj
ustawienia głośników i urządzeń nagrywających."
IDS_NO_SOUND "(Brak)"
IDS_NO_DEVICES "Brak urządzeń"
+ IDS_SPEAKER_VOLUME "Speaker Volume"
+ IDS_SPEAKER_LEFT "&Left:"
+ IDS_SPEAKER_RIGHT "&Right:"
+ IDS_SPEAKER_CENTER "&Center:"
+ IDS_SPEAKER_BACK_LEFT "&Back left:"
+ IDS_SPEAKER_BACK_RIGHT "B&ack right:"
+ IDS_SPEAKER_LOW_FREQUENCY "Low &Frequency:"
5825 "Błąd programu"
5826 "Zamknij program"
5827 "Krytyczny stan baterii"
diff --git a/dll/cpl/mmsys/lang/pt-BR.rc b/dll/cpl/mmsys/lang/pt-BR.rc
index fcd4bea426..2c70fa49c0 100644
--- a/dll/cpl/mmsys/lang/pt-BR.rc
+++ b/dll/cpl/mmsys/lang/pt-BR.rc
@@ -234,6 +234,13 @@ BEGIN
IDS_CPLDESCRIPTION "Altera o esquema de som para o seu computador ou define as
configurações para os auto-falantes e dispositivos de gravação."
IDS_NO_SOUND "(None)"
IDS_NO_DEVICES "No Devices"
+ IDS_SPEAKER_VOLUME "Speaker Volume"
+ IDS_SPEAKER_LEFT "&Left:"
+ IDS_SPEAKER_RIGHT "&Right:"
+ IDS_SPEAKER_CENTER "&Center:"
+ IDS_SPEAKER_BACK_LEFT "&Back left:"
+ IDS_SPEAKER_BACK_RIGHT "B&ack right:"
+ IDS_SPEAKER_LOW_FREQUENCY "Low &Frequency:"
5825 "Program error"
5826 "Close program"
5827 "Critical Battery Alarm"
diff --git a/dll/cpl/mmsys/lang/ro-RO.rc b/dll/cpl/mmsys/lang/ro-RO.rc
index 97a78fc4a0..b7cfedcc8d 100644
--- a/dll/cpl/mmsys/lang/ro-RO.rc
+++ b/dll/cpl/mmsys/lang/ro-RO.rc
@@ -239,6 +239,13 @@ BEGIN
IDS_CPLDESCRIPTION "Schimbarea colecției de sunete a calculatorului și
modificarea opțiunilor pentru dispozitivele de lectură și înregistrare de sunet."
IDS_NO_SOUND "(nespecificat)"
IDS_NO_DEVICES "lipsă dispozitive"
+ IDS_SPEAKER_VOLUME "Speaker Volume"
+ IDS_SPEAKER_LEFT "&Left:"
+ IDS_SPEAKER_RIGHT "&Right:"
+ IDS_SPEAKER_CENTER "&Center:"
+ IDS_SPEAKER_BACK_LEFT "&Back left:"
+ IDS_SPEAKER_BACK_RIGHT "B&ack right:"
+ IDS_SPEAKER_LOW_FREQUENCY "Low &Frequency:"
5825 "Eroare program"
5826 "Închidere program"
5827 "Alarmă baterie descărcată"
diff --git a/dll/cpl/mmsys/lang/ru-RU.rc b/dll/cpl/mmsys/lang/ru-RU.rc
index 4a6be2ec09..74308791fb 100644
--- a/dll/cpl/mmsys/lang/ru-RU.rc
+++ b/dll/cpl/mmsys/lang/ru-RU.rc
@@ -234,6 +234,13 @@ BEGIN
IDS_CPLDESCRIPTION "Изменение звуковых схем вашего компьютера, настройка колонок
и записывающих устройств."
IDS_NO_SOUND "(Нет)"
IDS_NO_DEVICES "Нет устройств"
+ IDS_SPEAKER_VOLUME "Speaker Volume"
+ IDS_SPEAKER_LEFT "&Left:"
+ IDS_SPEAKER_RIGHT "&Right:"
+ IDS_SPEAKER_CENTER "&Center:"
+ IDS_SPEAKER_BACK_LEFT "&Back left:"
+ IDS_SPEAKER_BACK_RIGHT "B&ack right:"
+ IDS_SPEAKER_LOW_FREQUENCY "Low &Frequency:"
5825 "Ошибка программы"
5826 "Закрытие программы"
5827 "Сигнал почти полной разрядки батарей"
diff --git a/dll/cpl/mmsys/lang/sk-SK.rc b/dll/cpl/mmsys/lang/sk-SK.rc
index f843795c1b..9f40f1282e 100644
--- a/dll/cpl/mmsys/lang/sk-SK.rc
+++ b/dll/cpl/mmsys/lang/sk-SK.rc
@@ -239,6 +239,13 @@ BEGIN
IDS_CPLDESCRIPTION "Changes the sound scheme for your computer, or configure the
settings for your speakers and recording devices."
IDS_NO_SOUND "(Žiadne)"
IDS_NO_DEVICES "Žiadne zariadenia"
+ IDS_SPEAKER_VOLUME "Speaker Volume"
+ IDS_SPEAKER_LEFT "&Left:"
+ IDS_SPEAKER_RIGHT "&Right:"
+ IDS_SPEAKER_CENTER "&Center:"
+ IDS_SPEAKER_BACK_LEFT "&Back left:"
+ IDS_SPEAKER_BACK_RIGHT "B&ack right:"
+ IDS_SPEAKER_LOW_FREQUENCY "Low &Frequency:"
5825 "Chyba programu"
5826 "Zavrieť program"
5827 "Critical Battery Alarm"
diff --git a/dll/cpl/mmsys/lang/sq-AL.rc b/dll/cpl/mmsys/lang/sq-AL.rc
index 981d5819eb..0cf2a12875 100644
--- a/dll/cpl/mmsys/lang/sq-AL.rc
+++ b/dll/cpl/mmsys/lang/sq-AL.rc
@@ -238,6 +238,13 @@ BEGIN
IDS_CPLDESCRIPTION "Ndryshon skema e zërit për kompjuterin tuaj, ose konfiguron
cilësimet për boxet tuaja dhe pajisjet e regjistrimit."
IDS_NO_SOUND "(Asnje)"
IDS_NO_DEVICES "Ska Pajisje"
+ IDS_SPEAKER_VOLUME "Speaker Volume"
+ IDS_SPEAKER_LEFT "&Left:"
+ IDS_SPEAKER_RIGHT "&Right:"
+ IDS_SPEAKER_CENTER "&Center:"
+ IDS_SPEAKER_BACK_LEFT "&Back left:"
+ IDS_SPEAKER_BACK_RIGHT "B&ack right:"
+ IDS_SPEAKER_LOW_FREQUENCY "Low &Frequency:"
5825 "Gabim programi"
5826 "Mbyll programin"
5827 "Alarm Baterie Kritike"
diff --git a/dll/cpl/mmsys/lang/tr-TR.rc b/dll/cpl/mmsys/lang/tr-TR.rc
index 7c8a9b4dae..4758085e65 100644
--- a/dll/cpl/mmsys/lang/tr-TR.rc
+++ b/dll/cpl/mmsys/lang/tr-TR.rc
@@ -236,6 +236,13 @@ BEGIN
IDS_CPLDESCRIPTION "Bilgisayarınız için ses düzenini değiştirir, hoparlörleriniz
ve saklama aygıtlarınız için ayarları yapılandırır."
IDS_NO_SOUND "(Yok)"
IDS_NO_DEVICES "Aygıt Yok"
+ IDS_SPEAKER_VOLUME "Speaker Volume"
+ IDS_SPEAKER_LEFT "&Left:"
+ IDS_SPEAKER_RIGHT "&Right:"
+ IDS_SPEAKER_CENTER "&Center:"
+ IDS_SPEAKER_BACK_LEFT "&Back left:"
+ IDS_SPEAKER_BACK_RIGHT "B&ack right:"
+ IDS_SPEAKER_LOW_FREQUENCY "Low &Frequency:"
5825 "İzlence Yanlışlığı"
5826 "İzlenceyi Kapat"
5827 "Çok Azalmış Pil Uyarısı"
diff --git a/dll/cpl/mmsys/lang/uk-UA.rc b/dll/cpl/mmsys/lang/uk-UA.rc
index cdab3fb8db..c0fa7bacc1 100644
--- a/dll/cpl/mmsys/lang/uk-UA.rc
+++ b/dll/cpl/mmsys/lang/uk-UA.rc
@@ -242,6 +242,13 @@ BEGIN
IDS_CPLDESCRIPTION "Зміна звукових схем вашого комп'ютера, настроювання
колонок і записуючих пристроїв."
IDS_NO_SOUND "(немає)"
IDS_NO_DEVICES "No Devices"
+ IDS_SPEAKER_VOLUME "Speaker Volume"
+ IDS_SPEAKER_LEFT "&Left:"
+ IDS_SPEAKER_RIGHT "&Right:"
+ IDS_SPEAKER_CENTER "&Center:"
+ IDS_SPEAKER_BACK_LEFT "&Back left:"
+ IDS_SPEAKER_BACK_RIGHT "B&ack right:"
+ IDS_SPEAKER_LOW_FREQUENCY "Low &Frequency:"
5825 "Помилка програми"
5826 "Закрити програму"
5827 "Сигнал критичної розрядки батарей"
diff --git a/dll/cpl/mmsys/lang/zh-CN.rc b/dll/cpl/mmsys/lang/zh-CN.rc
index 7fb7a74bea..9ec9e99349 100644
--- a/dll/cpl/mmsys/lang/zh-CN.rc
+++ b/dll/cpl/mmsys/lang/zh-CN.rc
@@ -242,6 +242,13 @@ BEGIN
IDS_CPLDESCRIPTION "更改计算机的声音方案,或配置扬声器和录音设备的设置。"
IDS_NO_SOUND "(无)"
IDS_NO_DEVICES "没有设备"
+ IDS_SPEAKER_VOLUME "Speaker Volume"
+ IDS_SPEAKER_LEFT "&Left:"
+ IDS_SPEAKER_RIGHT "&Right:"
+ IDS_SPEAKER_CENTER "&Center:"
+ IDS_SPEAKER_BACK_LEFT "&Back left:"
+ IDS_SPEAKER_BACK_RIGHT "B&ack right:"
+ IDS_SPEAKER_LOW_FREQUENCY "Low &Frequency:"
5825 "程序出错"
5826 "关闭程序"
5827 "电池严重短缺警报"
diff --git a/dll/cpl/mmsys/lang/zh-TW.rc b/dll/cpl/mmsys/lang/zh-TW.rc
index 1e3a06e696..dd148e7224 100644
--- a/dll/cpl/mmsys/lang/zh-TW.rc
+++ b/dll/cpl/mmsys/lang/zh-TW.rc
@@ -240,6 +240,13 @@ BEGIN
IDS_CPLDESCRIPTION "更改電腦的聲音方案,或者配置揚聲器和錄音裝置的設定"
IDS_NO_SOUND "(無)"
IDS_NO_DEVICES "沒有裝置"
+ IDS_SPEAKER_VOLUME "Speaker Volume"
+ IDS_SPEAKER_LEFT "&Left:"
+ IDS_SPEAKER_RIGHT "&Right:"
+ IDS_SPEAKER_CENTER "&Center:"
+ IDS_SPEAKER_BACK_LEFT "&Back left:"
+ IDS_SPEAKER_BACK_RIGHT "B&ack right:"
+ IDS_SPEAKER_LOW_FREQUENCY "Low &Frequency:"
5825 "程式出錯"
5826 "關閉程式"
5827 "電池嚴重短缺警報"
diff --git a/dll/cpl/mmsys/mmsys.c b/dll/cpl/mmsys/mmsys.c
index e2d7c8e539..c7c1ca9a6e 100644
--- a/dll/cpl/mmsys/mmsys.c
+++ b/dll/cpl/mmsys/mmsys.c
@@ -733,11 +733,11 @@ MmSysApplet(HWND hwnd,
psh.ppsp = psp;
psh.pfnCallback = PropSheetProc;
- InitPropSheetPage(&psp[0], IDD_VOLUME,VolumeDlgProc);
- InitPropSheetPage(&psp[1], IDD_SOUNDS,SoundsDlgProc);
- InitPropSheetPage(&psp[2], IDD_AUDIO,AudioDlgProc);
- InitPropSheetPage(&psp[3], IDD_VOICE,VoiceDlgProc);
- InitPropSheetPage(&psp[4], IDD_HARDWARE,HardwareDlgProc);
+ InitPropSheetPage(&psp[0], IDD_VOLUME,VolumeDlgProc, 0);
+ InitPropSheetPage(&psp[1], IDD_SOUNDS,SoundsDlgProc, 0);
+ InitPropSheetPage(&psp[2], IDD_AUDIO,AudioDlgProc, 0);
+ InitPropSheetPage(&psp[3], IDD_VOICE,VoiceDlgProc, 0);
+ InitPropSheetPage(&psp[4], IDD_HARDWARE,HardwareDlgProc, 0);
return (LONG)(PropertySheet(&psh) != -1);
}
@@ -745,7 +745,8 @@ MmSysApplet(HWND hwnd,
VOID
InitPropSheetPage(PROPSHEETPAGE *psp,
WORD idDlg,
- DLGPROC DlgProc)
+ DLGPROC DlgProc,
+ LPARAM lParam)
{
ZeroMemory(psp, sizeof(PROPSHEETPAGE));
psp->dwSize = sizeof(PROPSHEETPAGE);
@@ -753,6 +754,7 @@ InitPropSheetPage(PROPSHEETPAGE *psp,
psp->hInstance = hApplet;
psp->pszTemplate = MAKEINTRESOURCE(idDlg);
psp->pfnDlgProc = DlgProc;
+ psp->lParam = lParam;
}
diff --git a/dll/cpl/mmsys/mmsys.h b/dll/cpl/mmsys/mmsys.h
index 63495d8328..63d6b2d900 100644
--- a/dll/cpl/mmsys/mmsys.h
+++ b/dll/cpl/mmsys/mmsys.h
@@ -37,12 +37,19 @@ extern HINSTANCE hApplet;
#define DRVM_MAPPER_PREFERRED_GET (DRVM_MAPPER+21)
#define DRVM_MAPPER_PREFERRED_SET (DRVM_MAPPER+22)
+#define VOLUME_MIN 0
+#define VOLUME_MAX 500
+#define VOLUME_TICFREQ 50
+#define VOLUME_PAGESIZE 100
+
/* main.c */
VOID
-InitPropSheetPage(PROPSHEETPAGE *psp,
- WORD idDlg,
- DLGPROC DlgProc);
+InitPropSheetPage(
+ PROPSHEETPAGE *psp,
+ WORD idDlg,
+ DLGPROC DlgProc,
+ LPARAM lParam);
LONG APIENTRY
MmSysApplet(HWND hwnd,
@@ -83,4 +90,10 @@ AudioDlgProc(HWND hwndDlg,
WPARAM wParam,
LPARAM lParam);
+/* speakervolume.c */
+
+INT_PTR
+SpeakerVolume(HWND hwndDlg,
+ HMIXER hMixer);
+
#endif /* _MMSYS_H */
diff --git a/dll/cpl/mmsys/resource.h b/dll/cpl/mmsys/resource.h
index e5aff82484..d1a85a59b6 100644
--- a/dll/cpl/mmsys/resource.h
+++ b/dll/cpl/mmsys/resource.h
@@ -68,6 +68,14 @@
#define IDC_SPEAKIMG 4625
#define IDC_MUTE_ICON 4626
+#define IDS_SPEAKER_VOLUME 5779
+#define IDS_SPEAKER_LEFT 5792
+#define IDS_SPEAKER_RIGHT 5793
+#define IDS_SPEAKER_CENTER 5794
+#define IDS_SPEAKER_BACK_LEFT 5795
+#define IDS_SPEAKER_BACK_RIGHT 5796
+#define IDS_SPEAKER_LOW_FREQUENCY 5797
+
#define IDS_REACTOS_LOGOFF 5852
#define IDS_REACTOS_LOGON 5853
#define IDS_REACTOS_DEFAULT_SCHEME 5856
diff --git a/dll/cpl/mmsys/speakervolume.c b/dll/cpl/mmsys/speakervolume.c
new file mode 100644
index 0000000000..270cdfcd02
--- /dev/null
+++ b/dll/cpl/mmsys/speakervolume.c
@@ -0,0 +1,141 @@
+/*
+ * PROJECT: ReactOS Multimedia Control Panel
+ * FILE: dll/cpl/mmsys/speakervolume.c
+ * PURPOSE: ReactOS Multimedia Control Panel
+ * PROGRAMMER: Eric Kohl <eric.kohl(a)reactos.com>
+ */
+
+#include "mmsys.h"
+
+static
+BOOL
+OnInitDialog(
+ HWND hwndDlg,
+ LPARAM lParam)
+{
+ TCHAR szBuffer[256];
+ MIXERLINE mxln;
+ MIXERCONTROL mxc;
+ MIXERLINECONTROLS mxlctrl;
+ MIXERCONTROLDETAILS mxcd;
+ MIXERCONTROLDETAILS_UNSIGNED mxcdVolume[8];
+ INT i, j;
+ DWORD dwStep;
+ HMIXER hMixer;
+
+ hMixer = (HMIXER)((LPPROPSHEETPAGE)lParam)->lParam;
+
+ mxln.cbStruct = sizeof(MIXERLINE);
+ mxln.dwComponentType = MIXERLINE_COMPONENTTYPE_DST_SPEAKERS;
+
+ if (mixerGetLineInfo((HMIXEROBJ)hMixer, &mxln, MIXER_OBJECTF_HMIXER |
MIXER_GETLINEINFOF_COMPONENTTYPE) != MMSYSERR_NOERROR)
+ return FALSE;
+
+ mxlctrl.cbStruct = sizeof(MIXERLINECONTROLS);
+ mxlctrl.dwLineID = mxln.dwLineID;
+ mxlctrl.dwControlType = MIXERCONTROL_CONTROLTYPE_VOLUME;
+ mxlctrl.cControls = 1;
+ mxlctrl.cbmxctrl = sizeof(MIXERCONTROL);
+ mxlctrl.pamxctrl = &mxc;
+
+ if (mixerGetLineControls((HMIXEROBJ)hMixer, &mxlctrl, MIXER_OBJECTF_HMIXER |
MIXER_GETLINECONTROLSF_ONEBYTYPE) != MMSYSERR_NOERROR)
+ return FALSE;
+
+// pGlobalData->volumeMinimum = mxc.Bounds.dwMinimum;
+// pGlobalData->volumeMaximum = mxc.Bounds.dwMaximum;
+// pGlobalData->volumeControlID = mxc.dwControlID;
+// pGlobalData->volumeStep = (pGlobalData->volumeMaximum -
pGlobalData->volumeMinimum) / (VOLUME_MAX - VOLUME_MIN);
+ dwStep = (mxc.Bounds.dwMaximum - mxc.Bounds.dwMinimum) / (VOLUME_MAX - VOLUME_MIN);
+
+ mxcd.cbStruct = sizeof(MIXERCONTROLDETAILS);
+ mxcd.dwControlID = mxc.dwControlID;
+ mxcd.cChannels = mxln.cChannels;
+ mxcd.cMultipleItems = 0;
+ mxcd.cbDetails = sizeof(MIXERCONTROLDETAILS_UNSIGNED);
+ mxcd.paDetails = &mxcdVolume;
+
+ if (mixerGetControlDetails((HMIXEROBJ)hMixer, &mxcd, MIXER_OBJECTF_HMIXER |
MIXER_GETCONTROLDETAILSF_VALUE) != MMSYSERR_NOERROR)
+ return FALSE;
+
+// pGlobalData->volumeValue[i] = mxcdVolume[i].dwValue;
+
+ /* Initialize the channels */
+ for (i = 0; i < min(mxln.cChannels, 5); i++)
+ {
+ j = i * 4;
+ LoadString(hApplet, 5792 + i, szBuffer, _countof(szBuffer));
+ SetWindowText(GetDlgItem(hwndDlg, 9472 + j), szBuffer);
+
+ SendDlgItemMessage(hwndDlg, 9475 + j, TBM_SETRANGE, (WPARAM)TRUE,
(LPARAM)MAKELONG(VOLUME_MIN, VOLUME_MAX));
+ SendDlgItemMessage(hwndDlg, 9475 + j, TBM_SETTICFREQ, VOLUME_TICFREQ, 0);
+ SendDlgItemMessage(hwndDlg, 9475 + j, TBM_SETPAGESIZE, 0, VOLUME_PAGESIZE);
+// SendDlgItemMessage(hwndDlg, 9475 + j, TBM_SETPOS, (WPARAM)TRUE,
(LPARAM)(pGlobalData->volumeValue - pGlobalData->volumeMinimum) /
pGlobalData->volumeStep);
+ SendDlgItemMessage(hwndDlg, 9475 + j, TBM_SETPOS, (WPARAM)TRUE,
(LPARAM)(mxcdVolume[i].dwValue - mxc.Bounds.dwMinimum) / dwStep);
+ }
+
+ /* Hide the unused controls */
+ for (i = mxln.cChannels; i < 8; i++)
+ {
+ j = i * 4;
+ ShowWindow(GetDlgItem(hwndDlg, 9472 + j), SW_HIDE);
+ ShowWindow(GetDlgItem(hwndDlg, 9473 + j), SW_HIDE);
+ ShowWindow(GetDlgItem(hwndDlg, 9474 + j), SW_HIDE);
+ ShowWindow(GetDlgItem(hwndDlg, 9475 + j), SW_HIDE);
+ }
+
+ return TRUE;
+}
+
+
+INT_PTR
+CALLBACK
+SpeakerVolumeDlgProc(
+ HWND hwndDlg,
+ UINT uMsg,
+ WPARAM wParam,
+ LPARAM lParam)
+{
+ UNREFERENCED_PARAMETER(wParam);
+
+ switch(uMsg)
+ {
+ case WM_INITDIALOG:
+ OnInitDialog(hwndDlg, lParam);
+ break;
+
+ case WM_DESTROY:
+ break;
+
+ case WM_NOTIFY:
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+
+INT_PTR
+SpeakerVolume(
+ HWND hwnd,
+ HMIXER hMixer)
+{
+ PROPSHEETPAGE psp[1];
+ PROPSHEETHEADER psh;
+ TCHAR Caption[256];
+
+ LoadString(hApplet, IDS_SPEAKER_VOLUME, Caption, _countof(Caption));
+
+ ZeroMemory(&psh, sizeof(PROPSHEETHEADER));
+ psh.dwSize = sizeof(PROPSHEETHEADER);
+ psh.dwFlags = PSH_PROPSHEETPAGE;
+ psh.hwndParent = hwnd;
+ psh.hInstance = hApplet;
+ psh.pszCaption = Caption;
+ psh.nPages = sizeof(psp) / sizeof(PROPSHEETPAGE);
+ psh.nStartPage = 0;
+ psh.ppsp = psp;
+
+ InitPropSheetPage(&psp[0], IDD_MULTICHANNEL, SpeakerVolumeDlgProc,
(LPARAM)hMixer);
+
+ return (LONG)(PropertySheet(&psh) != -1);
+}
diff --git a/dll/cpl/mmsys/volume.c b/dll/cpl/mmsys/volume.c
index 98f1d0150d..e5cda69108 100644
--- a/dll/cpl/mmsys/volume.c
+++ b/dll/cpl/mmsys/volume.c
@@ -11,10 +11,6 @@
#include <shellapi.h>
-#define VOLUME_MIN 0
-#define VOLUME_MAX 500
-#define VOLUME_TICFREQ 50
-#define VOLUME_PAGESIZE 100
typedef struct _IMGINFO
{
@@ -445,6 +441,10 @@ VolumeDlgProc(HWND hwndDlg,
case IDC_ADVANCED_BTN:
LaunchSoundControl(hwndDlg);
break;
+
+ case IDC_SPEAKER_VOL_BTN:
+ SpeakerVolume(hwndDlg, pGlobalData->hMixer);
+ break;
}
break;
}