[Portaudio] What's the secret with Wasapi exclusive?

Bernt Ronningsbakk bernt.ronningsbakk at lyse.net
Tue Dec 8 02:23:17 EST 2015


Windows 10.

I recognize the behavior from earlier - when I was running W7 though.

Kind regards,

Bernt

From: Chris <c319chris at aol.com>
To: portaudio at lists.columbia.edu, portaudio at music.columbia.edu
Subject: Re: [Portaudio] What's the secret with Wasapi exclusive?
Message-ID: <8D2FF3C0FCDD720-60C-2594CF at webmail-vm015.sysops.aol.com>
Content-Type: text/plain; charset="us-ascii"; format=flowed

Which Windows version?

-----Original Message-----
From: Bernt Ronningsbakk <bernt at juicehifi.com>
To: portaudio <portaudio at music.columbia.edu>
Sent: Mon, Dec 7, 2015 5:10 am
Subject: [Portaudio] What's the secret with Wasapi exclusive?

I am trying to implement wasapi with duplex and exclusive mode. So far my
external dac (Lynx Hilo) is refused, and the embedded sound card produces a
lot of noise on top. If I increase the latency to insane levels, the noise
is dramatically reduced, but it never disappears.

The very same settings, except the exclusive flag, seems to work flawless.


Best Regards

Bernt




_______________________________________________
Portaudio mailing list
Portaudio at lists.columbia.edu
https://lists.columbia.edu/mailman/listinfo/portaudio






------------------------------

Message: 2
Date: Mon, 7 Dec 2015 14:24:44 -0500
From: Chris <c319chris at aol.com>
To: portaudio at lists.columbia.edu, portaudio at music.columbia.edu
Subject: Re: [Portaudio] What's the secret with Wasapi exclusive?
Message-ID: <8D2FF3C0FCDD720-60C-2594CF at webmail-vm015.sysops.aol.com>
Content-Type: text/plain; charset="us-ascii"; format=flowed

Which Windows version?

-----Original Message-----
From: Bernt Ronningsbakk <bernt at juicehifi.com>
To: portaudio <portaudio at music.columbia.edu>
Sent: Mon, Dec 7, 2015 5:10 am
Subject: [Portaudio] What's the secret with Wasapi exclusive?

I am trying to implement wasapi with duplex and exclusive mode. So far 
my
external dac (Lynx Hilo) is refused, and the embedded sound card 
produces a
lot of noise on top. If I increase the latency to insane levels, the 
noise
is dramatically reduced, but it never disappears.

The very same settings, except the exclusive flag, seems to work 
flawless.


Best Regards

Bernt




_______________________________________________
Portaudio mailing list
Portaudio at lists.columbia.edu
https://lists.columbia.edu/mailman/listinfo/portaudio






------------------------------

Message: 3
Date: Mon, 7 Dec 2015 22:57:12 +0100
From: Alberto di Bene <dibene at usa.net>
To: portaudio at lists.columbia.edu
Subject: [Portaudio] Portaudio and XE6
Message-ID: <566600B8.8080609 at usa.net>
Content-Type: text/plain; charset="windows-1252"; Format="flowed"

Has anybody succeeded in compiling Portaudio with the RAD Studio XE6 C++
compiler
of Embarcadero under Windows XP ?

Modifying a few files I have able to do that when I define in portaudio.h
this :

#define PA_USE_ASIO 1

but adding also the define for Wasapi..

#define PA_USE_WASAPI 1

I receive a lot of errors, which all seem to be related to the use of a
wrong version
of the file  objidl.h, of which I found at least a dozen of different
version, all with
different file sizes....

https://dl.dropboxusercontent.com/u/15089947/objidl.h.gif

Any help is greatly appreciated...  thanks

73  Alberto  I2PHD





-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<https://lists.columbia.edu/pipermail/portaudio/attachments/20151207/bdc2f5a
8/attachment-0001.html>

------------------------------

Message: 4
Date: Mon, 7 Dec 2015 23:48:41 +0100
From: Erik Ronstr?m <erik.ronstrom at doremir.com>
To: portaudio at lists.columbia.edu
Subject: [Portaudio] Reported latency
Message-ID: <54CB39D5-5A67-4EE5-B60F-7A09EB04BE97 at doremir.com>
Content-Type: text/plain; charset=utf-8

Hi List,

(Apologies if this has been asked before, but I haven?t yet found an answer
by searching the web)

I want to synchronize recorded audio with the track that was played back
during recording. As far as I understand, this means offsetting the recorded
audio by (inputLatency + outputLatency). The problem is that I cannot make
sense of the latency values that PortAudio reports.

