• Computers
  • Sound card line-in audio latency (p.2)
2015/02/19 05:15:57
TimDale
.... and to complete the answer, the SB sound card has all effects, eq, and other options all turned off.
 
2015/02/19 09:28:04
dwardzala
If the issue started happening when you migrated to Sonar, it is definitely due to the deficiency of the Creative Card.  Home Studio 9 was a more primitive program that didn't tax the sound card as much as Sonar does.
 
The Behringer interface is certainly a move in the right direction, but I don't have any experience with it or recall seeing anybody discuss it, so it may or may not get you all the way to where you want to be.
2015/02/19 15:56:16
slartabartfast
TimDale
Okay to explain the audio ......
I have a number of external hardware synths wired through a mixer and fed into the line-in socket on my Creative Labs X-Fi sound card in my PC. The output is either on speakers or headphones. I have been using Cakewalk Home Studio 9 for 2 years on this PC with no problems. I upgraded to Sonar so I could use VSTs. That's when the problems started. There is now a noticeable delay between hitting keys on the synth and the audio coming out of the speakers. I plugged the headphones into the mixer with the PC speakers still turned on, and you can hear a distinct double hit of every note. The problem persists whether Sonar is running or not, so theoretically it's something to do with the sound card config. I had a problem with latency when I first installed Sonar so I decreased the ASIO buffer latency from 50ms to 20ms and that cured it. Suddenly now without warning the latency is back, and nothing will get rid of it. The ASIO latency was still 20ms, I tried reducing it further to 10ms but it didn't make any difference.  (The only way I can now use my external synths in Sonar is to slide the recorded notes left by 1/8th bar (at 120bpm), i.e. 0.25 seconds, and then it works. Hardly ideal.)


So the routing is MIDI keyboard controller out via either standard 5pin MIDI connector or USB> unspecified MIDI interface or USB> MIDI track input of Sonar (so far there is no place to introduce latency except with a humongous MIDI buffer setting in Sonar)>Sonar MIDI track output> unspecified external synth input via MIDI cable or USB MIDI (again no place for latency)> External synth audio out> mixer in (no mixer effects or processing specified)>mixer out > sound card audio line in (still no place to add latency)> Sonar audio track with unspecified Sonar audio buffer setting (no Sonar or other software effects specified, but effects applied here is where most people get their latency) > (guessing) sound card audio line out > headphone or monitor/amp&speakers.
 
The usual cause of the introduced latency is that the effects applied on the Sonar audio track either require a lookahead buffer which means that the data is deliberately delayed so that data that has arrived in real time can be evaluated relative to data coming later and adjusted. This is typical of "mastering" plugins. Or that there is a very large audio buffer that holds up the data until the buffer fills and empties. When you moved to Sonar, you changed a bunch of settings by default, and you also got a bunch of new effects that might be problematic if applied in real time. Make sure there are no effects running in Sonar and see if the latency gets better, if not make Sonar's audio buffer smaller.
 
If the sound card or processor was being strained by the higher demands of Sonar the symptom would not be that latency was increased, it would be that audible dropouts would occur as the data stream ran dry. In such a case, you would be advised to increase Sonar's buffer to avoid the dropouts, and it would be that increased buffer, not the "weak" sound card that would introduce the latency.
 
2015/02/20 20:10:20
Cactus Music
What I have ordered as a experiment is an external USB audio interface by Behringer
 
Oh my. I bet it doesn't come with ASIO drivers either. I have one of those too, it came with a mixer. It works fine for anything but Sonar. I use it for live playback at gigs. It won't solve your problem at all. 
 
And Bat and me are not just being interface snobs,,, my advice comes from wasting years fighting PC audio and the problem all along was poorly written audio drivers. 
There is no solution other than purchasing a proper audio interface with proper ASIO drivers... go ahead and chase your tail for another year.. 
 
