THOMAS JUND | 1 Sep 2005 13:35
Picon
Picon

Re : question : Full duplex latency -> no accurate precision ?

I change my question into another :

Is it possible to do only one callback, instead of two, for the full 
duplex (playing while recording), using the libsndfile ?
What would the callback look like ?

for the moment I'm using a callback like this one :
http://techweb.rfa.org/pipermail/portaudio/2004-December/004064.html
to play a sound with the libsndfile
but I don't know how I could merge a recording on it because, if I 
understood :
the playing use the "sf_readf_float" of libsndfile function, and I 
won't have the hand in my callback function during the time it's 
called.
Would anybody help me if possible ? I'm quite lost..

Thanks for paying attention,
Thomas

thomas.jund a écrit : 
> 
> Hello !
> 
> I've implemented full duplex (playing a sound on HP while 
recording 
> it with a microphone) with portaudio v18 on Windows, it works fine 
> except that I've a problem with the latency.
> I can't stop the record&play exactly when I want it to, what 
should 
> I do to have a millisecond precision for my record if possible ?
(Continue reading)

alexander lerch | 1 Sep 2005 17:21
Picon

v19 status

Hi,

since I didn't monitor the development for some time now, could someone
summarize the status of v19 for the following implementations?

win wdm
mac asio
mac coreaudio

Thanks for your help.

Cheers,
(a)

--

-- 
dipl. ing.
alexander lerch

zplane.development
http://www.zplane.de
holsteinische str. 39-42
D-12161 berlin
 fon: +49.30.854 09 15.0
 fax: +49.30.854 09 15.5
Jeff Larson | 1 Sep 2005 18:08
Picon

Re: Re : question : Full duplex latency -> no accurate precision ?

THOMAS JUND wrote:
> Is it possible to do only one callback, instead of two, for the full 
> duplex (playing while recording), using the libsndfile ?
> What would the callback look like ?

The PA callback supports full duplex.  You have both an "input" and an "output" array
and they have the same number of frames.  To get this you have to specify both
an input and output device in the Pa_OpenStream call.

The thing you need to understand about latency is that in each callback,
you are receiving a block of audio that was recorded a short distance in
the past (input latency) and you are buffering audio that will be played
a short distance into the future (output latency).  So if you simply
merge the input with the output, they will not be correctly aligned.

If you are using ASIO, the latency is so low that you may not notice
the error.  But with MME it is painfully obvious.

Output latency is determined by the number of host buffers allocated
by PA plus a small amount to account for the DAC on the sound card.
In the v19 version I use, which is a bit old, this is reported correctly
by PA, I think in the paTimeInfo structure but I don't have the code
in front of me right now.

Input latency is determined by the size of ONE host buffer allocated
by PA.  In the version of v19 I'm using, this was being incorrectly
reported as the size of ALL host buffers, I had to modify the code.
If you're using ASIO this doesn't matter since there will be only
one buffer, but with MME there can be several.

(Continue reading)

Bjorn Roche | 2 Sep 2005 00:25
Favicon
Gravatar

Re: Dirac pitch scaling -> PortAudio -> ASIO4ALL

On Mon, 29 Aug 2005, Stamatopoulos, Panagiotis (Peter) - STAPP001 wrote:

>
>
> Hi all,
>
> ok just wondering whether anyone has successfully implemented Stephen 
> Bernsee's Dirac in real time using portaudio and asio4all?  Im trying to 
> do this, using visual studio c++ 6.0, and not getting far (probably 
> because of my lack of knowledge in programming!) Could anyone lend us a 
> helping hand?

Have you tried something simpler, like using portaudio to generate a sine 
wave or play a sound file? There are tons of examples to help with this, 
and it really is a good place to work from.

I would start there and then try to insert complex processing of the type 
in Dirac.

 	bjorn

-------------
Bjorn Roche
Check out my CD Mastering Software
for Mac OS X : http://www.xowave.com
Picon
Picon

RE: Dirac pitch scaling -> PortAudio -> ASIO4ALL

Hi Bjorn,

Yea i have already done all the basic stuff, ive nearly got it working! Im so close i can smell it!  Basically i think i might have make dirac point to the void *inputBuffer so that whenever Dirac wants data it knows where to go.  Thanks for your comments though Bjorn.

Regards,

Peter


