diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-04-14 17:55:10 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-04-14 17:55:10 +0000 |
commit | 5da95c8f396b7ac716f7ea61c9d8c5a0eee7e1ec (patch) | |
tree | 6e1417af1fd835fc5998b1558cf4c26d3c908285 /protocols/Tox/src/tox_options.cpp | |
parent | a216cdaab245e00627e69726d1d65d06e91f03f9 (diff) |
Tox: first approach for audio support
git-svn-id: http://svn.miranda-ng.org/main/trunk@12824 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_options.cpp')
-rw-r--r-- | protocols/Tox/src/tox_options.cpp | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/protocols/Tox/src/tox_options.cpp b/protocols/Tox/src/tox_options.cpp index 49860ff5bd..1bdd3f9f1b 100644 --- a/protocols/Tox/src/tox_options.cpp +++ b/protocols/Tox/src/tox_options.cpp @@ -149,27 +149,36 @@ void CToxOptionsMain::OnApply() CToxOptionsMultimedia::CToxOptionsMultimedia(CToxProto *proto)
: CToxDlgBase(proto, IDD_OPTIONS_AV, false),
- m_audioInput(this, IDC_AUDIOINPUT), m_audioOutput(this, IDC_AUDIOOUTPUT)
+ m_audioInput(this, IDC_AUDIOINPUT),
+ m_audioOutput(this, IDC_AUDIOOUTPUT)
{
- m_audioInput.OnChange = Callback(this, &CToxOptionsMultimedia::AudioInput_OnClick);
- m_audioOutput.OnChange = Callback(this, &CToxOptionsMultimedia::AudioOutput_OnClick);
}
void CToxOptionsMultimedia::OnInitDialog()
{
CToxDlgBase::OnInitDialog();
-}
-
-void CToxOptionsMultimedia::AudioInput_OnClick(CCtrlData*)
-{
-}
-
-void CToxOptionsMultimedia::AudioOutput_OnClick(CCtrlData*)
-{
+
+ DWORD count = 0;
+
+ WAVEINCAPS wic;
+ count = waveInGetNumDevs();
+ for (DWORD i = 0; i < count; i++)
+ if (!waveInGetDevCaps(i, &wic, sizeof(WAVEINCAPS)))
+ m_audioInput.InsertString(wic.szPname, i);
+ m_audioInput.SetCurSel(m_proto->getDword("AudioInputDeviceID", 0));
+
+ WAVEOUTCAPS woc;
+ count = waveOutGetNumDevs();
+ for (DWORD i = 0; i < count; i++)
+ if (!waveOutGetDevCaps(i, &woc, sizeof(WAVEOUTCAPS)))
+ m_audioOutput.InsertString(woc.szPname, i);
+ m_audioOutput.SetCurSel(m_proto->getDword("AudioOutputDeviceID", 0));
}
void CToxOptionsMultimedia::OnApply()
{
+ m_proto->setDword("AudioInputDeviceID", m_audioInput.GetCurSel());
+ m_proto->setDword("AudioOutputDeviceID", m_audioOutput.GetCurSel());
}
/////////////////////////////////////////////////////////////////////////////////
|