Commit graph

310 commits

Author SHA1 Message Date
dmitrykos
0b75c266df fixed ASIO thiscall resolver for GCC 4.+: CALL_THISCALL_1_DOUBLE was failing due to strong optimization of GCC compiler, added EDX in clobbered register list to warn GCC that resolver uses it explicitly 2010-04-11 16:13:46 +00:00
dmitrykos
94c7f9a355 wasapi:
- fixed AUDCLNT_E_INVALID_DEVICE_PERIOD under Windows 7 if latency is set to lower than minimal device period
 - fixed AUDCLNT_E_INVALID_DEVICE_PERIOD under Windows 7 if latency for Exclusive mode is higher than 500ms, for Shared mode higher than 2000ms
2010-04-11 16:04:21 +00:00
dmitrykos
6afe78328f excluded x86-64 platform from ASIO 'thiscall' resolver as x64 ABI does not have 'thiscall' calling convention anymore 2010-04-07 21:07:55 +00:00
dmitrykos
d714962621 wasapi:
- fixed int24 Mono to Stereo mixer (affects Mono streams starting in Exclusive mode)
pa_converters: 
 - avoid using 64-bit integer math for Int24_To_Float32 and Int24_To_Int32 under x64 Posix platforms (long is 64-bit there), now using explicit PaInt32 type
2010-03-25 23:27:27 +00:00
dmitrykos
14a79e0e89 wasapi:
- fixed bug when Exclusive mode was wrongly opening Stereo stream if Mono stream was requested (note: WASAPI device usually does not support Mono in Exclusive mode), resulted in distorted sound
 - implemented workaround for WASAPI limitation - in Exclusive mode Mono stream is not supported: now PA creates internal audio device in Stereo mode, and after callback call Mono data is mixed into Stereo output, this workaround is not supported for Blocking mode. all this is done transparent for user, automatically.