-----Original Message-----
From: Bjorn Roche [mailto:bjorn <at> xowave.com]
Sent: Fri 9/2/2005 7:55 AM
To: Stamatopoulos, Panagiotis (Peter) - STAPP001
Cc: portaudio <at> techweb.rfa.org
Subject: Re: [Portaudio] Dirac pitch scaling -> PortAudio -> ASIO4ALL

On Mon, 29 Aug 2005, Stamatopoulos, Panagiotis (Peter) - STAPP001 wrote:

>
>
> Hi all,
>
> ok just wondering whether anyone has successfully implemented Stephen
> Bernsee's Dirac in real time using portaudio and asio4all?  Im trying to
> do this, using visual studio c++ 6.0, and not getting far (probably
> because of my lack of knowledge in programming!) Could anyone lend us a
> helping hand?

Have you tried something simpler, like using portaudio to generate a sine
wave or play a sound file? There are tons of examples to help with this,
and it really is a good place to work from.

I would start there and then try to insert complex processing of the type
in Dirac.

        bjorn

-------------
Bjorn Roche
Check out my CD Mastering Software
for Mac OS X : http://www.xowave.com


David Stuart | 3 Sep 2005 03:16

wdm-ks?

Hi Guys,

Just wondering if there's been any recent progress on the wdm-ks 
host-api? It seems to have stalled out for the last little while 
(probably because the main contributor is busy)?

David
Robert McGwier | 3 Sep 2005 03:55
Picon

Re: wdm-ks?

Man do I wish I had time to work on this but I am just about six 
projects too deep.  I really desperately need wdm-ks in portaudio since 
we are using portaudio to talk to all windows hosts.  What is the status 
of the (broken) code?  What will it take to complete it?

Bob

David Stuart wrote:

> Hi Guys,
>
> Just wondering if there's been any recent progress on the wdm-ks 
> host-api? It seems to have stalled out for the last little while 
> (probably because the main contributor is busy)?
>
> David
> _______________________________________________
> Portaudio mailing list
> Portaudio <at> techweb.rfa.org
> http://techweb.rfa.org/mailman/listinfo/portaudio
>
>
Federico Rossi | 5 Sep 2005 13:18
Picon
Picon

Multiple PortAudioStream?

Hi all,
is it possible to create multiple PortAudioStream,
for example in order to realize a multi-conference application?
i'd like to use a stream to record my voice and, at the same time,
to play from different streams...
if so, where can i find an example?
thank you so much.
 
Federico 
R.B. | 5 Sep 2005 16:38
Picon

Opening multiple Output Streams

Hello folks,

I'm trying to playback multiple streams of PCM data coming in from a
network loop.
Its somekind of a VOIP, but with multiple persons.

This is how it works:

packet is a voice packet -> decode voice packet -> push the decoded
data onto a PCM queue.

my Portaudio callback loop will check the queue, if it has a buffer it
will memcpy it to the outputBuffer, then pop it off the Queue, else it
will memcpy silence.

This works perfectly for 1 person speaking, but if multiple persons
are speaking it sounds really bad or just doesnt sound right.

I tried many things, these include:
 - multithread the decoding loop.
 - mix the samples together
 - multithreading, and mixing
 - each person with its own pcm queue, and mixes it together in the
callback loop

None of them really worked and im getting pretty frustated here ;)
I know this is a common question on the mailing list, but I havent
found a real good awnser besides mixing the samples and (not
recommended tho) opening multiple output streams.

My blocksize is 3200 bytes (PaInt16), so maybe mixing doesnt work that
well with that size.

Then I tried opening multiple output streams, for each player that is
connected I want to open a portaudio stream.
But this fails on OS X, when I open a second stream I get:

An error occured while using the portaudio stream
Error number: -1
Error message: Illegal error number.

When I for example start a instance of pa_saw and pa_longsine, I hear
sound coming from both applications. So it should work in one program
as well then right?
Picon
Picon

Is it possible to have variable buffering sizes?


Hey all,

Im writing a program as ive mentioned before on this mailing list, that real time pitch scales the microphone input.  My problem is now ive got

microphone-->soundcard-->asio4all-->portaudio-->Dirac(pitch scaling library)-->portaudio-->asio4all-->soundcard-->speakers

From my understanding, there is approximtely 12 buffers (minimum!!) for mono data.

The output sounds as if there are this many buffers and my processor (1 Ghz) 512mb RAM cannot cope...

Has anyone got any suggestions, or has anyone done anything similar?  Also the Dirac library grabs variable amounts of data, as it seems, if any one is interested in me sending them code to have a look at im quite willing to share,

Cheers,

Peter


Gmane