2015/03/03 09:53:24
TimDale
Let's try a different angle :
Leaving Sonar out of the equation (it's not running), any external audio being routed to my sound card speakers/headphone experiences a latency that wasn't there until recently.
My PC also has on-board audio (Realtek on ASUS motherboard), if I use the line-in and line-out of that, I get no latency. However, if I route the on-board audio line-in to the main speakers (on the sound card), latency is back. 
Any audio from the PC itself (samples, media players, VSTs) experiences no such latency.
 
Unfortunately I can't use the on board sound all the time as Sonar doesn't support it.
 
p.s. I had already ordered the Behringer audio interface because of another issue, that of noise on the line-in. However, if anything, the Behringer is worse. And still got the audio latency.
 
> There is no solution other than purchasing a proper audio interface with proper ASIO drivers... 
Can you recommend any (that won't break the bank) ?
 
 
2015/03/03 10:35:51
bvideo
Does it make any difference whether the card is set to 48K vs 44.1K, or bit depth 16 or 24?
2015/03/03 11:45:13
dwardzala
The only thing I can think of is that the Creative card is sharing an IRQ with something else that is blocking it frequently.  Dealing with IRQs is getting very deep into the O/S.
2015/03/03 11:55:50
Mesh
TimDale
 
> There is no solution other than purchasing a proper audio interface with proper ASIO drivers... 
Can you recommend any (that won't break the bank) ?
 
 


If the inputs/outputs match your needs, I can highly recommend the Focusrite_2i4. Excellent driver support from Focusrite and I got mine for under $150. Check with AudioDeluxe, JRR shop, Sweetwater etc...and see who can offer the best deal.
2015/03/03 12:48:47
slartabartfast
TimDale
Let's try a different angle :
Leaving Sonar out of the equation (it's not running), any external audio being routed to my sound card speakers/headphone experiences a latency that wasn't there until recently.
My PC also has on-board audio (Realtek on ASUS motherboard), if I use the line-in and line-out of that, I get no latency. However, if I route the on-board audio line-in to the main speakers (on the sound card), latency is back. 
Any audio from the PC itself (samples, media players, VSTs) experiences no such latency.
 
p.s. I had already ordered the Behringer audio interface because of another issue, that of noise on the line-in. However, if anything, the Behringer is worse. And still got the audio latency.

 
I expect you need to solve the problem that exists in your setup before you are going to get any audio interface to work. And before you are going to do that you need to be able to explain the problem to yourself and others. The description above of what is happening is completely ambiguous. Again I am not even able to understand what you mean by the term latency. You have left Sonar out but you have given no description of what is still in. What is the source of external audio? How is external audio getting into the system to be routed to the sound card? How is it being routed to the sound card? Generally if you take the hour or two that may be necessary to analyse and explain exactly what you are doing at each stage of the signal chain both outside the computer and in the software that handles the data in the box, the answer will become obvious to you, or the problem will be solvable by someone with more experience.
 
For all practical purposes it is impossible to introduce significant delay in an analog signal chain, the signal travels miles in a few milliseconds in copper and silicon. As a general rule a delay in a digital signal chain can only be due to the operation of a buffer somewhere in the system. If the signal is interrupted (because there is no buffer and processing cannot keep up with the data delivery), the symptom is not that normal sound is delivered later, but that the sound is distorted as samples are lost from the data stream--so called dropouts. The distorted sound will still usually be delivered without a noticeable delay. An undistorted delay is introduced when the data is stored in memory somewhere, and then released to the next process in the chain after a period of time. When you understand the external and internal path of the signal/data you can track down the problem.
2015/03/06 09:05:40
TimDale
Okay Slartabartfast, I'll have a go ......
I have a PC with a Creative X-Fi sound card. It has a switchable line-in/mic-in socket, and a line-out socket into which I have plugged my speakers (no surround stuff, just stereo). The PC also has built-in audio (Realtek, on an ASUS motherboard). This provides me with an alternative line-in and line-out (both normally disabled) and a front panel headphone socket, into which I have headphones plugged, configured not to cut off the speakers when plugged in.
Externally I have 3 hardware synths (1 keyboard, 2 rackmount), running through an analogue mixer, giving a stereo out which is plugged into the line-in socket of the soundcard.
This is how my system has been wired since I built this PC two years ago, and on my previous PC for 8 years before that. If I want to just play the keyboard, I listen through the PC speakers, or headphones if other people in the house are asleep. And this has all been fine.  For music composition, I was using Cakewalk Home Studio 9. On this I would control the 3 external synths, and possibly add audio tracks which were samples.  There was no latency (audio delay) in the system, and the midi and audio tracks always lined up fine.
However, this meant I didn't have the option of using VSTs, so I upgraded to Sonar X3. Initially Sonar would hang the PC every time I tried to create or load a project. I upgraded to version X3b and that solved that one.  I initially had some audio delays so followed on-line advice and reduced the size of the ASIO buffer (from within Sonar) from 50ms to 20ms and that solved that one. All was fine for a few weeks, I was able to compose tracks using both VSTs and the external synths, and the audio always lined up.
Then for no readily apparent reason, an audio delay appeared on the external audio. If I plugged headphones into my mixer and also had the PC playing through the speakers, a double hit was noticeable. I measured the delay at 0.25 seconds. Therefore, in Sonar, the only way to get the audio to sound right was to slide the midi events for the external synths 250ms to the left.  The fact that any audio generated in the PC was fine, but the external audio was delayed suggested the latency/delay was only on the line-in socket.  I tried reduced the ASIO buffer further to 10ms but that didn't change anything.  The Sonar properties screen is showing total audio latency of something like 22ms, which would be un-noticable.  I tried updating Sonar again (to version X3e) but all that did was break a couple of my VST plugins.
Right, now ignore Sonar for a moment, as the problem occurs whether Sonar is running or not. I believe the problem to be either in the PC's audio routing or the soundcard. I tested using the PC's onboard sound rather than the Creative sound card: the synths were fed into the on-board line-in socket, and the speakers plugged into the on-board line-out socket. No audio delay. If I used the on-board line, and routed that to the sound card, there was a delay. As a result of this test, I would switch to using the on-board sound, but since it doesn't have ASIO drivers, Sonar doesn't support it. (Yes I know I could switch Sonar to a non-ASIO mode but that doesn't seem to be recommended by people.)
You asked how I was "routing" the audio. From the windows control panel (I'm on Windows 7 btw), I select "Sound", a window appears called "Sound" with tabs labelled Playback, Recording, Sounds and Communication. On the playback tab, the creative speakers are selected as the default output. On the recording tab, the creative line-in is selected as default output, and on its properties page, "listen to this device" is ticked, and the output is selected as "default output device".  I normally had "What U Hear" as the default output device, but switched it to the speakers to rule that out as a cause. It's as simple as that.  That's what makes this incredibly frustrating, as there don't appear to be any fancy audio paths going on here.
As other responders have pointed out, the Creative X-Fi has switchable modes, including "game" mode (which I always have used) and "audio production" mode which has ASIO support and (apparently) low-latency. Switching mode doesn't seem to make any difference.
So that's it, with no Sonar running, and no-other audio software, and with the Windows 7 "sound" control panel routing line-in to line-out (i.e. speakers), there is a 250ms delay between the two, that wasn't there until last month. 250ms doesn't sound a lot, but it's really distracting when just playing music, and makes composition difficult and frustrating. All sound card audio processing (effects, eq, etc) is turned off, before anyone asks.  
Any detail I've missed?
 
© 2025 APG vNext Commercial Version 5.1

Use My Existing Forum Account

Use My Social Media Account