Picon

Pa_GetStreamHostApiType

Good day,

I'm trying to package Audacity for GNU Guix.

It seems that Audacity rejects a system-provided PortAudio v19 during
./configure because it can't find the function Pa_GetStreamHostApiType,
whereas the PortAudio v19 which Audacity ships in its own tarball has
that function.

I searched around and couldn't find much information on this other than
other people having hit the same issue.  What's the story behind the
function?  Why is it in Audacity's PortAudio v19 but not the latest
PortAudio v19 release?

Thanks in advance,
Taylan
Phil Burk | 1 Mar 03:03 2015

adding major.minor.subminor version support

I would like to try again to add version tracking to PortAudio.

We have had lengthy discussions on this in the past:


I posted an old diff in a branch. But unfortunately we are not able to do merge requests in Assembla because of the way our repo is organized.


So I incorporated the code and comments from that page regarding the version naming and made a patch. See attached.

I would like some feedback on what the next version number needs to be. I put 20.0.0 in this CL. 
We have release 4 V19 snapshots so we should not go below 19.5.0.


Phil Burk
Attachment (version20.patch): application/octet-stream, 4113 bytes
_______________________________________________
Portaudio mailing list
Portaudio <at> music.columbia.edu
http://music.columbia.edu/mailman/listinfo/portaudio
Brian Whitman | 28 Feb 18:11 2015

non-power-of-2 number of channels on multi-channel audio interface

Hi, on OS X 10.10.2, Portaudio SVN trunk from an hour ago (but also V19-devel) I can't seem to make a stream write to an non-power-of-2 number of channels in Portaudio to a MOTU 828x, it just hangs at the Pa_WriteStream. Here's an example, hacked version of paex_write_sine that sets the deviceID of the MOTU manually and writes a sine tone to each channel.


If I set CHANNELS to 16 or 8 or 4 or 2 everything works fine. Any other number hangs.

Use case here is I need to write to the ADAT channels, which start at channel 15, so I only have access to one of them in PortAudio by setting CHANNELS to 16. I can't set CHANNELS to 32 because the device only reports 30 outputs would fail on init.

The device works fine otherwise, all channels individually accessible through other CoreAudio software.

Any ideas?



_______________________________________________
Portaudio mailing list
Portaudio <at> music.columbia.edu
http://music.columbia.edu/mailman/listinfo/portaudio
Evan Balster | 16 Feb 19:58 2015
Picon

Rev. 1919: WDM-KS initialization hangs on certain hardware

Hey, all --

Apologies if this is something that has already been addressed in the nightlies, but it seems to be relatively rare and I'm in a position to collect information on the problem.

I have a small handful of Windows users of my app imitone reporting an application freeze on startup.  (My app reports one of these when taking longer than 7-10 seconds to start up.)  With the help of some deployable instrumentation I've tracked it down to PaInitialize, and had the idea to supply the afflicted users with an alternate PortAudio DLL which doesn't include WDM-KS.  This appears to fix the problem, as can updates to audio drivers.  All this seems to suggest the problem arises when interfacing via WDMKS with buggy audio drivers...  Suspicious devices include a Motoo bluetooth headset and a cheap webcam.

I'm curious how I can help with the problem.  I have a few users who might be persuaded to run test code 

--

I've had this message in my outbox for ages, and revisited it today because now I have the problem myself.  Mysteriously, removing WDM-KS doesn't help in my case.  I've had issues with my audio drivers before on this machine (which have affected other apps) but I suppose I'm curious whether there's a way for PA to fail more gracefully in these circumstances.

Regards,
Evan
_______________________________________________
Portaudio mailing list
Portaudio <at> music.columbia.edu
http://music.columbia.edu/mailman/listinfo/portaudio
Ritesh Banka | 12 Feb 23:16 2015
Picon

How to send data only to channel number X

Hi,
I have a sound card which has 4 output channels and I want to send data to only channel number 4. I don't find any option in portaudio to specify the channel number. Currently, what I am doing is setting the number of channels in outputparameters to 4 but silence the first 3 channels when sending data to writestream. 

Is there a way to send data to only channel number 4?

Thanks,
Ritesh

