Tony Miller | 17 Jun 2013 20:08
Picon
Gravatar

wasapi loopback devices detection?

I applied the patch I found in this message:
http://music.columbia.edu/pipermail/portaudio/2013-January/014834.html

I tried running the example pa_devs.c to see my loopback devices but I
didn't see any listed. Should the pa_devs example list them or do I
need to change the code?

I am pretty certain I have some loopback devices on this machine, I've
seen them listed in other audio software.

Thanks.

--

-- 
-Tony Miller
github.com/mcfiredrill
 <at> freedrull
freedrool.us
De Sena, Enzo | 8 Jun 2013 23:50
Picon
Favicon

Problem with Pa_WriteStream with MOTU 896HD

Dear all,

I am having problems running portaudio with my MOTU sound card.
I use the blocking call Pa_WriteStream with the code attached below. 
The code runs properly (i.e. output all 0) with all audio interfaces except for my MOTU 896HD, 
in which case it hangs at Pa_WriteStream without ever outputting "run".

I compile it with the latest Xcode (4.6.2), latest MOTU drivers, latest stable portaudio.
The cpp project in Xcode is left with all standard options.
The sound card (set at 44.1KHz with internal clock) is connected via firewire 
to my Mac Pro running OSX 10.8.4.

I tried to run Matlab's playrec (which is based on portaudio) and, interestingly, 
it works well with the MOTU sound card too.

Any suggestion/help is greatly appreciated! Thanks!
And many apologies in advance in case this is too much of a newbie question..

Best,

Enzo

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

#include "portaudio.h"
#include <iostream>

void PaErrorHandler(PaError, PaStream*);

(Continue reading)

Stefan Hajnoczi | 8 Jun 2013 09:43
Picon
Gravatar

[PATCH] coreaudio: suppress deprecated API warnings

Deprecated APIs are use intentionally to preserve compatibility with older Mac
OS X releases.  Since -Werror is used this would normally result in a
compilation failure.  Tell gcc to ignore deprecated APIs for coreaudio hostapi
files that make use of them.

See also ticket #218.

Signed-off-by: Stefan Hajnoczi <stefanha <at> gmail.com>
---
 src/hostapi/coreaudio/pa_mac_core.c           | 2 ++
 src/hostapi/coreaudio/pa_mac_core_utilities.c | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/src/hostapi/coreaudio/pa_mac_core.c b/src/hostapi/coreaudio/pa_mac_core.c
index 1cef082..847721e 100644
--- a/src/hostapi/coreaudio/pa_mac_core.c
+++ b/src/hostapi/coreaudio/pa_mac_core.c
 <at>  <at>  -71,6 +71,8  <at>  <at> 
 #include "pa_mac_core_utilities.h"
 #include "pa_mac_core_blocking.h"

+/* Use deprecated APIs for compatibility with older OS X versions */
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"

 #ifdef __cplusplus
 extern "C"
diff --git a/src/hostapi/coreaudio/pa_mac_core_utilities.c b/src/hostapi/coreaudio/pa_mac_core_utilities.c
index 63e616f..4929b6d 100644
--- a/src/hostapi/coreaudio/pa_mac_core_utilities.c
+++ b/src/hostapi/coreaudio/pa_mac_core_utilities.c
(Continue reading)

Tyler Martin | 7 Jun 2013 20:08
Picon

Opening and closing streams frequently

Hey there,

I'm using portaudio in an app that needs to play both stereo and mono signals.  Their playback doesn't overlap, however.  To play the signals should I open a stream in mono and close it, and then open a stream in stereo and close it, etc?  Or is it more correct to convert the mono into a stereo signal so that it can be output on a stereo stream and I can avoid frequently opening and closing a stream?

Thanks,
Tyler
_______________________________________________
Portaudio mailing list
Portaudio <at> music.columbia.edu
http://music.columbia.edu/mailman/listinfo/portaudio
Alexander Carôt | 7 Jun 2013 11:01
Picon

Re: A bunch of stuff (was: Linux Latency problem)

>Even with the existing code-base, as long as the latency requested is
>*less*
>than the duration of the buffer size you specify (at the sample rate)
>then 
>the Alsa buffers will be configured with 2 periods of the specified
>buffer 
>size.  So requesting 0.0026ms latency with 128 frame buffers-size will do
>it.  
>Alternatively, just always set eg 0.0001ms and the buffer-size will
>become 
>the limiting factor.  It is just that current code will fail if '0' is
>used.

I just tried this and figured that a configuration with 0 fails and 0.001
opens the device. However, in my case (inbuilt Intel card) this only works
with a buffer size of 256. With 128 the callback starts and is called for
max. 5 times and then the execution ends without error messages. Sometimes
it doesn't execute a single time. From other apps and wrappers I know that
the card works allright with a buffer size of 64.

Please let me know if you need further info.

Best

Alex
Wouter Janmaat | 2 Jun 2013 22:14
Picon
Gravatar

Callback Full Duplex

Hi all,

I have a question on the callback in a situation when the device handles both input and output. Does
portaudio differentiate between when the device has recorded new input and when the device needs new
output? And if so, how can I make the callback do the right thing? It seems that when device has new input, the
callback would also refill the outputbuffer. Would this cause any problems?

Best

Wouter
Wouter Janmaat | 31 May 2013 18:56
Picon
Gravatar

Random beep tone when opening stream

Hi all,

I use portaudio when opening my application. It opens up a stream for every audiodevice it finds which has
either input or output channels. Sometimes when starting the application the program sends a loud
beeping tone to the output of the soundcard. My callbuck function is empty and I use the settings from the
tutorial to open the streams.

