Connor Gettel | 29 Jul 12:07 2015

Querying Two Separate Soundcards Simultaneously

Hey Everyone,

I was wondering (purely out of curiosity) if it was possible to query two different soundcards at the same
time within the same program? Say for example I had two identical USB soundcards, each with a stereo input
and i wanted them to perform two separate but similar tasks inside the same program, would portaudio be
able to handle this or would it be massively confusing? I suppose a certain threading model might be
needed. I’d try it out myself but I haven’t got a second soundcard. Anybody tried this out before?

Cheers,

Connor.
_______________________________________________
Portaudio mailing list
Portaudio <at> lists.columbia.edu
https://lists.columbia.edu/mailman/listinfo/portaudio
Ross Bencina | 28 Jul 14:15 2015

test

testing.
Douglas Repetto | 15 Jul 18:24 2015

[admin] list blurp

Hi everyone,

Columbia is switching some servers around, so there may be a slight
blip in the list sometime this week. Hopefully no big deal. The list
address should stay the same, and the archives will be preserved.
Everyone will be resubscribed to either normal or digest mode,
although if you've tweaked any of your other settings they will be
lost. And if you're set to "no mail" for some reason, you won't be
transferred. You also won't receive this email, so it'll be a big
mystery!

best,
douglas
Дмитрий | 15 Jul 05:38 2015
Picon

Data loss when playing with portaudio

I think I found a bug. Portaudio at least after rev1535 doesn't play a whole file. It losses a small piece of data in start and end of the file. I use pyaudio for playing files. I'm sure that reason of it is not in pyaudio. I tried to compile different revisions of portaudio and after revision 1535 output data is corrupting. Some info:
  1. Implementation: WMME, WASAPI
  2. OS: Win7 32 and 64 bit
  3. Audio devices: ESI Juli <at> , Realtek High Definition Audio, VIA VT1708S
  4. No error messages to report
  5. How to reproduce. Play audio file with portaudio with revision greater than 1535 and record output on another computer. Then compare it from source file in audio editing tool such as Audacity and you can see data loss in start and end of file. I attached example of this file which is just a set 0 and 1 generated by software and recorded output played by different version of portaudio. Link to zip https://drive.google.com/file/d/0B8btPbTQ1ySFOG1yckhaZU1zUEE/view?usp=sharing.
  6. No strange sounds.
_________________________
Best regards, Dmitry Misharov
_______________________________________________
Portaudio mailing list
Portaudio <at> music.columbia.edu
http://music.columbia.edu/mailman/listinfo/portaudio
Enrique Gomez | 14 Jul 13:37 2015
Picon

Portaudio + wdmks in WindowsXP & Windows7 ?? linking failing


Hi,

I will first describe my scenario and then i will make the questions:

I need a working API in windows XP and windows 7, if i have to choose only one, it will be windows 7. My IO latencys have to be below 20ms,  so that rules out wmme as i am getting decent input latencys but too high output latencys (70 ms).

I started working with PortAudio + MinGW + MSYS + WindowsXP.
   - I was able to get an wmme functional api.
   - Unable to get an WDMKS functional api, (make fails)

