Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: ASIO and Direct Sound at the same time (Read 13640 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

ASIO and Direct Sound at the same time

I've grown accustomed to playing music through Direct Sound while playing a standalone VSTi (TruePianos or Colossus) via ASIO. I need the low latency, it simply isn't worthwhile to strike a key and wait. Unfortunatly my Xonar D1 has had terrible driver support and only recently have I discovered the Uni drivers for it. While I'm grateful for the updates, I've lost the advantage of being able to hear both Direct Sound and ASIO simultaneously. Whenever I use ASIO, foobar2k continues to play, but I hear nothing.

My question is, can I regain this option, or do I have to revert to earlier driver to make this work again. I'm really not pleased with the idea of using old inferior software for a card that I've had for years (in wait of proper drivers) just so that I can use ASIO in what I understand to be the wrong way. But I'm loosing functionality otherwise.

Perfect audio reproduction is not a concern for me unless I'm solely listening (and I still have that option through ASIO). So, if there is a way to force ASIO to allow Direct Sound hardware access also I'd greatly appreciate knowing.

ASIO and Direct Sound at the same time

Reply #1
ASIO and DirectSound concepts are just too different. You cannot and should not use them simultaneously. ASIO is all about single voice optimized playback, DirectSound is all about multivoice environment - mixing. So, now ASIO silenced the DirectSound? Ahem, then everything went perfectly normal and nothing to worry about. Playing DS application whenever the ASIO is in use is incorrect behaviour. It means audio driver is cheating, probably lying the native samplerate and a sure thing increasing both ASIO and DirectSound latency by using own mixing buffers.

Whenever you choose ASIO it means your application is a true "daddy" and can do all premixing itself. DirectSound is a more loose concept, it allows mixing to be done per-application and cross-application, all together. Some hardware, like creative's one do really favourable to DirectSound and offloads some mixing to hardware chip. They will do it anyway thats why i'm saying it is favourable to them. Xonar D1 can only have sofware mixer, single voice. That is neither good nor bad. Then you decide either you deal with windows build-in mixer or your own. When you decide to use multiple audio applications all together it means are 100% positive about build-in mixer and ASIO is strongly a no go. Windows mixer have some latency to bear with it's a natural pay back for a instant readiness feature. ASIO do not involve such an latency because it does not have a need to collect audio data from multiple applications.

This dilemma is absolutely natural to PC, that is why both concepts like ASIO and DirectSound are important and valuable. Saying the two are working together is akin to saying they are both broken. Speaking of DirectSound the latency is really depends on programming. Could not say for sure about minimum buffer values for WinXP, but for Vista 30 millisecond buffers (throgh the whole operational system mixer chain!!) is easy deal for a application. 20 millisecond for a application plus ten millisecond for a core mixer. The actual latency is much lower, about 5 millisecond for application prebuffering and 6 for system mixer. 11 millisecond for a software lag - that is not that much to blame the DirectSound concept till the end of time. WinXP may be a bit worse in that regard and more favourable to ASIO by raw latency comparing. I'd tell a bit more about WinXp had i understand myself the twisted logic behind it's mixer.
maiko.elementfx.com

ASIO and Direct Sound at the same time

Reply #2
Thank you for your description. I'm not really fuzzy on the concepts though.

Let me clarify. I've reverted to the older, official drivers from Asus (7.12.8.1777) and I can now select ASIO via TruePianos, Colossus, or Abelton Live. In every instance the latency is fast. I won't claim that there is no additional latency due to the incorrect implementation. But I'm snobbish about input responsiveness (which is why I use a CRT for gaming), and I can't say with certainty that there is a perceivable latency.

I can set EW Colossus standalone as low as 15ms (without distortion) under DirectSound...and drumming is terrible. When I set it to ASIO it's far more responsive.  With a setting as high as 10ms, playing a drum kit becomes difficult. With the ASIO control pannel set to 2ms, Colossus reports either 3 or 4ms total latency (depending on 44.1, vs anything higher). I know it doesn't make sense, but it's fast enough for me. Whether it's routing through windows mixer, or otherwise manging to simultaneously feed the hardware directly via ASIO and also through the Windows 7 mixer I can't say. All I know is that ASIO affords a significant advantage despite it's improper support. And if I can't use this in conjunction with Foobar2k, then I'm loosing a valuable function.

I'll spend a bit more time comparing versions and see if I can't distinguish between the different drivers. Still, what i want is....everything at once. Even if it does ultimately mean that 2ms is more like 8--It's satisfactory, where 15ms is unplayable.

ASIO and Direct Sound at the same time

Reply #3
ASIO and DirectSound concepts are just too different. You cannot and should not use them simultaneously.


This is wrong advice. It's only a question whether the driver developer allows this or not. It can certainly be accomplished with practically no added latency.

ASIO and Direct Sound at the same time

Reply #4
ASIO and DirectSound concepts are just too different. You cannot and should not use them simultaneously.


This is wrong advice. It's only a question whether the driver developer allows this or not. It can certainly be accomplished with practically no added latency.

Yes, most probably it can. It can not add that much latency it can add, it can distort signal a lot it can not. That is just a speculations. The point is, breaking into the sterile ASIO copy-through is not desirable action.


dzmcm
While i found this driver behaviour incorrect, its an advice for you to use the same ASIO and foobar sample rate. Any resampler contribute its lion share to latency.
maiko.elementfx.com

ASIO and Direct Sound at the same time

Reply #5
The point is, breaking into the sterile ASIO copy-through is not desirable action.


Sterility is no property found in computer systems. Code runs on machines, not fuzzy organisms. I know, for some people, their computers seem to behave as fuzzy organisms. But fuzzy knowledge about apparently fuzzily behaving systems is not well suited to found statements about generic, architectural properties of those systems. ASIO does neither need sterility nor has it to be separated from DirectSound at all cost. A driver developer either allows additional input pins, that he connects, for example, to the DirectSound output pins, and mixes those into the output stream, or he doesn't. It does not matter where they come from, whether from DirectSound or anything else. Mixing is a very trivial operation. It can be accomplished at sample level, without any buffering.

The best advise for users is to just try out the latest original and/or 3rd party drivers. If it works, it works, if not, it doesn't. Additional claims about "sterility" and such can be safely ignored.

ASIO and Direct Sound at the same time

Reply #6
@googlebot: While I might agree with parts of your post, I cannot agree with it as a whole.

When using kernel streaming, are you able to play simultaneous streams?
When using Wasapi exclusive, are you able to play simultaneous streams?
When, back in Windows 98 days, we used Directsound exclusive mode, (mostly used in fullscreen games) were you able to play simultaneous streams?

ASIO as a concept is an API that interacts directly with the hardware. As such, it is more like owning the stream, it is not to be expected otherwise.

You say that mixing can be accomplished at sample level. That is, of course, if both streams are at the same sample rate and bit depth. With ASIO, generally the driver determines those two, and the application obeys those. Directsound works exactly the opposite way.

As such, for an ASIO driver to support that scenario, what is doing is forcing a samplerate and bitrate to Directsound (so possibly resampling/changing bit depth/format). And what's more importantly, if it's doing it in software, let's hope it's doing so in floating point.


As it looks out, the user is happy with that he has, but the scenario necessarily adds questions. At least, the latency he gets is good for an ASIO driver.

ASIO and Direct Sound at the same time

Reply #7

When using kernel streaming, are you able to play simultaneous streams?


Depends on the driver implementation.


When using Wasapi exclusive, are you able to play simultaneous streams?


This is not to be allowed by design.


ASIO as a concept is an API that interacts directly with the hardware. As such, it is more like owning the stream, it is not to be expected otherwise.


Owning a stream means having flow control. Having flow control does not interfere with pulling samples from multiple sources. Just because DirectSound enters the mix, doesn't mean that it takes over any form of control.


You say that mixing can be accomplished at sample level. That is, of course, if both streams are at the same sample rate and bit depth. With ASIO, generally the driver determines those two, and the application obeys those. Directsound works exactly the opposite way.


It is nothing special. Wasapi, for example, does not accept any audio data that doesn't match the configured output sample rate (also in shared mode). This is either delivered by an application directly or one employs DirectSound, which offers automatic conversion to the desired output rate and format. All this does not at all interfere with the output driver, which just denies anything it cannot consume exactly as it wants it. DirectSound is just a convenient sample rate and format conversion layer with mixing capabilities. This is also where mixing was designed to take place for regular media use on the Windows platform. However, if manufacturers offered drivers for alternative sound architectures, such as ASIO, they were free to either use the hardware exclusively or concurrently accept and mix input from DirectSound (just as any other source), on the driver level.


As such, for an ASIO driver to support that scenario, what is doing is forcing a samplerate and bitrate to Directsound (so possibly resampling/changing bit depth/format). And what's more importantly, if it's doing it in software, let's hope it's doing so in floating point.


I would wonder if an ASIO driver supported transparent sample rate conversion. This is impossible without adding latency. But, nevertheless, it is trivial to let an ASIO driver accept and mix multiple simultaneous input streams with identical rates. Sample rate and format conversion of alternative sources, for example Foobar playback, can be left to DirectSound.

ASIO and Direct Sound at the same time

Reply #8
Thank you all for the info.

I would like to know how and why my older drivers do what they do. Is there a way to test the output format so I can know the true bit depth and sample rate I'm getting. I can set the sample rate in the Xonar control panel (however reliable that is), but not bit depth. I have some 24-bit 192khz music for testing, but I can't distinguish with any good reliability by ear.

BTW, under foobar WASAPI let's me set the bit depth (and it operates exclusively). ASIO says it will be automatically selected, but it allows the dither option where DirectSound doesn't.

And although sterility isn't the best term for a logical binary system, I find organic analogies best to describe the countless unknowns responsible for all the erratic behavior I've witnessed over the years (although I mostly blame windows, not hardware).

ASIO and Direct Sound at the same time

Reply #9
Well I was gonna see if system shock 2's hardware sound w/eax worked with the new Uni drivers (it's still broken as it has been in the past, though less so), and then I discovered that I now CAN use ASIO while playing my music. It even routes through dolby headphone processing like before (not that i care). I don't know why...but I think it's because I used the ASIO 1.0 option in the installer. It didn't work before, but I was switching from the official drivers this time, rather than reinstalling the Uni drivers.

So now I can have my cake and eat it too.....mmmm cake.