Any ideas?
Nitin Rajput | 30 May 2013 14:25

For Port audio player

Dear Sir/Madam,

i am working on sound editing in asp.net using c#. i have completed c++ function successfully calling  in my c#  application.

please help me how to use port audio player api for playing wave file and edit them programmatically.

--
Best Regards
Nitin Kumar
Atlanta Systems Pvt.Ltd.

_______________________________________________
Portaudio mailing list
Portaudio <at> music.columbia.edu
http://music.columbia.edu/mailman/listinfo/portaudio
Alan Horstmann | 29 May 2013 19:02
Picon

Paqa_latency print typos & QA check

Phil,

While reading output from paqa_latency I noticed the printouts say 'Output'
when reporting for input (there is also one rogue tab).

Also there seemed no reason not to enable the QA_ASSERT check of default high
latency to be greater than the low (now // out), except that it should allow
them to be equal.  However, there may be a good reason!

The diff looks like this:-

--- ../svn-working-copy/qa/paqa_latency.c	2013-04-27 15:29:30.000000000 +0100
+++ qa/paqa_latency.c	2013-05-29 17:55:36.000000000 +0100
 <at>  <at>  -255,7 +255,7  <at>  <at> 
     {
         numLoops = 1;
     }
-	
+
     for( i=0; i<numLoops; i++ )
     {   
         if( numLoops == 1 )
 <at>  <at>  -361,15 +361,15  <at>  <at> 
             printf("  Output defaultHighOutputLatency = %f seconds\n", pdi->defaultHighOutputLatency);
             QA_ASSERT_TRUE( "defaultLowOutputLatency should be > 0", (pdi->defaultLowOutputLatency > 0.0) );
             QA_ASSERT_TRUE( "defaultHighOutputLatency should be > 0", (pdi->defaultHighOutputLatency > 0.0) );
-            //QA_ASSERT_TRUE( "defaultHighOutputLatency should be > Low", (pdi->defaultHighOutputLatency >
pdi->defaultLowOutputLatency) );
+            QA_ASSERT_TRUE( "defaultHighOutputLatency should be >= Low", (pdi->defaultHighOutputLatency >=
pdi->defaultLowOutputLatency) );
         }
         if( pdi->maxInputChannels > 0 )
         {
-            printf("  Input defaultLowOutputLatency  = %f seconds\n", pdi->defaultLowInputLatency);
-            printf("  Input defaultHighOutputLatency = %f seconds\n", pdi->defaultHighInputLatency);
-            QA_ASSERT_TRUE( "defaultLowOutputLatency should be > 0", (pdi->defaultLowInputLatency > 0.0) );
-            QA_ASSERT_TRUE( "defaultHighOutputLatency should be > 0", (pdi->defaultHighInputLatency > 0.0) );
-            //QA_ASSERT_TRUE( "defaultHighOutputLatency should be > Low", (pdi->defaultHighInputLatency >
pdi->defaultLowInputLatency) );
+            printf("  Input defaultLowInputLatency  = %f seconds\n", pdi->defaultLowInputLatency);
+            printf("  Input defaultHighInputLatency = %f seconds\n", pdi->defaultHighInputLatency);
+            QA_ASSERT_TRUE( "defaultLowInputLatency should be > 0", (pdi->defaultLowInputLatency > 0.0) );
+            QA_ASSERT_TRUE( "defaultHighInputLatency should be > 0", (pdi->defaultHighInputLatency > 0.0) );
+            QA_ASSERT_TRUE( "defaultHighInputLatency should be >= Low", (pdi->defaultHighInputLatency >=
pdi->defaultLowInputLatency) );
         }
     }
     return 0;

I can commit this change if you wish?

Regards

Alan
_______________________________________________
Portaudio mailing list
Portaudio <at> music.columbia.edu
http://music.columbia.edu/mailman/listinfo/portaudio
Joshua Kordani | 29 May 2013 00:54

Functionality similar to LineIn passthrough?

Greetings all.

I need to develop a replacement for the LineIn application for osx.  It allows you to pipe line in into system output.  I'm wondering if portaudio is the place for me to make an application that does this, or not, as I am not entirely certain if this is the domain portaudio handles.  Thanks for any pointers.

Joshua Kordani
LSA Autonomy
_______________________________________________
Portaudio mailing list
Portaudio <at> music.columbia.edu
http://music.columbia.edu/mailman/listinfo/portaudio
Alan Horstmann | 28 May 2013 23:17
Picon

Buffering Latency and Timing

Ross,

The questions from Alexander have prompted me to pick-up some investigations I 
was doing some time ago on the Alsa and OSS latency values suggested and 
reported etc, and using paqa_latency.

I've been re-reading 'BufferingLatencyAndTimingImplementationGuidelines' and 
wanted to check my understanding.

The Alsa implementation is similar to a 'N-buffer ringbuffer' scheme; 2 common 
configurations arise, either with 4 buffers (=Alsa periods) in the 
ringbuffer, or with just 2.

By my reading the reported output latency should be the time of:
 (whole ringbuffer - one buffer(=period))  since the user should start filling 
when there is one buffer(=period) of space in the ringbuffer.

At present the Alsa code reports and uses the time delay of the whole 
ringbuffer, which seems to be a mistake?  With N=4 the latency I would expect 
to be 3/4 of the ringbuffer, and that is the figure OSS reports on a 
configured stream.  With N=2 then the latency is just one buffer(=period) 
long, or have I mis-understood?

Regards

Alan

Gmane