Ross Bencina [Sat, 3 Sep 2016 12:53:30 +0000 (22:53 +1000)]
Ports Portaudio WMME device timeout system to MacOsX CoreAudio in order to
avoid deadlock when a device is unplugged.
Vincent Lucas committed on Jan 10, 2013 2a20693 from https://github.com/jitsi/libsrc/commits/master/portaudio.zip
Ross Bencina [Sat, 3 Sep 2016 12:51:44 +0000 (22:51 +1000)]
Commits the C source code of a refining of the automatic audio device
selection to pick up devices from the same hardware.
lyubomir committed on Dec 19, 2012 6441b56 from https://github.com/jitsi/libsrc/commits/master/portaudio.zip
Ross Bencina [Sat, 3 Sep 2016 12:49:43 +0000 (22:49 +1000)]
Fixes freezes in Pa_ReadStream, Pa_StopStream and Pa_WriteStream and
incorrect causes of paInvalidChannelCount errors in PortAudio on
Windows/WMME. Mitigates an issue with hightened CPU usage (on all
supported operating systems) related to hotplug.
lyubomir committed on Dec 4, 2012 a45b993 from https://github.com/jitsi/libsrc/commits/master/portaudio.zip
Ross Bencina [Sat, 3 Sep 2016 12:46:54 +0000 (22:46 +1000)]
- Fixes multiple crashes in PortAudio.
- Removes the DirectSound support from PortAudio in order to prevent
issues with bad audio quality.
- Attempts to recognize USB PortAudio devices on Windows as such,
ignores the virtual Microsoft Sound Mapper devices to avoid user
confusion. Contributed by Vincent Lucas.
lyubomir committed on Nov 15, 2012 a93910c from
https://github.com/jitsi/libsrc/commits/master/portaudio.zip
Ross Bencina [Sat, 3 Sep 2016 12:44:31 +0000 (22:44 +1000)]
Adds hotplug to portaudio wmme host api, also fixes a NPE that can prevent
device change updates.
damencho committed on Nov 6, 2012 5ca6fed from https://github.com/jitsi/libsrc/commits/master/portaudio.zip
Ross Bencina [Sat, 3 Sep 2016 12:36:13 +0000 (22:36 +1000)]
Adds device uid for wmme and dsound devices.
damencho committed on Nov 3, 2012 7e70e94 from https://github.com/jitsi/libsrc/commits/master/portaudio.zip
Ross Bencina [Sat, 3 Sep 2016 12:34:22 +0000 (22:34 +1000)]
Improves device selection via portaudio for MacOSX (hostapi coreaudio):
adds the possibility to get the device transport type (USB, bluetooth,
etc.) and an unique identifier. Corrects problems when: loading the same
device twice (for the moment only for the same hostapi), a new plugged
device is selected during a call or if the selected device is unchanged.
Vincent Lucas committed on Oct 29, 2012 26848f0 from https://github.com/jitsi/libsrc/commits/master/portaudio.zip
Ross Bencina [Sat, 3 Sep 2016 12:29:58 +0000 (22:29 +1000)]
Adds portaudio sources [adds hotplug support for pa_linux_alsa,
pa_mac_core, plus some other tweaks]
damencho committed on Mar 29, 2012 d2076b1 from https://github.com/jitsi/libsrc/commits/master/portaudio.zip
dmitrykos [Tue, 8 Mar 2011 17:20:07 +0000 (17:20 +0000)]
wasapi:
- fixed warning of incompatible type usage when ring-buffer is used for blocking interface
- fixed compilation using MSYS with MinGW compiler (regenerate makefile with configure)
philburk [Sun, 6 Mar 2011 00:35:24 +0000 (00:35 +0000)]
Add include string.h to loopback test.
Use full duplex if input and output device the same.
Check for format conversion buffer overflow in case of huge framesPerBuffer.
philburk [Mon, 28 Feb 2011 23:56:48 +0000 (23:56 +0000)]
Added patest_write_sine_nonint to Makefile.
Check for paNonInterleaved on Mac and return paSampleFormatNotSupported.
Fix pa_minlat.c. Linux was complaining about not checking fgets return value.
dmitrykos [Mon, 21 Feb 2011 22:41:06 +0000 (22:41 +0000)]
wasapi: fixed the bug when on stream stop/start/stop/start sequence callback could be called with number of samples smaller than requested by user in Pa_OpenStream
dmitrykos [Mon, 21 Feb 2011 08:02:21 +0000 (08:02 +0000)]
fixed build by reverting 1604 revision where 'pa_ringbuffer.o' dependency was added to Makefile.in, modified configure.in for WASAPI build and added explicit 'pa_ringbuffer.o' dependency there instead
rossb [Sat, 12 Feb 2011 09:20:26 +0000 (09:20 +0000)]
fixed stream info inputLatency and outputLatency calculations. PaUtil_GetBufferProcessorOutputLatency returns latency in <frames>, code assumed it was in seconds.
rossb [Sat, 12 Feb 2011 09:19:37 +0000 (09:19 +0000)]
fixed stream info inputLatency and outputLatency calculations. PaUtil_GetBufferProcessorOutputLatency returns latency in <frames>, code assumed it was in seconds.
rossb [Sat, 12 Feb 2011 09:18:28 +0000 (09:18 +0000)]
fixed stream info inputLatency and outputLatency calculations. PaUtil_GetBufferProcessorOutputLatency returns latency in <frames>, code assumed it was in seconds.
dmitrykos [Fri, 11 Feb 2011 00:15:51 +0000 (00:15 +0000)]
alsa:
- implemented dynamic ALSA loading, you shall define PA_ALSA_DYNAMIC when compiling PortAudio library, by default PortAudio will use compile time linkage;
- added PA_ALSA_PATHNAME define to redefine ALSA library path and filename to some other name and location, has effect only together with PA_ALSA_DYNAMIC;
- added extension function (PaAlsa_SetLibraryPathName) which allows to set ALSA library path and filename during application run-time overwriting default set by PA_ALSA_PATHNAME during compilation;
- added API compatibility with Android OS (although ALSA may not be available on your device and usually requires 'root' access rights to open an audio device), some missing ALSA functions are replaced with stubs (needs more input from interested parties), to compile on Android you need to add ALSA headers (get it from Android GIT source-code tree) to compiler's searchable path.
dmitrykos [Wed, 9 Feb 2011 08:53:50 +0000 (08:53 +0000)]
alsa:
- fixed callback thread to exit normally if error condition was satisfied during stream processing (OnExit wasn't called), it was possible cause of crash if error happened inside the thread
- modified processing thread to timeout during poll() within around 2 seconds instead of 64 milliseconds, this will help to fix problems on systems with low processing power and possible CPU overloading, like portable ARM devices
- timeout of poll() will not cause stream to stop but will cause Alsa stream restart, poll timeout will now set 'xrun' event to 1
dmitrykos [Thu, 3 Feb 2011 15:15:44 +0000 (15:15 +0000)]
wasapi:
- fixed blocking interface, Input and Output
- improved Exclusive Input device latency tunning
- applied path provided by Jean-François Charron (D-BOX Technologies Inc.) which improves handling of COM objects in multi-threaded environment and initialization stage which could under certain conditions return paNoError event when initialization failed
dmitrykos [Sun, 26 Dec 2010 16:36:52 +0000 (16:36 +0000)]
wasapi: fixed audio device not released to other applications if WASAPI Exclusive stream is stopped but not yet closed. Bug does not affect Shared mode streams. Fixed possible object's leakage in situation when WASAPI thread encountered an error and stopped and user decided to start stream again without prior closing it.
dmitrykos [Sun, 26 Dec 2010 16:17:56 +0000 (16:17 +0000)]
wasapi: fixed audio gain is decreased by 2 when audio stream is opened for capturing and 1 (Mono) channel selected, this bug occurs only if non-Stereo input source used (mono mic).
dmitrykos [Sun, 26 Dec 2010 15:58:30 +0000 (15:58 +0000)]
corrected Int24_To_Int16_Dither and implemented Int24_To_Int8_Dither, Float32_To_Int24 to use all 'double' types for optimal code generation (not mixing double with floats)
rossb [Sun, 26 Dec 2010 06:43:58 +0000 (06:43 +0000)]
disable dither conversion when host input format is 32 bit and user format is 24 bit. the converter for this is unimplemented anyway, and the host won't ever be sending us better than 24 bit data, so no need to dither it.
dmitrykos [Sat, 25 Dec 2010 13:26:17 +0000 (13:26 +0000)]
coreaudio: fixed incorrect value type used with OSAtomicOr32 API (xrunFlags were casted from long to unsigned int) which results in value truncation on systems where 'long' is 64 bits
richard_ash [Fri, 12 Nov 2010 17:16:21 +0000 (17:16 +0000)]
Commit fix for crash during full-duplex operation with PulseAudio. Reported by Al Dimond, fix proposed by Ross Bencina, acked by Dmitry Kostjuchenko. This fixes a bug with Dmitry's zero-copy optimisations. Fix works in Audacity (where the bug was found), so comitting upstream.
dmitrykos [Sun, 7 Nov 2010 08:23:51 +0000 (08:23 +0000)]
wasapi:
- using WAVE_FORMAT_PCM for mono/stereo 8/16-bit stream configuration to avoid possible driver refusal upon audio client creation
- modified default speaker mask for 5.1 and 7.1 configuration to _SURROUND (correct) versions, added default speaker configuration for 2.1, 4.1, 6.1 cases
dmitrykos [Sat, 6 Nov 2010 01:16:34 +0000 (01:16 +0000)]
wasapi: fixed audio stream failing to open on Windows 7 in Exclusive mode if suggestedLatency parameter is 0 and user framesPerBuffer is less than 3 milliseconds
richard_ash [Fri, 29 Oct 2010 20:09:54 +0000 (20:09 +0000)]
Remove frome the list of directories created by configure a directory that no
longer has any contents and is not needed any more. Original patch by Benjamin Drung (Ubuntu)
rossb [Fri, 22 Oct 2010 02:23:33 +0000 (02:23 +0000)]
patch from Richard Ash: updated Makefile.in to set SHELL variable expected by newer versions of libtool (was breaking in builds on Debian without this)
dmitrykos [Wed, 20 Oct 2010 17:00:54 +0000 (17:00 +0000)]
wasapi: improved audio quality stability in Shared mode if framesPerBuffer (from user-side) value is lower than 10 milliseconds, now even 1 frame provides stable quality. Exclusive mode is also affected by this improvement.
dmitrykos [Fri, 15 Oct 2010 20:39:23 +0000 (20:39 +0000)]
alsa: fixed Segmentation fault due to dangling pointer left by snd_lib_error_set_handler() call which set callback pointer to ALSA during PaAlsa_Initialize call. Segmentation fault happens only if application dynamically unloaded PortAudio while still using ALSA through other means, then next ALSA error which causes invocation of ALSA error handling callbacks would cause Segmentation fault. Bug reported in: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=563192, and re-announced by Phil Burk on 15.10.2010.
jack: fixed segmentation fault caused by PA Jack implementation if Pa_Initialize is called after Pa_Terminate due to bad pointer usage by realloc() call which was previously freed() in Pa_Terminate call. Many thanks to RJ Ryan for reporting, debugging and providing the solution for this bug.
alsa: avoid SetApproximateSampleRate() excessive log messages when Pa_IsFormatSupported API method is used to test for supported sample rates and some of them are not supported by device