Alberto di Bene | 24 Jun 18:40 2016
Picon
Picon

Invalid number of channels...(?)

I am coding a new program that makes use of Portaudio, opsys is Windows 10.

Listing the WASAPI devices, I have this statement that I use to fill a box for the user to choose the output device :


   if(deviceInfo->maxOutputChannels > 0)
      CardOutBox->Items->Add(deviceInfo->name);


Stopping in debug mode, I can see that the maxOutputChannels has the value of 2 for the device

"Speakers (High Definition Audio Device)"

So far, so good.

Then I issue a  Pa_OpenStream  instruction, specifying that device as output, after having set
the requested number of channels to 1 :

      outputParameters.channelCount = 1;     /* mono output */

The Pa_OpenStream fails with error code -9998, which means :

"Invalid number of channels"

Is there a reasonable explanation for this behavior ?

Thanks

Alberto



_______________________________________________
Portaudio mailing list
Portaudio <at> lists.columbia.edu
https://lists.columbia.edu/mailman/listinfo/portaudio
Peter | 24 Jun 13:58 2016

Soundcard / Chipset with output only

Hi all,

I never had a computer under my hands that has no audio input.
So this PC (HP Compaq Elite 8300, Windows 7) has such a configuration.

Now my program does not start playing my audio.

This due to the fact that
  - input device = -1
  - inputParameters = NIL

=>
function Pa_OpenStream( var stream: PPaStream;
                       inputParameters: PPaStreamParameters;
                       outputParameters: PPaStreamParameters;
                       sampleRate: cdouble;
                       framesPerBuffer: culong;
                       streamFlags: TPaStreamFlags;
                       streamCallback: PPaStreamCallback;
                       userData: Pointer ): TPaError; cdecl; external LibName;

How do I have to configure Portaudio ?
Why does it not trigger the streamCallback function ?


Thanks,
Peter
_______________________________________________
Portaudio mailing list
Portaudio <at> lists.columbia.edu
https://lists.columbia.edu/mailman/listinfo/portaudio
Dino Cro | 15 Jun 11:58 2016
Picon

PulseAudio Host API status

Hello list,
is the PulseAudio Host API still in development or did it somehow stop?

In case the development has stopped, is there any documentation available on how to write Host APIs (specifically, what to implement and the like)?

Best regards,
Dino
_______________________________________________
Portaudio mailing list
Portaudio <at> lists.columbia.edu
https://lists.columbia.edu/mailman/listinfo/portaudio
Puneet Rana | 14 Jun 17:31 2016
Picon

Latency increase with newer Portaudio on Mac

Hello all,

I see an increase in latency of about 3x when comparing the latest stable version (Jan 30 2014) with an older stable version (Mar 26, 2011) on Mac using CoreAudio.

I use a modified version of the paex_record.c example to play audio and record it back. I have a loopback cable connected between audio out and audio in of the sound card. On observing the recorded audio, the latency values I see are (frame size of 128 samples, sample rate of 44100 Hz):
* March 26, 2011 version: 10.6 ms
* Jan 20, 2014 version: 28.1 ms

These numbers are obtained using the same hardware, with the same frame size and sample rate settings. I have been able to reproduce this on other Mac machines, sound cards, and frame sizes. This leads me to believe that something in the Portaudio code may have changed between these two versions that gives a poorer result now. Can someone please help debug this issue?

For reference, here is the loopback code and the recorded audio files:
Puneet
_______________________________________________
Portaudio mailing list
Portaudio <at> lists.columbia.edu
https://lists.columbia.edu/mailman/listinfo/portaudio
tsuji | 8 Jun 08:00 2016
Picon

About Multi-recording with Portaudio

Hello.
My name is Toshikazu Tsuji.
I am a 2nd grade graduate student.
I am from Japan.

I want to record multi-track (multi-record) using audio-device with ASIO.
Can I multi-record on Portaudio?

If Portaudio enable us to multi-record , could you tell me  Web sites 
and books and so on as reference?

--

-- 
三重大学 工学研究科 情報工学専攻
Mie University Graduate School of Engineering Information Engineering Major
パターン情報処理研究室
Laboratory of Pattern Information Processing
辻 敏和
Name: Toshikazu Tsuji
tsuji <at> pa.info.mie-u.ac.jp
_______________________________________________
Portaudio mailing list
Portaudio <at> lists.columbia.edu
https://lists.columbia.edu/mailman/listinfo/portaudio
Ross Bencina | 31 May 11:32 2016

spamer banned

Apologies for the recent spam, the offending address has been banned.

Greetings to all,