There seems to be four latency values of interest here: the suggested
latency (set by PaStreamParameters), the ?actual? latency (as reported by
PaStreamInfo), the difference between inputBufferAdcTime and
outputBufferDacTime in PaStreamCallback, and finally, the ?real-world?
actual latency.

To get the ?real-world? latency I recorded the backtrack playing from the
computer speaker directly into the internal microphone, and looked at the
audio file. I did this several times, and there is no measurable difference
between the offsets of the different recordings.


These are the values of one test (input/output, rounded to ms):
Suggested Latency: 0.010 / 0.010
?Actual? Latency (PaStreamInfo): 0.059 / 0.020
Diff ADC/DAC: 0.035
?Real-world?: 0.044

And another:
Suggested Latency: 0.040 / 0.040
?Actual? Latency (PaStreamInfo): 0.233 / 0.061
Diff ADC/DAC: 0.110
?Real-world?: 0.157

I?m certainly not an expert on these matters, but to me the values reported
by PaStreamInfo looks weird ? the input latency cannot possibly be 59 ms
when the recorded ?echo? starts 44 ms into the file?! Furthermore, I would
have expected some sort of match between the PaStreamInfo latency values and
the ADC/DAC diff. Here, I can see no obvious relation between them.

The ADC/DAC diff seems to be closest to the real-world values, and in the
first example, I could have just accepted the 9 ms diff for the unknown
latency which lays outside of the knowledge of PortAudio. But in that case,
it wouldn?t have increased so much in the second example, I would rather
have expected a constant addition.

How is this supposed to be done? Is it even possible to have the system
roundtrip latency automatically calculated? (But even if the answer is no,
the values reported by PaStreamInfo still don?t make any sense IMO!)

Best regards
Erik

PS. I?m on CoreAudio, Mac OS X 10.10




------------------------------

Message: 5
Date: Mon, 7 Dec 2015 17:57:31 -0500
From: ericzhang at gmail.com
To: portaudio at lists.columbia.edu
Subject: Re: [Portaudio] Reported latency
Message-ID: <etPan.56660edb.7b0c695d.9d8f at Zhang-Zhiguang>
Content-Type: text/plain; charset="utf-8"

If you have the audio, you can perform a simple cross-correlation analysis
and find the sample delay basically exactly.

--?

Sent with Airmail

On December 7, 2015 at 5:48:59 PM, Erik Ronstr?m (erik.ronstrom at doremir.com)
wrote:

Hi List,

(Apologies if this has been asked before, but I haven?t yet found an answer
by searching the web)

I want to synchronize recorded audio with the track that was played back
during recording. As far as I understand, this means offsetting the recorded
audio by (inputLatency + outputLatency). The problem is that I cannot make
sense of the latency values that PortAudio reports.

There seems to be four latency values of interest here: the suggested
latency (set by PaStreamParameters), the ?actual? latency (as reported by
PaStreamInfo), the difference between inputBufferAdcTime and
outputBufferDacTime in PaStreamCallback, and finally, the ?real-world?
actual latency.

To get the ?real-world? latency I recorded the backtrack playing from the
computer speaker directly into the internal microphone, and looked at the
audio file. I did this several times, and there is no measurable difference
between the offsets of the different recordings.


These are the values of one test (input/output, rounded to ms):
Suggested Latency: 0.010 / 0.010
?Actual? Latency (PaStreamInfo): 0.059 / 0.020
Diff ADC/DAC: 0.035
?Real-world?: 0.044

And another:
Suggested Latency: 0.040 / 0.040
?Actual? Latency (PaStreamInfo): 0.233 / 0.061
Diff ADC/DAC: 0.110
?Real-world?: 0.157

I?m certainly not an expert on these matters, but to me the values reported
by PaStreamInfo looks weird ? the input latency cannot possibly be 59 ms
when the recorded ?echo? starts 44 ms into the file?! Furthermore, I would
have expected some sort of match between the PaStreamInfo latency values and
the ADC/DAC diff. Here, I can see no obvious relation between them.

The ADC/DAC diff seems to be closest to the real-world values, and in the
first example, I could have just accepted the 9 ms diff for the unknown
latency which lays outside of the knowledge of PortAudio. But in that case,
it wouldn?t have increased so much in the second example, I would rather
have expected a constant addition.

How is this supposed to be done? Is it even possible to have the system
roundtrip latency automatically calculated? (But even if the answer is no,
the values reported by PaStreamInfo still don?t make any sense IMO!)

Best regards
Erik

PS. I?m on CoreAudio, Mac OS X 10.10