--
Ritesh
_______________________________________________
Portaudio mailing list
Portaudio <at> music.columbia.edu
http://music.columbia.edu/mailman/listinfo/portaudio
Ritesh Banka | 12 Feb 00:34 2015
Picon

Question regarding interleaved samples and writestream

I am working on a Port Audio application and having some issue understanding the writedata command which is a blocking I/O method.

I want to output a sine wave for 2 seconds on my 2 channel headphones, so I create a buffer with sine wave values. Below is snippet of my code:


#define NUM_SECONDS (2) #define SAMPLE_RATE (44100) #define FRAMES_PER_BUFFER (256) #define INTERVAL (NUM_SECONDS*SAMPLE_RATE/FRAMES_PER_BUFFER) float writeData[INTERVAL][FRAMES_PER_BUFFER]; // bufferfor storing sine values // store sine values in the buffer for(j=0;j<INTERVAL;j++) { //I am creating an interleaved array as this is a stereo output for( i=0; i<FRAMES_PER_BUFFER/2; i++ ) { i *= 2; //left channel writeData[j][i] = (float) sin( ((double)i/((double)FRAMES_PER_BUFFER)/2) * M_PI * 2. ); k=i+1; //write left channel value to right channel writeData[j][k] = writeData[j][i]; } } // code to put sine values to writestream for( i=0; i<INTERVAL; i++ ){ err=Pa_WriteStream(stream,writeData[i],FRAMES_PER_BUFFER); }

The above code works fine and it plays the sound for 2 seconds on my output device on both the channels. My question is the number of samples that I send to writestream = NUM_SECONDS * SAMPLE_RATE = 88200. but these are for 2 channels, so 44100 for 1 channel. Shouldn't the sound just play for 1 sec and not 2 secs?

--
Ritesh
_______________________________________________
Portaudio mailing list
Portaudio <at> music.columbia.edu
http://music.columbia.edu/mailman/listinfo/portaudio
stephane.poirier | 1 Feb 13:57 2015

running portaudio examples on linux with jack

Hi All,

Just started to develop under linux.

Compiled portaudio examples and would like to run them using jack,
can't we just specify hostapi jack and so on?

Steph
_______________________________________________
Portaudio mailing list
Portaudio <at> music.columbia.edu
http://music.columbia.edu/mailman/listinfo/portaudio
Spencer Russell | 28 Jan 19:16 2015

Xrun error messages in ALSA

In pa_linux_alsa.c, in the PaAlsaStream_HandleXrun function, it calls
alsa_snd_pcm_recover with the third argument 0. That argument controls
whether or not that ALSA function prints out an error reason on an Xrun,
and a value of 0 enables the error (the parameter is "silent").

What would you think about either setting that to 1 and silencing the
error on STDERR, or making it configurable? It seems like in general
libraries shouldn't be printing directly to STDERR and should instead
bubble up error to the application via the error callback, right?

Because my library is used from a REPL or from a web-based notebook that
automatically displays STDOUT and STDERR to the user, those messages end
up adding noise to the display.

Thanks,
Spencer
Dorian Cazau | 27 Jan 12:00 2015
Picon

Compilation problem with portaudio

<!-- .hmmessage P { margin:0px; padding:0px } body.hmmessage { font-size: 12pt; font-family:Calibri } -->
Dear all, 

I am trying to compile the Playrec matlab Software (), but I get the following error message about linkers , I use Visual Studio 2010. I already checked that the file pa_win_coinitialize.c is in my folder \Playrec\lib\portaudio\src\os\win  ,so I do not really know what to do next ..



--> link /out:"playrec.mexw32" /debug /PDB:"playrec.mexw32.pdb" /dll /export:mexFunction /LIBPATH:"C:\Users\Asus\Desktop\R2014a\extern\lib\win32\microsoft" libmx.lib libmex.lib libmat.lib /MACHINE:X86 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /manifest /incremental:NO /implib:"C:\Users\Asus\AppData\Local\Temp\mex_9FrXUY\templib.x" /MAP:"playrec.mexw32.map" <at> C:\Users\Asus\AppData\Local\Temp\mex_9FrXUY\mex_tmp.rsp   
 
   Creating library C:\Users\Asus\AppData\Local\Temp\mex_9FrXUY\templib.x and object C:\Users\Asus\AppData\Local\Temp\mex_9FrXUY\templib.exp 
