|
Post by Hedgerow on Jul 1, 2008 14:06:34 GMT
I have an ASUS Xonar D2X and Vista, and I have this problem. I dont think it is isolated to onboard sound alone.
|
|
|
Post by xxxx on Aug 31, 2008 16:16:56 GMT
I have Realtek HD Audio and the same problem.
Solution I found:
Change audio outputs from ASIO supporting programs to use WASAPI instead.
Benefit: Proven 2 ms latency on HD Audio Codecs with Event Mode, 0% cpu use, glitch free and you can play PRO Audio apps glitch free while running games (tested to work).
Slight problem: Either all ASIO supporting apps implement WASAPI support or someone implements "wasapi4all.dll" that shows up instead of asio4all.
|
|
|
Post by xxxx on Aug 31, 2008 16:28:10 GMT
I obtained the above results using NAudio Demo on Vista 64 bit.
The demo app allows direct comparison of "waveout", DS, ASIO4ALL and WASAPI in Event Mode and Shared/Exclusive Mode.
To get 2 ms glitch free under WASAPI under high stress situation it was required to raise the player thread priority. I ran it 2 hours with no glitches after rising thread priority in situation such as running a game and changing the game from windowed to full screen thus.
With normal priority there were glitch during the full screen change operation so this is something to keep in mind when comparing ASIO4ALL with WASAPI, latter seems to want higher than normal for pcm source thread priority if the latency is under 40 ms.
|
|
|
Post by Michael Tippach on Aug 31, 2008 20:26:01 GMT
I obtained the above results using NAudio Demo on Vista 64 bit. Next, for your entertainment, try Exclusive/Event Mode for a 32 bit client in Vista 64! To get 2 ms glitch free under WASAPI under high stress situation it was required to raise the player thread priority. I ran it 2 hours with no glitches after rising thread priority in situation such as running a game and changing the game from windowed to full screen thus. How did you arrive at the quoted 2 ms? Did you derive this from the buffer size or have you performed some actual physical measurements, involving a loopback cable? You may be in for a surprise! Plus, you still need to add the overhead of resampling work, because in shared mode, it is up to you to resample to whatever the current mixer format would be.
|
|
|
Post by xxxx on Sept 1, 2008 12:31:25 GMT
Granted the real latency is more than just the buffer.
The point here was that the performance was comparable to that I got from asio4all and it was perfectly usable for both DJ and software synthesizing application that I'm mostly concerned about.
Resampling, you know this so I'm not sure what's your point:
The windows mixing engine runs at the rate user specified in the control panel so for the purposes I'm concerned about, and likely most who even consider using a motherboard audio for anything, you shouldn't be doing any resampling at all and only those legacy apps not utilizing the api would get resampled by the windows mixer. Of course this isn't satisfactory for many other pro-audio purposes which I may have conveniently missed in my post above but it is to many of ys who seek to get asio4all or another lower latency solution to work while still get sound from legacy directsound apps at the same time.
If you have a better solution than this in mind that doesn't involved new hardware then I'm excited to hear about it.
|
|
|
Post by xxxx on Sept 1, 2008 12:42:42 GMT
Next, for your entertainment, try Exclusive/Event Mode for a 32 bit client in Vista 64!
|
|
|
Post by xxxx on Sept 1, 2008 12:49:16 GMT
With the drivers I have the Exclusive mode works alone works but works worse than Shared mode.
With Event + Exclusive on 32 bit the events don't get triggered. On 64 bit compile it does play sound however it is garbled somehow and changing the buffer didn't seem to do affect that.
Conclusion: I didn't need exclusive mode for my semi-pro purposes with the onboard audio and Events work in shared mode for both 64 bit and 32 bit on 64 bit vista leaving the only issue at hand getting the audio from the asio supporting apps to the shared mode mixer. As far as I'm concerned the apps using the API will be internally already resampling the audio and I just need to set the mixing engine to use that rate and there isn't any resampling code to worry about.
|
|
|
Post by xxxx on Sept 5, 2008 23:26:26 GMT
I got it working, ASIO supporting apps can now use WASAPI shared mode allowing multiple low latency apps or whatever. There's still few things to do and test before I'll look into putting it up somewhere.
Technically it wasn't that challenging, anyone tiny bit familiar with bits, audio formats and buffering schemes could cook it in a day. The challenge came in form of not understanding everything entirely so made few bugs and spend few hours debugging them...
|
|
|
Post by Michael Tippach on Sept 6, 2008 0:00:23 GMT
I got it working, ASIO supporting apps can now use WASAPI shared mode allowing multiple low latency apps or whatever. Great! Have you had the chance looking into the loopback tests that I suggested, figuring out the real latencies achievable in WASAPI shared mode vs. what one would conclude from the buffer size?
|
|
|
Post by xxxx on Sept 6, 2008 9:07:46 GMT
The "2 ms" figure came out of NAudio demo app gui where, now having gained more understanding of the underlying code I can say with certainty that while the GUI allows setting specific latency, if shared mode is used the gui code should instead ask the latency from windows mixer.
As to your loopback test and the real latency - since I'm not going to figure out how to test this scientifically correctly I'll just give you the guess that if I interpreted things right, the mixer likes to have atleast 441 samples to begin with. I guess this means atleast 10 ms latency between calls to get more data.
|
|
|
Post by xxxx on Sept 19, 2008 6:44:09 GMT
I'm still on this but having a bit weird issue here. I'm testing with a piano program either playing single notes or sweeping the virtual piano keyboard quickly with a mouse listening how many notes get pressed during the sweep. Turns out that due to the larger wait between the wake up events some keys are missed during my "piano performance" that's easy with the mouse but something I couldn't do physically. So that's not the big issue for me. It's that that actual piano sound is different! Just very slightly but enough to note in A/B comparison easily. With asio4all it sounds best, with directsound ok and with my code (there's no code to speak of, just interleaving floats no other conversion by me) it's just boring. I suppose you don't have some expert guess on why would the piano sound duller.
|
|
|
Post by xxxx on Oct 2, 2008 13:17:38 GMT
I think it's working acceptably but I'm having a problem with Native Instruments software as stand alone. ASIO4ALL works there and my thing doesn't.
Do you know if the NI stuff differs from other apps? I'm not sending any timecodes as I've not figured out how to get/translate them properly.
|
|
|
Post by noldor on Nov 15, 2008 11:32:30 GMT
My audio device does not support only one client. I can get sounds from lots of software at the same time right now. And on Windows XP with Asio4All v2.6, i was able to play Guitar Rig with my Winamp or other spftwares, there wasn't any problem. Now on Vista with Asio4All 2.9, it looks like Asio4All gets the audio device on its own hand and doesn't let other software to use the device. I think this points out that there is a missing or a bug on the pragramming side. Also Guitar Rig icon does not appear on the Windows Vista Mixer View. And the sound bar does not flash up while guitar rig is playing and making sound. I appreciate your works and your labour on this work. You ppl make such an awesome tool for us. But please get rid of this issue, too. Because it won't be useful without playing with other stuff. I will be wating for an great Asio4All v3.0..
|
|
|
Post by Oh Cool on Dec 10, 2008 1:46:25 GMT
First, thanks for producing this program. It really does reduce latency. And I really like the anti-capitalist approach.
Annyway, I'd like to join in the chorus as another person using Vista who is unable to hear audio in any other program when using a DAW with a4a. With XP, I was able to, for example, run mp3s on winamp and play along on pre-amped bass through my PC speakers, using ableton, to get many awesome effects. Now, this is impossible. I did uncheck the "allow applications to take exclusive control" box in audio options, but this did not solve the problem.
I really hope someone can post an understandable solution to this. Being limited to only using a DAW really crimps the creative process. Thanks.
|
|
|
Post by Commisioner on Dec 16, 2008 11:15:03 GMT
Yeah! Please hear our opinion.
|
|