Ross.
typograph | 30 May 18:18 2016
Picon
Gravatar

interesting moments

Hello,

I've been reading a lot on the subject we were discussing in our last conversation and found a lot of interesting moments, read more here http://chundociwa.thereimannway.net/lnplc

Looking forward, typograph <at> elec.ru

_______________________________________________
Portaudio mailing list
Portaudio <at> lists.columbia.edu
https://lists.columbia.edu/mailman/listinfo/portaudio
typograph | 20 May 01:37 2016
Picon
Gravatar

be prepared

Hey,

 

I'm sure you are interested in such info, be prepared for something really great! More info here http://jecrupipe.pondpublishing.com/lnqkh

 

Warmest regards, typograph <at> elec.ru

_______________________________________________
Portaudio mailing list
Portaudio <at> lists.columbia.edu
https://lists.columbia.edu/mailman/listinfo/portaudio
Phil Burk | 19 May 07:41 2016

fix for non-power-of-2 ready for review

PortAudio asserted on Mac if one tried to write() or read() N channels where N was not a power of 2.

A possible fix is ready here for review:


Here is the bug report:


Phil Burk

_______________________________________________
Portaudio mailing list
Portaudio <at> lists.columbia.edu
https://lists.columbia.edu/mailman/listinfo/portaudio
Raphael Melgar | 18 May 22:15 2016
Picon

Getting lowest latency on Mac OS X

Hello,

I’m learning PortAudio and so far it’s pretty straight forward to get it working. I’m basically
writing a program that is attempting to test the roundtrip latency of a thunderbolt audio interface I have
by sending the output of ch1 to input ch1. 

I hope this question isn’t inappropriate for this mailing list but I’m having trouble with setting up
my Pa parameters such that I get the lowest latency possible (<10ms).

First I’m not clear on how to use the functions in pa_mac_core.h or from port audio.h to setup an optimized
environment for low latency, this is what I’m doing:

#define SAMPLE_RATE 48000
#define BLOCK_SIZE 32
#define NUM_CHANNELS 1
#define DESIRED_LATENCY 0.0	// I read that you can set this to 0 to tell PA you want the lowest latency possible

    // Get default input device 
    inputParameters.device = Pa_GetDefaultInputDevice(); /* Get the default output device. */

    // Get default output device
    outputParameters.device = Pa_GetDefaultOutputDevice(); /* Get the default output device. */

    // set pa_mac_core info
    PaMacCore_SetupStreamInfo(&mac_info, paMacCoreChangeDeviceParameters);

    // set input device params
    inputParameters.channelCount = 1;   
    inputParameters.sampleFormat = paFloat32;       
    inputParameters.hostApiSpecificStreamInfo = &mac_info;
    inputParameters.suggestedLatency = DESIRED_LATENCY;

    // set output device params
    outputParameters.channelCount = 1;               
    outputParameters.sampleFormat = paFloat32;   
    outputParameters.hostApiSpecificStreamInfo = &mac_info;
    outputParameters.suggestedLatency = DESIRED_LATENCY;

    /****************** open a stream *********************/
    pa_error = Pa_OpenStream(&stream,
                             &inputParameters,
                             &outputParameters,
                             SAMPLE_RATE,
                             BLOCK_SIZE,
                             paClipOff,
                             &TestData::myPaCallback,
                             data);

Then I have a setup where in my callback function I first send audio to the output buffer, then immediately
get the input sample. I test to see if the current input sample passes a certain threshold, and if so I abort
the process:

    for(i = 0; i < framesPerBuffer; i++){

        // send a test signal out of the DAC,
        // the first sample is a unit impulse.
        *out++ = test_sig[i];

        // get current input sample from input buffer
        input_samp = *in++;

        // detect a signal value above THRESHOLD
        // if detected, abort the stream
        if (input_samp > THRESHOLD ) {
            return paAbort;                 // quit processing samples
        }
    }

Using timing info I get from port audio, my program reports on average a roundtrip latency about ~240ms. am I
missing any steps or is it not possible to get the <10ms latency I desire?

-Raph

_______________________________________________
Portaudio mailing list
Portaudio <at> lists.columbia.edu
https://lists.columbia.edu/mailman/listinfo/portaudio
Phil Burk | 17 May 07:40 2016

no assert in pa_mac_core.c

I cleaned up some comments in the pa_mac_core.c merge request.
This change list (CL) replaces asserts with code that stops the stream.

I have not gotten any feedback. So I plan to just merge the code tomorrow, unless I hear otherwise.


This CL is to fix this bug:


Phil Burk

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

Gmane