2010-03-24 19:08:38 +00:00
dmitrykos
4f26695b77 maccore: fixed MacOSX "Snow Leopard" 10.6+ deadlock on sample-rate change submitted by Olivier Tristan
and Stephane Letz with the following details:
"When using paMacCoreChangeDeviceParameters option of PaMacCore_SetupStreamInfo, if the sample rate used in PortAudio do not match the one on the hardware, it automatically switches the hardware samplerate. This functionality stopped working on 10.6 and was blocking the application when trying to change the hardware samplerate (infinite wait) It now works fine on 10.6 as it used to on previous OSX version."
2010-03-18 11:26:47 +00:00
dmitrykos
4ba123be9a wasapi: small corrections to improve CoInitialize/CoUninitialize sequence (taken from DS implementation) 2010-03-17 10:37:29 +00:00
dmitrykos
5cf34acdbd updated 'configure' file, many thanks to Stelios Bounanos for generating it 2010-03-16 12:23:13 +00:00
dmitrykos
bf5addedfe wasapi: removed excessive argument checks in stream management functions 2010-03-14 17:25:48 +00:00
dmitrykos
f65b1391e5 wasapi: improved parameter checks for blocking API 2010-03-13 19:13:06 +00:00
dmitrykos
1657fc17d6 wasapi: fixed extension functions: PaWasapi_GetDeviceDefaultFormat / PaWasapi_GetDeviceRole - device index was misinterpreted and as a result returning value was mismatched 2010-03-13 18:53:40 +00:00
dmitrykos
e4c126aab1 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 2010-03-10 21:47:01 +00:00
dmitrykos
b728aecfc0 wasapi: fixed portaudio.vcproj (wrong filename) 2010-03-10 15:03:22 +00:00
dmitrykos
f7a1faa129 wasapi: finished changes of include names for case-sensitive build env. 2010-03-09 15:33:20 +00:00
dmitrykos
adf6d82720 wasapi: renaming file 2010-03-09 15:27:21 +00:00
dmitrykos
15c1e916d4 wasapi: renaming file 2010-03-09 15:26:45 +00:00
dmitrykos
2b64a28af4 wasapi: renaming file 2010-03-09 15:26:05 +00:00
dmitrykos
e945e73ff7 wasapi: renaming file 2010-03-09 15:25:18 +00:00
dmitrykos
dca668d9a4 wasapi: renaming file 2010-03-09 15:24:25 +00:00
dmitrykos
50c880c015 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
2010-03-09 12:29:36 +00:00
dmitrykos
b5e74653c1 wasapi:
- improved debug log output: function name which returned error will be displayed as well
- fixed non-critical compiler warnings
2010-03-08 10:33:58 +00:00
dmitrykos
779ef401ac 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 2010-03-04 11:02:06 +00:00
dmitrykos
dcf2adaab7 +++ 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
2010-03-03 22:57:16 +00:00
dmitrykos
33e54c8adf +++ 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) 2010-03-02 19:08:13 +00:00
dmitrykos
84cdf84588 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)
2010-03-02 17:42:36 +00:00
dmitrykos
885ae2d3f3 fixed dummy compilation of pa_win_wasapi.cpp using MinGW(GCC) compilers by adding missing Avrt type 2010-03-02 12:17:03 +00:00
dmitrykos
bb8331b47d +++ wasapi: Event-driven/Full-Duplex/Exclusive mode will be calling user-provided callbacks simultaneously when both input/output buffers are ready for IO 2010-02-26 08:57:44 +00:00
rossb
e9a5e27f3c changed buffer sizes 2010-02-22 16:29:48 +00:00
rossb
86c4016aa0 added test for wmme low level latency params 2010-02-22 16:07:56 +00:00
dmitrykos
d2e38acc08 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 2010-02-20 12:03:57 +00:00
dmitrykos
15aeb7c1c0 wasapi: fixed capturing callback not called if paWinWasapiPolling flag specified, or WOW64 workaround is used, same bug was causing div/0 crash 2010-02-20 11:55:20 +00:00
dmitrykos
89406b53db 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.
2010-02-19 11:16:01 +00:00
dmitrykos
75e59cb874 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. 2010-02-17 10:11:40 +00:00
dmitrykos
8185016b2a fixed crash on NULL pointer usage if hostApiSpecificStreamInfo was NULL in Pa_OpenStream method 2010-02-16 11:52:19 +00:00
dmitrykos
558ae4f2f4 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. 2010-02-16 11:18:52 +00:00
dmitrykos
01a0391237 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.
2010-02-16 09:46:08 +00:00
dmitrykos
5d2f633442 justtesting 2010-02-10 18:10:18 +00:00
philburk
89f834ce0b justtesting 2010-02-10 18:05:40 +00:00
rossb
1aaa8dab51 fix for undefined DirectSoundFullDuplex8 when PAWIN_USE_DIRECTSOUNDFULLDUPLEXCREATE wasn't defined. thanks Dmitry 2010-02-03 00:28:29 +00:00
rossb
fa4ad81354 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. 2010-02-02 09:01:13 +00:00
rossb
d9af10e0c9 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) 2010-01-24 13:17:31 +00:00
rossb
a5c6383fb7 reset oscillator phase at start of each test cycle so that the onsets sound the same 2010-01-24 12:35:36 +00:00
rossb
3cc8ec291c removed hardwired device number from previous commit 2010-01-24 12:27:31 +00:00
rossb
011c1c0880 DirectSound don't crash when starting a blocking io (non-callback) stream. blocking io still not implemented though. 2010-01-24 12:09:34 +00:00
rossb
64936ef6ee added test case to patest_stop_playout.c which catches issues with host buffers looping/not being cleared if the callback returns paComplete 2010-01-24 11:48:06 +00:00
rossb
0c322e7aba 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. 2010-01-24 11:42:56 +00:00
rossb
91d13a5866 clean up resources better if DirectSound OpenStream fails 2010-01-24 09:34:48 +00:00
rossb
ecd151713f fixes to DirectSound implementation to work in unicode builds 2010-01-24 09:21:50 +00:00
rossb
1349e5a344 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. 2010-01-24 09:20:23 +00:00
rossb
99e0648891 added msvc link pragma to require ksguid.lib 2010-01-24 08:42:02 +00:00