this should resolve issues on OS X with systems where only sdk 10.6 is available and includes a likely fix for future simillar issues with 10.7. See ticket 179.
rossb [Wed, 11 May 2011 10:00:52 +0000 (10:00 +0000)]
Replaced MM timer with a high priority thread for audio compute, based on a patch by Dmitry Kostjuchenko. Reason: there is one global MM timer thread per process and doing audio compute in it was interfering with timer accuracy and also with running multiple DSound streams. The old MM timer based implementation is still available if you define PA_WIN_DS_USE_WMME_TIMER -- this may be removed in future.
rossb [Mon, 9 May 2011 20:05:34 +0000 (20:05 +0000)]
refactored COM initialization for dsound, asio and wasapi to new source file pa_win_coinitialize.c. fixes com uninitialisation bugs in error cases. resolves ticket #128
rossb [Mon, 2 May 2011 17:07:11 +0000 (17:07 +0000)]
renamed PaUtil_GetBufferProcessorInputLatency to PaUtil_GetBufferProcessorInputLatencyFrames and PaUtil_GetBufferProcessorOutputLatency to PaUtil_GetBufferProcessorOutputLatencyFrames. see ticket #161
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