pa_asio.obj : error LNK2019: unresolved external symbol _PaWinUtil_CoUninitialize referenced in function __catch$_PaAsio_Initialize$3 
pa_asio.obj : error LNK2019: unresolved external symbol _PaWinUtil_CoInitialize referenced in function _PaAsio_Initialize 
pa_asio.obj : error LNK2019: unresolved external symbol _PaUtil_InitializeRingBuffer referenced in function "int __cdecl OpenStream(struct PaUtilHostApiRepresentation *,void * *,struct PaStreamParameters const *,struct PaStreamParameters const *,double,unsigned long,unsigned long,int (__cdecl*)(void const *,void *,unsigned long,struct PaStreamCallbackTimeInfo const *,unsigned long,void *),void *)" (?OpenStream <at> <at> YAHPAUPaUtilHostApiRepresentation <at> <at> PAPAXPBUPaStreamParameters <at> <at> 2NKKP6AHPBXPAXKPBUPaStreamCallbackTimeInfo <at> <at> K4 <at> Z4 <at> Z) 
pa_asio.obj : error LNK2019: unresolved external symbol _PaUtil_AdvanceRingBufferWriteIndex referenced in function "int __cdecl StartStream(void *)" (?StartStream <at> <at> YAHPAX <at> Z) 
pa_asio.obj : error LNK2019: unresolved external symbol _PaUtil_FlushRingBuffer referenced in function "int __cdecl StartStream(void *)" (?StartStream <at> <at> YAHPAX <at> Z) 
pa_asio.obj : error LNK2019: unresolved external symbol _PaUtil_AdvanceRingBufferReadIndex referenced in function "int __cdecl ReadStream(void *,void *,unsigned long)" (?ReadStream <at> <at> YAHPAX0K <at> Z) 
pa_asio.obj : error LNK2019: unresolved external symbol _PaUtil_GetRingBufferReadRegions referenced in function "int __cdecl ReadStream(void *,void *,unsigned long)" (?ReadStream <at> <at> YAHPAX0K <at> Z) 
pa_asio.obj : error LNK2019: unresolved external symbol _PaUtil_GetRingBufferReadAvailable referenced in function "int __cdecl ReadStream(void *,void *,unsigned long)" (?ReadStream <at> <at> YAHPAX0K <at> Z) 
pa_asio.obj : error LNK2019: unresolved external symbol _PaUtil_GetRingBufferWriteRegions referenced in function "int __cdecl WriteStream(void *,void const *,unsigned long)" (?WriteStream <at> <at> YAHPAXPBXK <at> Z) 
pa_asio.obj : error LNK2019: unresolved external symbol _PaUtil_GetRingBufferWriteAvailable referenced in function "int __cdecl WriteStream(void *,void const *,unsigned long)" (?WriteStream <at> <at> YAHPAXPBXK <at> Z) 
pa_asio.obj : error LNK2019: unresolved external symbol _PaUtil_WriteRingBuffer referenced in function "int __cdecl BlockingIoPaCallback(void const *,void *,unsigned long,struct PaStreamCallbackTimeInfo const *,unsigned long,void *)" (?BlockingIoPaCallback <at> <at> YAHPBXPAXKPBUPaStreamCallbackTimeInfo <at> <at> K1 <at> Z) 
pa_asio.obj : error LNK2019: unresolved external symbol _PaUtil_ReadRingBuffer referenced in function "int __cdecl BlockingIoPaCallback(void const *,void *,unsigned long,struct PaStreamCallbackTimeInfo const *,unsigned long,void *)" (?BlockingIoPaCallback <at> <at> YAHPBXPAXKPBUPaStreamCallbackTimeInfo <at> <at> K1 <at> Z) 
playrec.mexw32 : fatal error LNK1120: 12 unresolved externals 
 
  C:\USERS\ASUS\DESKTOP\R2014A\BIN\MEX.PL: Error: Link of 'playrec.mexw32' failed. 



