Ticket #132
This commit is contained in:
parent
bc81ee0ed2
commit
59f8c8975c
11 changed files with 682 additions and 180 deletions
|
|
@ -2380,8 +2380,8 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
|||
reports the added latency separately.
|
||||
*/
|
||||
PA_DEBUG(("PaAsio : ASIO InputLatency = %ld (%ld ms),\n added buffProc:%ld (%ld ms),\n added blocking:%ld (%ld ms)\n",
|
||||
stream->inputLatency,
|
||||
(long)( stream->inputLatency * (1000.0 / sampleRate) ),
|
||||
stream->asioInputLatencyFrames,
|
||||
(long)( stream->asioInputLatencyFrames * (1000.0 / sampleRate) ),
|
||||
PaUtil_GetBufferProcessorInputLatency(&stream->bufferProcessor),
|
||||
(long)( PaUtil_GetBufferProcessorInputLatency(&stream->bufferProcessor) * (1000.0 / sampleRate) ),
|
||||
PaUtil_GetBufferProcessorInputLatency(&stream->blockingState->bufferProcessor) + (lBlockingBufferSize / framesPerBuffer - 1) * framesPerBuffer,
|
||||
|
|
@ -2471,8 +2471,8 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
|||
reports the added latency separately.
|
||||
*/
|
||||
PA_DEBUG(("PaAsio : ASIO OutputLatency = %ld (%ld ms),\n added buffProc:%ld (%ld ms),\n added blocking:%ld (%ld ms)\n",
|
||||
stream->outputLatency,
|
||||
(long)( stream->inputLatency * (1000.0 / sampleRate) ),
|
||||
stream->asioOutputLatencyFrames,
|
||||
(long)( stream->asioOutputLatencyFrames * (1000.0 / sampleRate) ),
|
||||
PaUtil_GetBufferProcessorOutputLatency(&stream->bufferProcessor),
|
||||
(long)( PaUtil_GetBufferProcessorOutputLatency(&stream->bufferProcessor) * (1000.0 / sampleRate) ),
|
||||
PaUtil_GetBufferProcessorOutputLatency(&stream->blockingState->bufferProcessor) + (lBlockingBufferSize / framesPerBuffer - 1) * framesPerBuffer,
|
||||
|
|
@ -2527,15 +2527,15 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
|||
// the code below prints the ASIO latency which doesn't include the
|
||||
// buffer processor latency. it reports the added latency separately
|
||||
PA_DEBUG(("PaAsio : ASIO InputLatency = %ld (%ld ms), added buffProc:%ld (%ld ms)\n",
|
||||
stream->inputLatency,
|
||||
(long)((stream->inputLatency*1000)/ sampleRate),
|
||||
stream->asioInputLatencyFrames,
|
||||
(long)((stream->asioInputLatencyFrames*1000)/ sampleRate),
|
||||
PaUtil_GetBufferProcessorInputLatency(&stream->bufferProcessor),
|
||||
(long)((PaUtil_GetBufferProcessorInputLatency(&stream->bufferProcessor)*1000)/ sampleRate)
|
||||
));
|
||||
|
||||
PA_DEBUG(("PaAsio : ASIO OuputLatency = %ld (%ld ms), added buffProc:%ld (%ld ms)\n",
|
||||
stream->outputLatency,
|
||||
(long)((stream->outputLatency*1000)/ sampleRate),
|
||||
stream->asioOutputLatencyFrames,
|
||||
(long)((stream->asioOutputLatencyFrames*1000)/ sampleRate),
|
||||
PaUtil_GetBufferProcessorOutputLatency(&stream->bufferProcessor),
|
||||
(long)((PaUtil_GetBufferProcessorOutputLatency(&stream->bufferProcessor)*1000)/ sampleRate)
|
||||
));
|
||||
|
|
|
|||
|
|
@ -41,7 +41,6 @@
|
|||
@ingroup hostapi_src
|
||||
*/
|
||||
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h> /* strlen() */
|
||||
|
|
@ -76,6 +75,9 @@
|
|||
#include "pa_win_waveformat.h"
|
||||
#include "pa_win_wdmks_utils.h"
|
||||
|
||||
#ifndef PA_USE_WMME
|
||||
#error "Portaudio internal error: PA_USE_WMME=0/1 not defined. pa_hostapi.h should ensure that it is."
|
||||
#endif
|
||||
|
||||
#if (defined(WIN32) && (defined(_MSC_VER) && (_MSC_VER >= 1200))) /* MSC version 6 and above */
|
||||
#pragma comment( lib, "dsound.lib" )
|
||||
|
|
@ -678,7 +680,7 @@ static PaError AddOutputDeviceInfoFromDirectSound(
|
|||
else
|
||||
{
|
||||
|
||||
#ifndef PA_NO_WMME
|
||||
#if PA_USE_WMME
|
||||
if( caps.dwFlags & DSCAPS_EMULDRIVER )
|
||||
{
|
||||
/* If WMME supported, then reject Emulated drivers because they are lousy. */
|
||||
|
|
@ -894,7 +896,7 @@ static PaError AddInputDeviceInfoFromDirectSoundCapture(
|
|||
}
|
||||
else
|
||||
{
|
||||
#ifndef PA_NO_WMME
|
||||
#if PA_USE_WMME
|
||||
if( caps.dwFlags & DSCAPS_EMULDRIVER )
|
||||
{
|
||||
/* If WMME supported, then reject Emulated drivers because they are lousy. */
|
||||
|
|
@ -2832,5 +2834,3 @@ static signed long GetStreamWriteAvailable( PaStream* s )
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -106,6 +106,10 @@
|
|||
#define DYNAMIC_GUID(data) DYNAMIC_GUID_THUNK(data)
|
||||
#endif
|
||||
|
||||
#if (defined(WIN32) && (defined(_MSC_VER) && (_MSC_VER >= 1200))) /* MSC version 6 and above */
|
||||
#pragma comment( lib, "setupapi.lib" )
|
||||
#endif
|
||||
|
||||
/* use CreateThread for CYGWIN, _beginthreadex for all others */
|
||||
#ifndef __CYGWIN__
|
||||
#define CREATE_THREAD (HANDLE)_beginthreadex( 0, 0, ProcessingThreadProc, stream, 0, &stream->processingThreadId )
|
||||
|
|
|
|||
Loading…
Reference in a new issue