dmitrykos [Sat, 13 Mar 2010 18:53:40 +0000 (18:53 +0000)]
wasapi: fixed extension functions: PaWasapi_GetDeviceDefaultFormat / PaWasapi_GetDeviceRole - device index was misinterpreted and as a result returning value was mismatched
dmitrykos [Wed, 10 Mar 2010 21:47:01 +0000 (21:47 +0000)]
implemented optional log output to Visual Studio Output window if PA_ENABLE_MSVC_DEBUG_OUTPUT is defined, this simplifies debugging of external process if Visual Studio is attached to process
dmitrykos [Tue, 9 Mar 2010 12:29:36 +0000 (12:29 +0000)]
wasapi:
- fixed configure.in to compile WASAPI module under MSYS
- fixed include name cases for case-sensitive build environments
- defined LPCGUID for some MinGW compilers which are missing it
- fixed strict-aliasing rules break on line of getting device EndpointFormFactor in case '-Wstrict-aliasing' is specified or corresponding GCC optimization flag is used
dmitrykos [Thu, 4 Mar 2010 11:02:06 +0000 (11:02 +0000)]
wasapi: fixed initialization stage of PaWasapi_Initialize() which was returning error if WASAPI wasn't found (for example under Windows XP), this was causing PA's whole initialization to fail completely
dmitrykos [Wed, 3 Mar 2010 22:57:16 +0000 (22:57 +0000)]
+++ wasapi:
- converted PA WASAPI module to pure C
- implemented compilation support for GCC [MinGW(32-bit)/MinGW64(64-bit)] compiler, special notes regarding MinGW compilation are included in 'readme.txt' file
dmitrykos [Tue, 2 Mar 2010 19:08:13 +0000 (19:08 +0000)]
+++ wasapi: corrected PaWasapi_Initialize() behavior in case of OS back-end failure: WASAPI will not be added to a list of available APIs now (instead of throwing error to InitializeHostApis() that causes PA initialization break), error is thrown only on low-memory condition (default behavior)
dmitrykos [Tue, 2 Mar 2010 17:42:36 +0000 (17:42 +0000)]
wasapi:
- removed dependency from strsafe.h
- fixed crash in InitializeHostApis() if PaWasapi_Initialize() failed due to internal WASAPI error (error code was returned as paNoError in such case)
dmitrykos [Fri, 26 Feb 2010 08:57:44 +0000 (08:57 +0000)]
+++ wasapi: Event-driven/Full-Duplex/Exclusive mode will be calling user-provided callbacks simultaneously when both input/output buffers are ready for IO
dmitrykos [Sat, 20 Feb 2010 12:03:57 +0000 (12:03 +0000)]
wasapi: improved paFramesPerBufferUnspecified handling in case device does not provide default period, paInvalidSampleRate will be returned if sampleRate parameter is 0 for Pa_IsFormatSupported/Pa_OpenStream
dmitrykos [Fri, 19 Feb 2010 11:16:01 +0000 (11:16 +0000)]
windows WASAPI fixes/improvements:
- fixed dependency of framesPerBuffer parameter in Pa_OpenStream and latency (now only latency setting affects device latency which is correct behavior);
- paFramesPerBufferUnspecified is now supported for Pa_OpenStream;
- sound distortion fixed for Shared mode if framesPerBuffer is lower than device limit and when latency was set to 0;
- fixed timeout for Exclusive mode due to buffer misalignment;
- improved precision of DAC/ADC time for running stream;
- avoided memory leaks on failure of Pa_OpenStream;
- NULL checks on stream pointer for all external methods;
- correct host buffer mode for paWinWasapiPolling mode to deliver fixed number of frames to user space;
- implemented workaround for Vista x64 WOW64 bug if Event-mode is used for Shared mode (due to incorrect Event signaling audio dropouts were happening): will fall back to safe Polling method automatically.
dmitrykos [Wed, 17 Feb 2010 10:11:40 +0000 (10:11 +0000)]
improved PaWasapi_ThreadPriorityBoost by providing enum PaWasapiThreadPriority with explicit thread priority values for convenience. it is possible to override default thread priority setting for Event/Poll-driven modes by specifying new flag paWinWasapiThreadPriority and setting priority value through PaWasapiStreamInfo::threadPriority member.
dmitrykos [Tue, 16 Feb 2010 11:18:52 +0000 (11:18 +0000)]
provided ability not to depend on ksguid.lib when using WDMKS as it may not be provided for x64 SDK by default, define PA_WDMKS_NO_KSGUID_LIB to use static declarations, x64 MSVC project corrected to define PA_WDMKS_NO_KSGUID_LIB for x64 compilations. added WASAPI symbols to portaudio.def.
dmitrykos [Tue, 16 Feb 2010 09:46:08 +0000 (09:46 +0000)]
finished WASAPI implementation:
- Callback/Blocking interface
- Playback/Capture
- Shared/Exclusive mode
to compile you must have installed recent Windows SDK(Vista SDK or higher) and min Visual Studio 2005 SP1. WASAPI is enabled by default, to disable you must define PA_NO_WASAPI prior compilation.
rossb [Tue, 2 Feb 2010 09:01:13 +0000 (09:01 +0000)]
Added code to PortAudio/DirectSound to use DX8 DirectSoundFullDuplexCreate API for full duplex streams where available. Define PAWIN_USE_DIRECTSOUNDFULLDUPLEXCREATE in your project to enable this feature.
rossb [Sun, 24 Jan 2010 13:17:31 +0000 (13:17 +0000)]
implemented paPrimeOutputBuffersUsingStreamCallback for DirectSound (previously this was the default). invoke some buffer reset code to from StartStream (actually ClearOutputBuffer) instead of OpenStream which should give cleaner startup behavior if the stream is started and stopped multiple times. fixed leaks under error in InitOutputBuffer and fixed leak of primary buffer (previously was never released)
rossb [Sun, 24 Jan 2010 11:42:56 +0000 (11:42 +0000)]
reworked DirectSound stream completion to correctly flush the buffer processor and zero DS buffers when the callback returns paComplete or paAbort. resolves ticket #86. use test patest_stop_playout.c to verify.
rossb [Sun, 24 Jan 2010 09:20:23 +0000 (09:20 +0000)]
use a win32 Event object (aka condition variable) to signal timer process completio to Pa_StopStream in DirectSound implementation. resolves race condition when stopping direct sounds streams.
rossb [Wed, 9 Dec 2009 01:55:50 +0000 (01:55 +0000)]
derive ds output channel count from speaker configuration when pnpInterface is unavailable (eg wavemapper). Thanks to Dmitry Kostjuchenko for the patch.
rossb [Wed, 9 Dec 2009 01:31:44 +0000 (01:31 +0000)]
Fixed bug (when PAWIN_USE_WDMKS_DEVICE_INFO is defined) where wmme device channel count would be incorrect for default device resulting in distorted sound if user tries to open device with more channels than device can handle. Thanks to Dmitry Kostjuchenko for the patch.
rossb [Tue, 8 Dec 2009 09:40:09 +0000 (09:40 +0000)]
Update to Makefile.in and Configure.in from Stelios Bounanos: Pretty-print help strings, Support multiple APIs on win32 with mingw, Output a configuration summary at the end, Remove ASIO build configuration from OSX
rossb [Tue, 8 Dec 2009 09:26:33 +0000 (09:26 +0000)]
Patch from Dmitry Kostjuchenko: Fixes x64 issue with mis-casting DWORD_PTRs to DWORDs, support proper conversion of device names in UNICODE builds, use of CreateThread instead of _beginthreadex with cygwin.
rossb [Fri, 13 Mar 2009 16:31:28 +0000 (16:31 +0000)]
fixed bug in asio blocking i/o stream initialization which would cause crash (bad ptr). enabled timeout code in read/writestream. patch from sven fischer
rossb [Wed, 21 Jan 2009 12:07:32 +0000 (12:07 +0000)]
initial support for ac3+wma spdif passthrough for pa_win_wmme. see flags in pa_win_wmme.h. flags currently work for OpenStream but are ignored for IsFormatSupported
rossb [Mon, 5 Jan 2009 08:59:14 +0000 (08:59 +0000)]
cleaned up logic related to theAsioStream singleton pointer (now gets set in OpenStream and cleared in CloseStream. added callback-completion waiting to StopStream (was only in AbortStream before). cleaned up isStopped/isActive logic
gordon_gidluck [Sun, 5 Oct 2008 15:14:25 +0000 (15:14 +0000)]
ticket #84. Fix for Cygwin. Added a #define called CREATE_THREAD. Cygwin will call CreateThread, whereas other dev environments will generate code to call _beginthreadex. endthreadex was handled in the same way.