If anyone could help me with that  , it would be great, 

thank you very much
Dorian
_______________________________________________
Portaudio mailing list
Portaudio <at> music.columbia.edu
http://music.columbia.edu/mailman/listinfo/portaudio
Alan Horstmann | 23 Jan 21:25 2015
Picon

Re: Portaudio Linux, recent developments

Hi Owen,

[cc the Portaudio list, for wider interest, OK?]

On Friday 23 January 2015 18:53, Owen Williams wrote:
> Thanks for coming back to this issue.  I recently purchased an Audio10,
> and the drivers no longer use sub devices so luckily the problem is not
> universal.  (It looks like the Audio2 is affected though:
> https://bugs.launchpad.net/mixxx/+bug/1076948)
>
> I will try out the branch on my audio4dj and see if it works properly.
> I would like to be able to give NI hardware my full recommendation for
> Mixxx since they have shown a commitment to open drivers, and fixing
> this problem would make that a lot easier.

The experimental Alsa branch has the *capability* to resolve the issues, but 
to do so will require a Audio4DJ specific entry.  I was planning to ask if 
someone had one - if you can post the output of
  ' aplay -l '
then I should be able to create an entry and give a one-line patch to add that 
to the pre-defines list.  What the Audio4DJ needs is
  a) sub-device listing
  b) use plughw device to adapt the data endianness.

The Audio2 oddly looks like it presents as 2 mono sub-devices?  And possibly 
also big-endian.  So a similar entry would be needed.  From that Mixxx bug 
report, the card name is 'TraktorAudio2'?

I should say, though, that if it is 2 mono sub-devices, there would be a good 
case for the Alsa card conf to include a multi plugin to combine them in the 
Alsa-lib layer to a single stereo device.  Probably that also applies to 
making the Audio4DJ have a single 4-ch device available?

It would be great to get your reaction to the rather different presentation of 
devices in the branch Alsa code!

Regards

Alan
encore1 | 21 Jan 23:39 2015
Picon
Picon

Assembler Error When Compiling pa_converter.c

When running the sequence configure, make clean and make the assembler 
reports the following:

libtool: compile:  gcc -c -g -O2 -DPA_LITTLE_ENDIAN -I./include 
-I./src/common -I./src/os/win -DPA_U
SE_WMME=0 -DPA_USE_ASIO=0 -DPA_USE_WDMKS=0 -DPA_USE_DS=0 
-DPA_USE_WASAPI=0 -UPA_USE_WMME -DPA_USE_WM
ME=1 -mthreads -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" 
-DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"
\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT
_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 
-DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -D
HAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DLT_OBJDIR=\".libs/\" 
-DSIZEOF_SHORT=2 -DSIZEOF_INT=4 -DSIZEOF_LO
NG=4 src/common/pa_converters.c  -DDLL_EXPORT -DPIC -o 
src/common/.libs/pa_converters.o
C:\Users\dick\AppData\Local\Temp\ccL6kwYo.s: Assembler messages:
C:\Users\dick\AppData\Local\Temp\ccL6kwYo.s:1206: Error: expecting 
string instruction after `rep'
C:\Users\dick\AppData\Local\Temp\ccL6kwYo.s:1418: Error: expecting 
string instruction after `rep'
C:\Users\dick\AppData\Local\Temp\ccL6kwYo.s:1828: Error: expecting 
string instruction after `rep'
C:\Users\dick\AppData\Local\Temp\ccL6kwYo.s:2125: Error: expecting 
string instruction after `rep'
C:\Users\dick\AppData\Local\Temp\ccL6kwYo.s:2204: Error: expecting 
string instruction after `rep'
C:\Users\dick\AppData\Local\Temp\ccL6kwYo.s:4925: Error: expecting 
string instruction after `rep'
make: *** [src/common/pa_converters.lo] Error 1

I am running Windows 7, MinGW/Msys, gcc 4.8.1, m4 version 1.4.14 and 
PortAudio release v19 dated 20140130. I ran configure (which finished 
with no errors) and make with no parameters.

I'm at a loss for how to proceed. Thanks in advance for your help!
__________________________
Dick Holmes

Gmane