I try then WindowsXP + mingw-w64 + MSYS from slowriot (https://github.com/slowriot/portaudio-mingw-w64):
   - Unable to get a PortAudio-WDMKS functional api, (Configure OK but make)

FIRST ERROR:
The was a double inclusion error (not protected) so i have to comment the:
#include <winioctl.h>
in the file:
src/hostapi/wdmks/pa_win_wdmks.c

SECOND ERROR:
There was a syntax error in the Makefile: have to change the reference to pa_win_wdmks_util.o for pa_win_wdmks_utils.o:
##OTHER_OBJS =  src/hostapi/wdmks/pa_win_wdmks.o src/common/pa_ringbuffer.o src/os/win/pa_win_hostapis.o src/os/win/pa_win_util.o src/os/win/pa_win_wdmks_util.o src/os/win/pa_win_waveformat.o src/hostapi/wmme/pa_win_wmme.o
OTHER_OBJS = src/hostapi/wdmks/pa_win_wdmks.o src/common/pa_ringbuffer.o src/os/win/pa_win_hostapis.o src/os/win/pa_win_util.o src/os/win/pa_win_wdmks_utils.o src/os/win/pa_win_waveformat.o src/hostapi/wmme/pa_win_wmme.o

THIRD ERROR:
Now is complaining about the libraries inlcuded (relevant part of the errors below):
"linker path does not have real file for library -lwinmm"
"linker path does not have real file for library -luuid"
"linker path does not have real file for library -lsetupapi"
"linker path does not have real file for library -lole32"

And right know i am lost, I modify the makefile again to point the linker the libraries location (as they are in the system as lib<name>.a) but still get the same errors:
DLL_LIBS = -Lc:/Archivos\de\programa/mingw-w64/i686-4.9.2-posix-dwarf-rt_v4-rev2/mingw32/i686-w64-mingw32/lib -L/usr/local/dx7sdk/lib -lwinmm -lm -luuid -lsetupapi -lole32


Could anyone point me in the right direction??

Thanks in advance for your time.

Enrique Gomez.
_______________________________________________
Portaudio mailing list
Portaudio <at> music.columbia.edu
http://music.columbia.edu/mailman/listinfo/portaudio
Naveen Kumar Dharmapuram | 14 Jul 08:26 2015

Re: Portaudio Digest, Vol 76, Issue 8

Hi Ross,

Thanks for the information ...............
but i have some more please have a glance at them ......
> Configuring different playback channels mean i am using a single device
> but playing streams with different playback channels.
>
> I am closing and opening the player to select different channels not
> different devices.

In that case you could consider leaving the device open with all
channels and then selecting the channels you want in your own code.

can you help with an example for  opening of a  device with all the channels as said by you ?
 
presently i am opening the stream as shown below

libExitCode = Pa_OpenStream( &m_pStreamPlayback,
                                     &inputParameters,
                                     &outputParameters,
                                     m_sampleRate,
                                     m_bufferSize,
                                     paClipOff,
                                     ProcessPlayback,
                                     (void*) this
                                   );

in the inputParameters  and outputParameters  are setting the channels
.
outputParameters.channel = playback_channel.(specifing the channels.)
inputParameters.channel = recording_channel.(specifing the channels.)



> Is there any fault in the implementation ? Is so how to play a stream
> using WDM/KS host API. (LIST OF API's in MY SYSTEM ARE MME, WASAPI, WDM/KS)

I don't really understand your question, but also, I can't help you with
WDM/KS. I recommend that you post a new question about WDM/KS and see if
someone else can help you.


> I need a small clarification it may be simple but i think it will be
> useful for me.
>
> How the implementation of general applications will be that supports
> recording and playback.If he wants to play different channel streams
> will he kill the instance and create a new instance with new playback
> channels or is there any API to change the playback channels with out
> killing the instance.

I think it would depend. But it is quite usual to open all channels and
do your own routing. There is no API for this. You just need to copy the
audio data to the output buffer yourself using the channels you need and
making sure to zero the others. Similarly for input, just copy the
channels you need into your own buffer.

Ross.

****************************************



--
Thanks and Regards,
Naveen Kumar .D

_______________________________________________
Portaudio mailing list
Portaudio <at> music.columbia.edu
http://music.columbia.edu/mailman/listinfo/portaudio
Naveen Kumar Dharmapuram | 14 Jul 08:10 2015

player state changes of port audio.

Hi ,

I want a clarification how the change of  state of port audio is effected.

I have created 2 separate instances for playback and recording for port audio to meet my requirement.

If the below specified is the situation

setup()

start_recording()

start_playing()
end_playing()

start_playing()
end_playing()

end_recording()

terminate() ->player termination.

How the player state will change ?

If the recording is in process and playback is completed what will be the player state?

How to calculate the player state? i.e PlAYBACK_READY or some thing else ?



 

--
Thanks and Regards,
Naveen Kumar .D

_______________________________________________
Portaudio mailing list
Portaudio <at> music.columbia.edu
http://music.columbia.edu/mailman/listinfo/portaudio
Naveen Kumar Dharmapuram | 9 Jul 16:21 2015

Re: Portaudio Digest, Vol 76, Issue 5

Ross,

You have done with all most all my quires.Thanks for that.

Configuring different playback channels mean i am using a single device but playing streams with different playback channels.

I am closing and opening the player to select different channels not different devices.

I want to confirm that all the host API support the opening the different streams in single process  for that i have used the device enumeration so that i select a different device rather than the default device and check the correctness of my implementation of the portaudio client.

I have went through the doc at following location.

http://portaudio.com/docs/v19-doxydocs/querying_devices.html

I have observed that on selecting a default input and output device the port audio is using "MME" host API with which my implementation is working.

To start with host API "WASAPI" i have selected the input and output devices as the default WASAPI input and output devices.Even this worked for my implementation.

To Check with the host API "WDM/KS" i have selected the input and output devices as the default WDM/KS input and output devices. But i observed that the default output device of the WDM/KS is SPDIFOUT .

I dont know how to play the audio with SPDIFOUT ,(where to listen audio from the system) so i have changed the output device from SPDIFOUT to speakers which is also a device of WDM/KS (shown in list of devices).EVEN though i have not listened  any audio from the system out.

Is there any fault in the implementation ? Is so how to play a stream using WDM/KS host API. (LIST OF API's in MY SYSTEM ARE MME, WASAPI, WDM/KS)

Hope you under stand my question !


I need a small clarification it may be simple but i think it will be useful for me.

How the implementation of general applications will be that supports recording and playback.If he wants to play different channel streams will he kill the instance and create a new instance with new playback channels or is there any API to change the playback channels with out killing the instance.


Cheers,
Naveen.D
Senior QA Engineer.
_______________________________________________
Portaudio mailing list
Portaudio <at> music.columbia.edu
http://music.columbia.edu/mailman/listinfo/portaudio
Tuukka Pasanen | 9 Jul 10:17 2015
Picon

Alsa SNDRV_PCM_FMTBIT_S24_LE support

Hello,
I noted that 'SNDRV_PCM_FMTBIT_S24_LE' ain't supported by portaudio. Is 
there any change to implement this besides supported 
SNDRV_PCM_FMTBIT_S24_3LE. I understand that 4-byte 24 bit is just stupid 
but could it be mapped us 32 bit to solve this problem?

Sicerely,
Tuukka
Naveen Kumar Dharmapuram | 8 Jul 05:27 2015

Re: Portaudio Digest, Vol 76, Issue 2

Hi Ross,

Thanks for the information.My main intention is to open 2 different port audio instances one for only recording and one for playback.

The requirement is in such a way that i want to start recording and play a set of streams to record each stream has different channel configuration i.e 1st stream may have 2 channel and second may have single channel etc.But all the streams should be recorded in the single recording file.

Our previous implementation was in such a way that we create a instance of port audio passing playback and recording channels as arguments so if want to configure the playback channels we should kill the instance which in turn kills the recording .

Now i have changed the implementation in such a way that i have created different instances of playback and recording in single process .
If we want ot change the playback configuration i will kill the playback instance and start a new instance but still the recording will be continuing.With this my requirement is working fine.The default HOST API USED IN MY PC IS MME.


My main concern is about the different HOST API in windows.As per my study there are 5 different host API .Will all the host API support the above implementation.(opening 2 streams in a single process).

Is there any alternate implementation method to acheive the required functionality.

Hope you understood the scenario.

Cheers,
Naveen.
_______________________________________________
Portaudio mailing list
Portaudio <at> music.columbia.edu
http://music.columbia.edu/mailman/listinfo/portaudio
Naveen Kumar Dharmapuram | 7 Jul 06:27 2015

Recording and playback from portaudio.


Hi

I am new to portaudio,I am currently working on windows to play the streams using port audio.

My main concern is what are the things that need to be taken care and need to be worried if we want to start simultaneous playback and recording.

Is there any relation with the Audio APIs WASAPI, DirectSound, WMME, WDM or ASIO.What are the cases that can support playback and record.

My PC is connected with one playback device and one recording device.(playback to line out and record from line in)
--
Thanks and Regards,
Naveen Kumar .D

_______________________________________________
Portaudio mailing list
Portaudio <at> music.columbia.edu
http://music.columbia.edu/mailman/listinfo/portaudio

Gmane