[2010-01-03 13:17:22] <olegfink> hi
[2010-01-03 13:18:09] <olegfink> basically I'm after the problem discussed at http://www.hydrogenaudio.org/forums/index.php?showtopic=62147, but I would like to ask a more specific question.
[2010-01-03 13:18:14] <@Yirkha> < E-MU 0404 USB - Foobar 0.9.5 "forgets" ASIO config on shutdo - Hydrogenaudio Forums >
[2010-01-03 13:18:40] <olegfink> I know where in the windows registry I can read the newly generated CLSID for the device, and I know the CLSID is stored in foo_out_asio.dll.cfg
[2010-01-03 13:18:49] <+Kohlrabi> had the same bug with an old ASIO component
[2010-01-03 13:19:07] <+Kohlrabi> worked OK since updating it
[2010-01-03 13:19:08] <olegfink> however, it also appears to store the checksum I'm not sure hot to generate
[2010-01-03 13:19:22] <olegfink> Kohlrabi: this is with the latest foo_out_asio and 1.0b6
[2010-01-03 13:19:27] <+Kohlrabi> hmps
[2010-01-03 13:19:35] <+Kohlrabi> oh
[2010-01-03 13:19:46] <+Kohlrabi> The thread is already Peterized
[2010-01-03 13:19:55] <olegfink> so, while I know peter's policy about config format, I'd still like to know if there is the tiniest possibility to get the spec
[2010-01-03 13:20:02] <+Kohlrabi> oh
[2010-01-03 13:20:05] <+Kohlrabi> and Kohlized, too ;)
[2010-01-03 13:20:23] <olegfink> because knowing how to write the config solves the problem without "fixing" BOTH fb2k and emu drivers
[2010-01-03 13:20:44] <olegfink> (just have a small tool that reads registry and writes the config at bootup)
[2010-01-03 13:20:52] <+Kohlrabi> hm
[2010-01-03 13:21:49] <+Kohlrabi> Back in the days I would have used my trusty hex editor and diffed the .cfg after setting the new device
[2010-01-03 13:22:14] <olegfink> that's what I did
[2010-01-03 13:22:36] <olegfink> but in addition to the CLSID that changes there are also another 16B that change and appear to be a checksum
[2010-01-03 13:24:18] <olegfink> http://dpaste.com/140522/
[2010-01-03 13:24:28] <@Yirkha> < dpaste: #140522 >
[2010-01-03 13:24:42] <+Kohlrabi> so
[2010-01-03 13:24:52] <+Kohlrabi> Just try it
[2010-01-03 13:24:55] <olegfink> the different part of the "lines" 4 and 5 is the CLSID I can read from the registry, "line" 2 is probably a checksum
[2010-01-03 13:25:03] <+Kohlrabi> hmm
[2010-01-03 13:26:29] <olegfink> also I have almost no idea about win32 programming, shouldn't there be something to parse a string into CLSID?
[2010-01-03 13:26:40] <olegfink> they seem to be so widely used in win32
[2010-01-03 13:26:45] <olegfink> i‚ ))
[2010-01-03 13:26:48] <olegfink> sorry
[2010-01-03 13:29:37] <olegfink> at least this bootup fix will probably solve the problem leaving both sides "right"
[2010-01-03 13:29:53] <+Kohlrabi> I'd call it a hack ;)
[2010-01-03 13:36:40] <olegfink> what are the better options?
[2010-01-03 13:44:42] <+Kohlrabi> The vendor fixing their drivers
[2010-01-03 13:44:56] <+Kohlrabi> but that's out of question, obviously
[2010-01-03 13:45:00] <+Kohlrabi> :(
[2010-01-03 13:45:25] <olegfink> hmm, the checksum doesn't look like md5 of some tail of the file
[2010-01-03 13:45:49] <+Kohlrabi> time(NULL)
[2010-01-03 13:46:01] <+Kohlrabi> % something
[2010-01-03 13:46:22] <olegfink> and that'd be 16 bytes?
[2010-01-03 13:48:06] <+Kohlrabi> depends
[2010-01-03 13:51:07] <olegfink> and how something depending on time allows fb2k to check integrity?
[2010-01-03 13:51:31] <+Kohlrabi> yeah, it's flawed
[2010-01-03 13:51:34] <+Kohlrabi> don't listen to me!
[2010-01-03 13:51:43] <+Kohlrabi> (you're new here, right? :))
[2010-01-03 13:56:03] <@Yirkha> http://msdn.microsoft.com/en-us/library/aa379336(VS.85).aspx
[2010-01-03 13:56:06] <@Yirkha> < UuidFromString Function (Windows) >
[2010-01-03 13:56:44] <olegfink> that needs some rpc library?
[2010-01-03 13:57:54] <@Yirkha> Or http://msdn.microsoft.com/en-us/library/ms680589(VS.85).aspx
[2010-01-03 13:57:56] <@Yirkha> < CLSIDFromString Function (COM) >
[2010-01-03 13:58:05] <@Yirkha> Well everything needs that you link to a library.
[2010-01-03 13:58:18] <@Yirkha> You can't access registry without linking to advapi32.lib too.
...
[2010-01-03 14:11:38] <olegfink> hm, okay
[2010-01-03 14:12:03] <olegfink> looking more into foo_out_asio.dll.cfg, I guess some disassembly won't hurt
[2010-01-03 14:12:23] <olegfink> the config writer nowadays is implemented somewhere inside foobar, right?
[2010-01-03 14:12:40] <@Neptune> ^ fixing their drivers - why is that out of the question?
[2010-01-03 14:12:53] <olegfink> (because cfg_var.cpp in sdk looks like a thin wrapper)
[2010-01-03 14:13:19] <olegfink> Neptune: because thay have their reasons (that I don't completely understand) to think their approach is right
[2010-01-03 14:13:28] <@Neptune> you've spoken to them?
[2010-01-03 14:13:29] <olegfink> (it fixes some weird multichannel stuff or something)
[2010-01-03 14:13:48] <olegfink> not me, but other people who did posted about the response they got
[2010-01-03 14:15:42] <olegfink> well, maybe I should ask them nevertheless... there should be some critical amount of requests after hitting which they would decide that implementing the fix is easier than keeping hitting "delete mail" button
...
[2010-01-03 14:57:28] <@Yirkha> olegfink: Wouldn't it make more sense to hack ctasio.dll, so that it wouldn't call CoCreateGuid() and use a fixed GUID instead?
...
[2010-01-03 15:29:41] <olegfink> probably, but I didn't even know about ctasio.dll
[2010-01-03 15:30:23] <olegfink> I'll be happy to do the technical part, but unfortunately I know almost nothing about windows sound, and what I already know frightens me quite a bit
[2010-01-03 15:31:14] <olegfink> sure thing linux audio (at least user level) is crap, but in comparison with the multitude of mutually incompatible ways to get those bits down to the hardware in windows...
[2010-01-03 15:32:03] <olegfink> Yirkha: ctasio is a part of the driver, right?
[2010-01-03 15:34:31] <olegfink> hmm, my windows box doesn't think there is a file with this name on the system drive
[2010-01-03 15:34:58] <olegfink> how to list the files belonging to a package (in an 'uninstall programs' sense)?
[2010-01-03 15:35:06] <olegfink> s/an/the/
[2010-01-03 15:42:41] <olegfink> heh, the three-button-and-a-statusbar e-mu 0404 "control panel" is written in Qt4
...
[2010-01-03 16:14:07] <olegfink> Yirkha: http://dpaste.com/140571/ -- okay, probably this fn from emasio.dll is of interest, but which one of two CoCreateGuid()s?
[2010-01-03 16:14:08] <@Yirkha> < dpaste: #140571 >
[2010-01-03 16:35:35] <olegfink> is null clsid valid?
...
[2010-01-03 17:36:16] <olegfink> Yirkha: okay, replaced both JZ's with JMP's
[2010-01-03 17:36:26] <olegfink> seems to work fine (and retain the old clsid)
[2010-01-03 17:36:49] <olegfink> dunno what will happen in case it loses the registry entry though.
[2010-01-03 18:00:58] <@kode54> ?
...
[2010-01-03 18:33:49] <olegfink> kode54: if that '?' was for me, I've been trying to fix http://www.hydrogenaudio.org/forums/index.php?showtopic=62147
[2010-01-03 18:33:50] <@Yirkha> < E-MU 0404 USB - Foobar 0.9.5 "forgets" ASIO config on shutdo - Hydrogenaudio Forums >
[2010-01-03 18:34:29] <@kode54> oh
[2010-01-03 18:35:18] <olegfink> seems if I disable CoCreateGuid calls in emasio.dll, it magically works correctly, the bad thing is that I can't explain why it works, let alone how.
[2010-01-03 18:35:56] <olegfink> (because I have no idea where it gets the CLSID on startup, seems it's not in the registry)
...
[2010-01-03 23:16:13] <@Yirkha> [15:32:03] <olegfink> Yirkha: ctasio is a part of the driver, right?
[2010-01-03 23:16:13] <@Yirkha> I don't know, I just Googled E-MU 404 drivers, downloaded the latest installer and that DLL was the only one which was an ASIO user-mode driver in it.
[2010-01-03 23:16:13] <@Yirkha> [17:36:16] <olegfink> Yirkha: okay, replaced both JZ's with JMP's
[2010-01-03 23:16:13] <@Yirkha> [17:36:26] <olegfink> seems to work fine (and retain the old clsid)
[2010-01-03 23:16:13] <@Yirkha> That's great!
[2010-01-03 23:16:13] <@Yirkha> [17:36:49] <olegfink> dunno what will happen in case it loses the registry entry though.
[2010-01-03 23:16:16] <@Yirkha> Well I'd probably add some small procedure at the end/unused part of the .text section with some one, static generated GUID, like { mov eax, [esp+4]; mov dword ptr [eax], 12345678h; ...; xor eax, eax; retn 4; }, then redirect the calls there instead, to avoid the NULL CLSID.