Page 1 of 1

Play - Pause delay

Posted: 22 May 2014 21:48
by hdradio
Always when I start PF and click PLAY, there is a delay of a half a sec to start playback.
I 've tried wasapi (tried exclusive too) and asio with buffer size between 256 to 1024ms (tried also 0ms).
When I first change that buffer setting, play and pause are instant.
But after a while (a few songs) there is that delay pausing and playing again.
I mean that if I click pause, the display (waveform) pauses immediately but the audio after a half a sec.
The same applies to PLAY. Cursor at waveform start immediately but audio after half a sec.
And there is no synchronization between play and visual graph. (visual comes first).
I 've tried on three pc with different audio cards (M-Audio Delta 44, M-Audio Audiophile 192, ESI Juli@). Same problem.
Is there a way to solve this ?

Re: Play - Pause delay

Posted: 26 May 2014 20:53
by hdradio
Here are my settings:
http://snag.gy/WzL7N.jpg
When I call 'Reset Full-Duplex' on my PLAY channel, audio playback gets back again in sync with visual and there is no delay in pause - play.
But after some time that delay starts increasing again.

Re: Play - Pause delay

Posted: 26 May 2014 20:53
by radio42
I can actually not reproduce the issue here.

Are you sure you are using ASIO (with all your mixer channels)?
Note, that the ASIO buffer is given in samples and not in ms?!

I guess when you say you used 0 as an ASIO buffer - you mean the buffer setting in the PF mixer channel config dialog?!
Note, that a value of 0 here means: use the default ASIO buffer size as defined in the ASIO control panel of your soundcard.

Have you maybe added an other/new mixer channel and probably now use and mix two soundcards and/or driver models?
If yes, please see here: viewtopic.php?f=9&t=827&hilit=delay

Else, what happens if you:
a) remove your 'No-Sound' summy mixer channel?
b) Call 'Reset Full-Duplex' on your PLAY channel?

Re: Play - Pause delay

Posted: 27 May 2014 10:09
by hdradio
You are using different soundcards (with even different driver models):
Which might all be pulling from the same audio signal (your PLAY channel).
The Realtek is only used for PFL. Have no connection with same audio signal.

Also STRM is a virtual channel that is only used for streaming. I use it because I need to apply a DSP only to the output stream. Why do I have to use M-Audio 3-4 for this purpose ? (I 'll need that 3-4 output for future use).

So I don't see any conflict between M-Audio and Realtek.

Re: Play - Pause delay

Posted: 27 May 2014 13:46
by hdradio
When the system is finally on air, I 'll use the Line In of Realtek for the STRM (streaming) channel so I suppose I won't have any problem.
Thank you Bernd for the info.

Re: Play - Pause delay

Posted: 27 May 2014 19:33
by radio42
I see, and that explains a few things:

You are using different soundcards (with even different driver models):
Which might all be pulling from the same audio signal (your PLAY channel).

Each sound card (incl. the virtual STRM) might run on a slightly different same rate, as they all use their own 'clock' for 'their' sample rate!
The M-Audio card has its own sample rate clock on board, as well as the Realtek has its own.
Note, that even the STRM would use a different 'clock' as it uses the PC's internal clock.
Meaning there is a good chance, that they drift apart over time.

Plus you are using WASAPI on the Realtek and ASIO on the M-Audio.

The rule of thumb is:
Whenever possible use the same sound card (or a world clock to sync them) and do not mix the driver models between physical cards.

As a first solution I would at least place the OUT and STRM mixer channel on the same sound card and 'clock'!
E.g. use the two stereo outputs of the M-Audio card and use ASIO for it (OUT=M-Audio1/2; STRM=M-Audio3/4).
You might then also try to use the ASIO4ALL for your Realtek card.

Re: Play - Pause delay

Posted: 27 May 2014 20:48
by radio42
Yes, it might be, that the Realtek and the M-Audio are never using the same audio signal.
This unless you use the SND option on the PLAY mixer channel (to route that signal also to PFL, e.g. at No PFL)?!
But I couldn't see that from your picture.

However, that was also the reason, why I suggested to at least place OUT and STRM onto the same card.
I thought I tried to explain it:
Each sound card (incl. the virtual STRM) might run on a slightly different same rate, as they all use their own 'clock' for 'their' sample rate!
The M-Audio card has its own sample rate clock on board...
Note, that even the STRM would use a different 'clock' as it uses the PC's internal clock.

Also note, that in the digital audio world it is the exact opposite as in the analog world.
In the analog world the source is kind of 'pushing' its audio signal through the system (cables).
But in the digital world each audio device pulls the signal, as it requests a certain amount of sample data, based on its 'clock'.
If now different devices ask for different amounts of sample data, a buffer needs to handle this at the source level.
And this buffer might increase or decrease over time, depending on the accuracy of the 'clocks'.
As said:
M-Audio uses its on board chip as a clock (as Realtek would).
And a virtual (non routed) mixer must use the PCs internal clock.

The issue with play/pause is now, that when 2 outputs are pulling from the same source (buffer) it can only effectively pause once all outputs are paused (and this is what you basically see visually).
In essence, you see, that they are not perfectly in sync - which is good and intended!

So to perfectly synchronize two soundcards - the same 'clock' must be used.
One of the reasons, why in professional environments all used sound cards are 'feed' by the same (single) world clock signal.
As you do not have one / can not use a world clock, there are basically two options:

1) You do not care about synchronization and live with the downside of it (current situation).
I assume you wouldn't want this!

2) As suggested, you must use the same soundcard for OUT and STRM.
As this will also ensure, that they stay in sync.

Note, that when you want to use ASIO you must use different sound card channels, as ASIO enforces you to do so!
I.e. OUT=M-Audio1/2; STRM=M-Audio3/4.

But if you can not or do not want to use the M-Audio3/4 channels...
Then you MUST use the WDM or WASAPI driver model (shared mode) and use the same output for both:
I.e. OUT=M-Audio1/2; STRM=M-Audio1/2.
Note, that you then should MUTE your STRM mixer channel (press the 'M' button of your STRM mixer channel) to avoid hearing the same signal twice.
In this setup both mixer channels use the same M-Audio 'clock' in shared mode.
The only downside is, that you can not get the same low latency as you would get with ASIO.