Skip to content
This repository has been archived by the owner on Sep 17, 2022. It is now read-only.

Commit

Permalink
ver 0.13 - Italian Sound Device labels added
Browse files Browse the repository at this point in the history
  • Loading branch information
ik1xpv committed Dec 21, 2015
1 parent 6afba13 commit 28190a0
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
Binary file added docs/H101.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/ExtIO_H101.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -346,13 +346,13 @@ bool LIBRTL_API __stdcall OpenHW()
TCHAR tstro[MAXTCHAR];
ComboBox_GetText((GetDlgItem(h_dialog, IDC_AUDIOIN)), tstri, sizeof(tstri) / sizeof(TCHAR));
ComboBox_GetText((GetDlgItem(h_dialog, IDC_AUDIOOUT)), tstro, sizeof(tstro) / sizeof(TCHAR));
if ((_tcsstr(tstri, TEXT("Microphone")) == NULL) ||
if (((_tcsstr(tstri, TEXT("Microphone")) == NULL) && (_tcsstr(tstri, TEXT("Microfono")) == NULL)) ||
(_tcsstr(tstri, TEXT("USB Audio CODEC")) == NULL) ||
(_tcsstr(tstro, TEXT("Speakers")) == NULL) ||
((_tcsstr(tstro, TEXT("Speakers")) == NULL) && (_tcsstr(tstro, TEXT("Altoparlanti")) == NULL))||
(_tcsstr(tstro, TEXT("USB Audio CODEC")) == NULL))
{
MessageBox(NULL,
TEXT("Is H101 connected ? \nplease verify and press ok to exit\n\nH101 sound devices are: \nMicrophone (USB Audio CODEC)\nSpeakers (USB Audio CODEC)"),
TEXT("Is H101 connected ? \nplease verify and press ok to exit\n\nH101 sound devices are: \nMicrophone (USB Audio CODEC) o Microfono (USB Audio CODEC)\nSpeakers (USB Audio CODEC) o Altoparlanti (USB Audio CODEC)"),
TEXT("Duplex USB audio device not found"), MB_ICONQUESTION);
ExitProcess(0); // restart required
}
Expand Down
16 changes: 12 additions & 4 deletions src/SoundUti.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,14 @@ void CloseSoundConfig()
HWND hw;
hw = FindWindow(NULL, TEXT("Proprietà - Microphone"));
if (hw != NULL) CloseWindow(hw);
hw = FindWindow(NULL, TEXT("Proprietà - Microfono"));
if (hw != NULL) CloseWindow(hw);
hw = FindWindow(NULL, TEXT("Microphone properties"));
if (hw != NULL) CloseWindow(hw);
hw = FindWindow(NULL, TEXT("Proprietà - Speakers"));
if (hw != NULL) CloseWindow(hw);
hw = FindWindow(NULL, TEXT("Proprietà - Altoparlanti"));
if (hw != NULL) CloseWindow(hw);
hw = FindWindow(NULL, TEXT("Speakers properties"));
if (hw != NULL) CloseWindow(hw);
hw = FindWindow(NULL, TEXT("Audio"));
Expand Down Expand Up @@ -303,7 +307,7 @@ int Soundsetup(TCHAR * name)
if (hlistview == NULL) return -3; // no audio program


if ((_tcsstr(name, TEXT("Microphone")) == NULL) ||
if (((_tcsstr(name, TEXT("Microphone")) == NULL) && (_tcsstr(name, TEXT("Microfono")) == NULL))||
(_tcsstr(name, TEXT("USB Audio CODEC")) == NULL))
return -8;

Expand Down Expand Up @@ -338,7 +342,7 @@ int Soundsetup(TCHAR * name)
ReadProcessMemory(process, _item, item, 512, NULL);
ReadProcessMemory(process, _subitem, subitem, 512, NULL);

if ((_tcsstr(TEXT("Microphone "), item) != NULL) &&
if (((_tcsstr(TEXT("Microphone "), item) != NULL) || (_tcsstr(TEXT("Microfono "), item) != NULL)) &&
(_tcsstr(TEXT("USB Audio CODEC "), subitem) != NULL))
mikedevice = i;
_tprintf(TEXT("%s %s\n"), item, subitem);
Expand Down Expand Up @@ -373,6 +377,8 @@ int Soundsetup(TCHAR * name)
Sleep(300);
hRecDevice = FindWindow(NULL, TEXT("Proprietà - Microphone"));
if (hRecDevice != NULL) break;
hRecDevice = FindWindow(NULL, TEXT("Proprietà - Microfono"));
if (hRecDevice != NULL) break;
hRecDevice = FindWindow(NULL, TEXT("Microphone properties"));
if (hRecDevice != NULL) break;
retry--;
Expand Down Expand Up @@ -465,7 +471,7 @@ int SoundPlaySetup(TCHAR * name)
if (hlistview == NULL) return -3; // no audio program


if ((_tcsstr(name, TEXT("Speakers")) == NULL) ||
if (((_tcsstr(name, TEXT("Speakers")) == NULL) && (_tcsstr(name, TEXT("Altoparlanti")) == NULL)) ||
(_tcsstr(name, TEXT("USB Audio CODEC")) == NULL))
return -8;

Expand Down Expand Up @@ -500,7 +506,7 @@ int SoundPlaySetup(TCHAR * name)
ReadProcessMemory(process, _item, item, 512, NULL);
ReadProcessMemory(process, _subitem, subitem, 512, NULL);

if ((_tcsstr(TEXT("Speakers "), item) != NULL) &&
if (((_tcsstr(TEXT("Speakers "), item) != NULL) || (_tcsstr(TEXT("Altoparlanti "), item) != NULL)) &&
(_tcsstr(TEXT("USB Audio CODEC "), subitem) != NULL))
{
spkrsdevice = i;
Expand Down Expand Up @@ -538,6 +544,8 @@ int SoundPlaySetup(TCHAR * name)
Sleep(300);
hRecDevice = FindWindow(NULL, TEXT("Proprietà - Speakers"));
if (hRecDevice != NULL) break;
hRecDevice = FindWindow(NULL, TEXT("Proprietà - Altoparlanti"));
if (hRecDevice != NULL) break;
hRecDevice = FindWindow(NULL, TEXT("Speakers properties"));
if (hRecDevice != NULL) break;
retry--;
Expand Down
2 changes: 1 addition & 1 deletion src/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define IDC_STATIC (-1)
#endif

#define VERSION "ExtIO_H101.dll ver 0.12"
#define VERSION "ExtIO_H101.dll ver 0.13"

#define IDD_RTL_SETTINGS 100
#define IDC_SAMPLERATE 1000
Expand Down

0 comments on commit 28190a0

Please sign in to comment.