Skip to content

Commit

Permalink
3.1.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
KaleidonKep99 committed Mar 7, 2016
1 parent b981dd1 commit 48c5bbd
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -996,7 +996,7 @@ private void SFZComp4_Click(object sender, EventArgs e)
// Brand new output mode
private void WhatIsOutput_Click(object sender, EventArgs e)
{
MessageBox.Show("If you check this option, the driver will create a WAV file on your desktop, called \"keppydriveroutput.wav\".\n\n" +
MessageBox.Show("If you check this option, the driver will create a WAV file on your desktop, called \"(programname).exe - Keppy's Driver Output File.wav\".\n\n" +
"You can NOT change the default output directory, I'm sorry.\n" +
"But hey, now you can record your real-time performances (Like from Synthesia) directly to an audio file, without using external programs such as Audacity!\n" +
"Isn't that great?", "\"Output to WAV mode\"? What is it?", MessageBoxButtons.OK, MessageBoxIcon.Information);
Expand Down
4 changes: 2 additions & 2 deletions keppydrv.iss
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ VersionInfoCompany=Keppy Studios
VersionInfoCopyright=Copyright (c) 2011-2016 Brad Miller, Chris Moeller and Riccardo Loi. All rights reserved.
VersionInfoDescription=User-mode MIDI driver for Windows Vista and newer
VersionInfoProductName=Keppy's Driver 3.1
VersionInfoProductTextVersion=3.1.0.5
VersionInfoProductTextVersion=3.1.0.6
VersionInfoProductVersion=3.1
VersionInfoTextVersion=User-mode MIDI driver for Windows Vista and newer
VersionInfoVersion=3.1.0.5
VersionInfoVersion=3.1.0.6

[Files]
; 64-bit OS
Expand Down
Binary file modified keppydrv/Resource.aps
Binary file not shown.
Binary file modified keppydrv/Resource.rc
Binary file not shown.
36 changes: 34 additions & 2 deletions keppydrv/keppymididrv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -926,6 +926,7 @@ void realtime_load_settings()
}

BOOL ProcessBlackList(){
// Blacklist system init
TCHAR defaultstring[MAX_PATH];
TCHAR userstring[MAX_PATH];
TCHAR defaultblacklistdirectory[MAX_PATH];
Expand All @@ -936,11 +937,19 @@ BOOL ProcessBlackList(){
ZeroMemory(&osvi, sizeof(OSVERSIONINFO));
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
GetVersionEx(&osvi);
// VirtualMIDISynth ban init
TCHAR vmidisynthpath[MAX_PATH];
SHGetFolderPath(NULL, CSIDL_SYSTEM, NULL, 0, vmidisynthpath);
PathAppend(vmidisynthpath, _T("\\VirtualMIDISynth\\VirtualMIDISynth.dll"));
try {
if (osvi.dwMajorVersion == 5) {
MessageBox(NULL, L"Windows XP is not supported by the driver.", L"Keppy's Driver", MB_OK | MB_ICONERROR);
return 0x0;
}
else if (PathFileExists(vmidisynthpath)) {
MessageBox(NULL, L"Please uninstall VirtualMIDISynth 1.x before using this driver.\n\nWhy this? Well, VirtualMIDISynth 1.x causes a DLL Hell while loading the BASS libraries, that's why you need to uninstall it before using my driver.\n\nYou can still use VirtualMIDISynth 2.x, since it doesn't load the DLLs directly into the MIDI application.", L"Keppy's Driver", MB_OK | MB_ICONERROR);
return 0x0;
}
else {
GetModuleFileName(NULL, modulename, MAX_PATH);
PathStripPath(modulename);
Expand Down Expand Up @@ -1029,7 +1038,7 @@ BOOL IsVistaOrNewer(){
void ReloadSFList(DWORD whichsflist){
if (consent == 1) {
std::wstringstream ss;
ss << "Do you want to (re)load list " << whichsflist << "?";
ss << "Do you want to (re)load list " << whichsflist << "?";
std::wstring s = ss.str();
const int result = MessageBox(NULL, s.c_str(), L"Keppy's Driver", MB_ICONINFORMATION | MB_YESNO);
switch (result)
Expand Down Expand Up @@ -1071,6 +1080,18 @@ void keybindings()
}
}

std::wstring s2ws(const std::string& s)
{
int len;
int slength = (int)s.length() + 1;
len = MultiByteToWideChar(CP_ACP, 0, s.c_str(), slength, 0, 0);
wchar_t* buf = new wchar_t[len];
MultiByteToWideChar(CP_ACP, 0, s.c_str(), slength, buf, len);
std::wstring r(buf);
delete[] buf;
return r;
}

unsigned __stdcall threadfunc(LPVOID lpV){
unsigned i;
int pot;
Expand Down Expand Up @@ -1104,10 +1125,19 @@ unsigned __stdcall threadfunc(LPVOID lpV){
}
// Encoder code
if (hStream[0]) {
typedef std::basic_string<TCHAR> tstring;
TCHAR encpath[MAX_PATH];
TCHAR buffer[MAX_PATH] = { 0 };
TCHAR * out;
DWORD bufSize = sizeof(buffer) / sizeof(*buffer);
if (GetModuleFileName(NULL, buffer, bufSize) == bufSize) { }
out = PathFindFileName(buffer);
std::wstring stemp = tstring(out) + L" - Keppy's Driver Output File.wav";
LPCWSTR result2 = stemp.c_str();
if (SUCCEEDED(SHGetFolderPath(NULL, CSIDL_DESKTOP, NULL, 0, encpath)))
{
PathAppend(encpath, L"\\keppydriveroutput.wav");
PathAppend(encpath, result2);

}
_bstr_t b(encpath);
const char* c = b;
Expand All @@ -1116,6 +1146,8 @@ unsigned __stdcall threadfunc(LPVOID lpV){
{
case IDYES:
BASS_Encode_Start(hStream[0], c, BASS_ENCODE_PCM, NULL, 0);
MessageBox(NULL, out, L"", MB_ICONINFORMATION);
MessageBox(NULL, encpath, L"", MB_ICONINFORMATION);
break;
case IDNO:
break;
Expand Down
9 changes: 9 additions & 0 deletions output/keppymididrv.defaultblacklist
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@ AERTSr64.exe
AMBSpiE.exe
AfterFX.exe
CCC.exe
CONSENT.Exe
CONSENT.EXE
CONSENT.exe
CTAudSvc.exe
CamtasiaStudio.exe
Consent.Exe
Consent.EXE
Consent.exe
Dreamweaver.exe
EXPLORER.EXE
Explorer.EXE
Expand Down Expand Up @@ -45,6 +51,8 @@ WUDFHost.exe
alg.exe
ccc.exe
chrome.exe
consent.Exe
consent.EXE
consent.exe
csrss.exe
ctfmon.exe
Expand All @@ -62,6 +70,7 @@ notepad++.exe
puush.exe
sihost.exe
spoolsv.exe
stdrt.exe
steamwebhelper.exe
svchost.exe
taskhost.exe
Expand Down

0 comments on commit 48c5bbd

Please sign in to comment.