Skip to main content

Topic: E-MU 0404 USB - foobar2000 "forgets" ASIO config on shutdown (Read 76291 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • ExUser
  • [*][*][*][*][*]
  • Read-only
E-MU 0404 USB - foobar2000 "forgets" ASIO config on shutdown
Reply #25
Just use DirectSound. The DS drivers behave as you'd expect. ASIO provides no increase in audio quality.
  • Last Edit: 27 January, 2010, 08:02:48 AM by Canar

  • yayacek
  • [*]
E-MU 0404 USB - foobar2000 "forgets" ASIO config on shutdown
Reply #26
Just use DirectSound. The DS drivers behave as you'd expect. ASIO provides no increase in audio quality.



With the native ASIO drivers, E-MU 0404 USB can switch automatically the sampling rate according to the source material. It's impossible with DS drivers.
- ASIO - If the source material is e.g. 96kHz EMU will switch automatically to this sampling rate
- DS - If the source material is e.g. 96kHz EMU will not switch automaticaly to this sampling rate. Using DS drivers one have to switch manualy the sampling rate on the EMU Control Panel.


  • yayacek
  • [*]
E-MU 0404 USB - foobar2000 "forgets" ASIO config on shutdown
Reply #27
The driver can be trivially hacked to use the same CLSID every time.
If I had this sound card, I'd do it that way...


trivially hacked... well, please tell me (us) how to do this

  • ExUser
  • [*][*][*][*][*]
  • Read-only
E-MU 0404 USB - foobar2000 "forgets" ASIO config on shutdown
Reply #28
With the native ASIO drivers, E-MU 0404 USB can switch automatically the sampling rate according to the source material. It's impossible with DS drivers.
And it's irrelevant with a Resampler in your DSP chain.

  • Yirkha
  • [*][*][*][*][*]
  • Moderator
E-MU 0404 USB - foobar2000 "forgets" ASIO config on shutdown
Reply #29
You can see the relevant part of the log here.
Full-quoting makes you scroll past the same junk over and over.

  • needle
  • [*]
E-MU 0404 USB - foobar2000 "forgets" ASIO config on shutdown
Reply #30
You can see the relevant part of the log here.


Can you explain what the procedure is for replacing the JZ's with JMP's?

  • ZenZendra
  • [*]
E-MU 0404 USB - foobar2000 "forgets" ASIO config on shutdown
Reply #31
Yirkha, so have you been successful? And if you have, can you please post how to do it ourselves, or you can give us the hacked files or something

  • Yirkha
  • [*][*][*][*][*]
  • Moderator
E-MU 0404 USB - foobar2000 "forgets" ASIO config on shutdown
Reply #32
Well I don't own E-MU 404 card, so I personally did not do anything. Nevertheless it's apparent from that IRC log that someone has indeed been successful with the modification.

I don't think you would be able to fix this yourself if the already present information didn't make much sense to you. But if you would point me to the driver package you have installed or the installed ASIO driver directly (ctasio.dll or emasio.dll or however it is called), I could probably devise a patch for you to simply apply afterwards.
Full-quoting makes you scroll past the same junk over and over.

  • ZenZendra
  • [*]
E-MU 0404 USB - foobar2000 "forgets" ASIO config on shutdown
Reply #33
I have found emasio.dll in system32, so if you can do anything..... Thank you for the effort
  • Last Edit: 25 September, 2010, 09:26:21 AM by ZenZendra

  • Yirkha
  • [*][*][*][*][*]
  • Moderator
E-MU 0404 USB - foobar2000 "forgets" ASIO config on shutdown
Reply #34
OK, got it fine. What OS are you running, Windows Vista or 7?
Full-quoting makes you scroll past the same junk over and over.

  • ZenZendra
  • [*]
E-MU 0404 USB - foobar2000 "forgets" ASIO config on shutdown
Reply #35
I' m running 7

  • Yirkha
  • [*][*][*][*][*]
  • Moderator
E-MU 0404 USB - foobar2000 "forgets" ASIO config on shutdown
Reply #36
OK, then the solution might be amazingly simple.

Backup your emasio.dll and replace it with this. The ASIO device selection should not be forgotten anymore between foobar2000 restarts.
  • Last Edit: 29 September, 2010, 07:54:59 PM by Yirkha
Full-quoting makes you scroll past the same junk over and over.

  • ZenZendra
  • [*]
E-MU 0404 USB - foobar2000 "forgets" ASIO config on shutdown
Reply #37
It doesn't work  every time i restart my computer it forgets

  • Yirkha
  • [*][*][*][*][*]
  • Moderator
E-MU 0404 USB - foobar2000 "forgets" ASIO config on shutdown
Reply #38
Hmm how exectly did you try it, step by step? It might need two fb2k restarts to start working properly.

Also did you see it forget the right device even when just launching fb2k, closing it and starting again? Or only when restarting the whole computer?
Full-quoting makes you scroll past the same junk over and over.

  • ZenZendra
  • [*]
E-MU 0404 USB - foobar2000 "forgets" ASIO config on shutdown
Reply #39
Ok, i started the whole procedure again. I returned the original emasio, and then started foobar, set the asio drivers and the output to asio, played a song, and then restarted it for a few times and then closed it, replaced the original emasio with your's and started foobar again, and restarted it for a few times, and i restarted the computer, and it forgets  And i never had the problem when restarting foobar, it only forgets when the computer is restarted

  • Yirkha
  • [*][*][*][*][*]
  • Moderator
E-MU 0404 USB - foobar2000 "forgets" ASIO config on shutdown
Reply #40
All right. Sorry for the previous confusion and this delay in my reply - I needed to get some more time to look at this all.

Apparently the emasio.dll itself works fine, it caches the relevant information in registry, etc.

But there is another player in the game, a process called emaudsrv.exe which runs as a service. It's quite useful, as it for example automatically registers the ASIO drivers for each device you plug in and so on. But, unfortunately it also erases all registrations when the computer is shutting down - and that's the real problem here.

A simple solution would be to just hack emasio.dll to always return the same ID for all registrations, which is what I have originally suggested (and what has been already done on another forum recently). But that would fail if somebody used more than one E-MU device on the same computer and I like to do things properly.

So I modified the emasio.dll to still generate a "random" ID, but based on the device name reported by the OS (MD5 sum of the NT device path string). That should give an unique ID for each device, but still keep it constant for the same one.

Again, I don't have any E-MU hardware to test, but I've verified the relevant functionality of the DLL as well as I could and everything seemed working as expected.

The fixed DLL for download:
emasio.dll x86 (patch for original DLL with size 58880 Bytes, md5sum 79df09ce7d2b51ec0e0f3456d460d1d7, in "C:\Windows\System32" on Win/x86 [32-bit] and "C:\Windows\SysWOW64" on Win/x64 [64-bit])
emasio.dll x64 (patch for original DLL with size 65024 Bytes, md5sum a0f7c05a90100a5a701943ec0b997211, in "C:\Windows\System32", on Win/x64 [64-bit] only)

2010-10-18: Added the x64 version.
2010-10-20: Fixed the x64 version.
  • Last Edit: 03 November, 2010, 04:21:26 PM by Yirkha
Full-quoting makes you scroll past the same junk over and over.

  • ZenZendra
  • [*]
E-MU 0404 USB - foobar2000 "forgets" ASIO config on shutdown
Reply #41
I'm sorry for the delayed answer, but it was worth it, because the first time i try it, it didn't worked, and i didn't have the time to inform you about it. And then, suddenly yesterday it worked!! It needed a few restarts obviously, and i can't believe it yet, i'm so encredibly grateful four your help Yirkha, i don't have enough words to say thanks, so .... THANK YOU a million times. Now i can really enjoy my music with foobar without this annoyances. And this bug is present for years now, and yirkha solved it in one day practically!!

  • Yirkha
  • [*][*][*][*][*]
  • Moderator
E-MU 0404 USB - foobar2000 "forgets" ASIO config on shutdown
Reply #42
That's great news! You are welcome, I'm glad I could help you to solve this.
Full-quoting makes you scroll past the same junk over and over.

E-MU 0404 USB - foobar2000 "forgets" ASIO config on shutdown
Reply #43
That's great news! You are welcome, I'm glad I could help you to solve this.


Hi Yirkha

I 've found your patched version of emasio.dll.
It works great !
Many thanks
 

Armando

E-MU 0404 USB - foobar2000 "forgets" ASIO config on shutdown
Reply #44
I'm on Windows 7 x64, and I guess my card uses a 64-bit version of emasio.dll (it severely differs with 32-bit bit one). I'd really appreciate it if someone could make the corresponding changes to this 64-bit version. I had tried to do them myself, but have found myself completely lost in comparison and disassembly due to very little experience with low-level code and executable file structure 
I've made emasio.dll x64 available for download: http://sharebee.com/f02838f5

  • Yirkha
  • [*][*][*][*][*]
  • Moderator
E-MU 0404 USB - foobar2000 "forgets" ASIO config on shutdown
Reply #45
Bah, I've thought it will be neccessary to handle the x64 version too ever since I found out about the emaudsrv service process, but secretly hoped we could do without it...
I'll look at the 64-bit version again when I have time and keep you updated here.
Full-quoting makes you scroll past the same junk over and over.

  • Yirkha
  • [*][*][*][*][*]
  • Moderator
E-MU 0404 USB - foobar2000 "forgets" ASIO config on shutdown
Reply #46
OK, I've modified the x64 version too - see the updated [a href='index.php?act=findpost&pid=724792']post #41[/a] above.
Again, I can't be sure I did everything right, but the relevant function has been working correctly here as far as I can tell. Try it and see...
Full-quoting makes you scroll past the same junk over and over.

  • T_B_Good
  • [*]
E-MU 0404 USB - foobar2000 "forgets" ASIO config on shutdown
Reply #47
Hello, Yirkha
I am running Win 7 64bit, E-mu 0202 and foobar v1.1
I have tried emasio.dll x64 you made but it didn't work for me.

Please correct me if I am doing something wrong, but that is my process:

I place emasio.dll x64 ver. to Windows\System32 overwriting an old one. Restart computer. As a result - "No ASIO drivers found" in foobar and I also unable to change sample rate in E-MU control panel.

I also tried placing emasio.dll x86 ver. in both dirs simultaniously: Windows\System32 and Windows\SysWOW64. The result is: ASIO works perfectly as on native dll but is still "forgetable" in foobar.

Any solutions please?

  • Yirkha
  • [*][*][*][*][*]
  • Moderator
E-MU 0404 USB - foobar2000 "forgets" ASIO config on shutdown
Reply #48
I am running Win 7 64bit, E-mu 0202 and foobar v1.1
I have tried emasio.dll x64 you made but it didn't work for me.
OK, let's do some information gathering first.
Could you find your original emasio.dll in both C:\Windows\System32 and C:\Windows\SysWOW64 and tell me the file size of both of them?

I place emasio.dll x64 ver. to Windows\System32 overwriting an old one. Restart computer. As a result - "No ASIO drivers found" in foobar and I also unable to change sample rate in E-MU control panel.
Hmm how did you replace the old .dll? Because that sounds like both fb2k and the E-MU software could not use the DLL at all.

By the way, it must be done from a 64-bit process (e.g. Explorer started simply from the Desktop or Start menu), because 32-bit processes see Windows\System32 as an alias for Windows\SysWOW64 only. But that would be apparent in the file size test above (they would or would not differ).

I also tried placing emasio.dll x86 ver. in both dirs simultaniously: Windows\System32 and Windows\SysWOW64. The result is: ASIO works perfectly as on native dll but is still "forgetable" in foobar.
Ideally, on 64-bit Windows, the x86 DLL should go to SysWOW64, the x64 one to System32. If this worked as you described, it sounds again like you see the virtual System32 only. But maybe I'm wrong on that account, we'll know more based on my first question above here as well.

One more note regarding the number of restarts needed -
Originally, upon Windows startup, the driver finds a seemingly new USB device attached and generates a new random ID for it. When you run fb2k, it doesn't recognize anything under the old ID and needs a manual change.
With the patched version, the driver generates always the same pseudo-random ID as long as the device is the same too. But for that to show any effect, you need to restart two times (first restart: it generates the new kind of ID and you have to set it in fb2k, second restart: it generates the same ID again and fb2k finally remembers the settings).
Full-quoting makes you scroll past the same junk over and over.

  • T_B_Good
  • [*]
E-MU 0404 USB - foobar2000 "forgets" ASIO config on shutdown
Reply #49
Thank you for reply.

Ok. For the clarity of the experiment I have reinstalled my native E-MU drivers again. Now I find emasio.dll in C:\Windows\System32 it is 65 024 bytes and in C:\Windows\SysWOW64 it is 58 880 bytes.

They ARE different indeed. So I must be running 64bit process now? So I am going to do this once again as you mentioned: "on 64-bit Windows, the x86 DLL should go to SysWOW64, the x64 one to System32" (system asks for overwrite, I say yes). and restart 2 times... and see what it brings...