_______________________________________________
Portaudio mailing list
Portaudio at lists.columbia.edu
https://lists.columbia.edu/mailman/listinfo/portaudio
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<https://lists.columbia.edu/pipermail/portaudio/attachments/20151207/08cf1f4
8/attachment-0001.html>

------------------------------

Message: 6
Date: Tue, 8 Dec 2015 00:19:17 +0100
From: Erik Ronstr?m <erik.ronstrom at doremir.com>
To: portaudio at lists.columbia.edu
Subject: Re: [Portaudio] Reported latency
Message-ID: <25866F7E-F8B1-47F5-9F98-D7C650C509C5 at doremir.com>
Content-Type: text/plain; charset="utf-8"

Yeah, but I don?t want to have my users perform a latency test before they
can start using the application?

Erik




> 7 dec 2015 kl. 23:57 skrev ericzhang at gmail.com:
> 
> If you have the audio, you can perform a simple cross-correlation analysis
and find the sample delay basically exactly.
> 
> -- 
> 
> Sent with Airmail
> 
> On December 7, 2015 at 5:48:59 PM, Erik Ronstr?m
(erik.ronstrom at doremir.com <mailto:erik.ronstrom at doremir.com>) wrote:
> 
>> Hi List,
>> 
>> (Apologies if this has been asked before, but I haven?t yet found an
answer by searching the web)
>> 
>> I want to synchronize recorded audio with the track that was played back
during recording. As far as I understand, this means offsetting the recorded
audio by (inputLatency + outputLatency). The problem is that I cannot make
sense of the latency values that PortAudio reports.
>> 
>> There seems to be four latency values of interest here: the suggested
latency (set by PaStreamParameters), the ?actual? latency (as reported by
PaStreamInfo), the difference between inputBufferAdcTime and
outputBufferDacTime in PaStreamCallback, and finally, the ?real-world?
actual latency.
>> 
>> To get the ?real-world? latency I recorded the backtrack playing from the
computer speaker directly into the internal microphone, and looked at the
audio file. I did this several times, and there is no measurable difference
between the offsets of the different recordings.
>> 
>> 
>> These are the values of one test (input/output, rounded to ms):
>> Suggested Latency: 0.010 / 0.010
>> ?Actual? Latency (PaStreamInfo): 0.059 / 0.020
>> Diff ADC/DAC: 0.035
>> ?Real-world?: 0.044
>> 
>> And another:
>> Suggested Latency: 0.040 / 0.040
>> ?Actual? Latency (PaStreamInfo): 0.233 / 0.061
>> Diff ADC/DAC: 0.110
>> ?Real-world?: 0.157
>> 
>> I?m certainly not an expert on these matters, but to me the values
reported by PaStreamInfo looks weird ? the input latency cannot possibly be
59 ms when the recorded ?echo? starts 44 ms into the file?! Furthermore, I
would have expected some sort of match between the PaStreamInfo latency
values and the ADC/DAC diff. Here, I can see no obvious relation between
them.
>> 
>> The ADC/DAC diff seems to be closest to the real-world values, and in the
first example, I could have just accepted the 9 ms diff for the unknown
latency which lays outside of the knowledge of PortAudio. But in that case,
it wouldn?t have increased so much in the second example, I would rather
have expected a constant addition.
>> 
>> How is this supposed to be done? Is it even possible to have the system
roundtrip latency automatically calculated? (But even if the answer is no,
the values reported by PaStreamInfo still don?t make any sense IMO!)
>> 
>> Best regards
>> Erik
>> 
>> PS. I?m on CoreAudio, Mac OS X 10.10
>> 
>> 
>> _______________________________________________
>> Portaudio mailing list
>> Portaudio at lists.columbia.edu <mailto:Portaudio at lists.columbia.edu>
>> https://lists.columbia.edu/mailman/listinfo/portaudio
<https://lists.columbia.edu/mailman/listinfo/portaudio>_____________________
__________________________
> Portaudio mailing list
> Portaudio at lists.columbia.edu <mailto:Portaudio at lists.columbia.edu>
> https://lists.columbia.edu/mailman/listinfo/portaudio
<https://lists.columbia.edu/mailman/listinfo/portaudio>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<https://lists.columbia.edu/pipermail/portaudio/attachments/20151208/06ab169
b/attachment.html>

------------------------------

_______________________________________________
Portaudio mailing list
Portaudio at lists.columbia.edu
https://lists.columbia.edu/mailman/listinfo/portaudio

End of Portaudio Digest, Vol 6, Issue 7
***************************************



More information about the Portaudio mailing list