PaTime buffer_latency;\r
ULONG framesPerHostCallback;\r
PaUtilHostBufferSizeMode bufferMode;\r
+ const BOOL fullDuplex = ((inputParameters != NULL) && (outputParameters != NULL));\r
\r
// validate PaStreamParameters\r
if ((result = IsStreamParamsValid(hostApi, inputParameters, outputParameters, sampleRate)) != paNoError)\r
if ((inputStreamInfo != NULL) && (inputStreamInfo->flags & paWinWasapiPolling))\r
stream->in.streamFlags = 0; // polling interface\r
else\r
- if (outputParameters != NULL)\r
+ if (fullDuplex)\r
stream->in.streamFlags = 0; // polling interface is implemented for full-duplex mode also\r
\r
// Create Audio client\r
if ((outputStreamInfo != NULL) && (outputStreamInfo->flags & paWinWasapiPolling))\r
stream->out.streamFlags = 0; // polling interface\r
else\r
- if (inputParameters != NULL)\r
+ if (fullDuplex)\r
stream->out.streamFlags = 0; // polling interface is implemented for full-duplex mode also\r
\r
// Create Audio client\r
outputSampleFormat = hostOutputSampleFormat = paInt16; /* Surpress 'uninitialized var' warnings. */\r
}\r
\r
- // og full-duplex\r
- if ((inputParameters != NULL) && (outputParameters != NULL))\r
+ // log full-duplex\r
+ if (fullDuplex)\r
PRINT(("WASAPI::OpenStream: full-duplex mode\n"));\r
\r
// paWinWasapiPolling must be on/or not on both streams\r
goto error;\r
}\r
\r
- // serious problem #2\r
- if (stream->out.framesPerHostCallback != stream->in.framesPerHostCallback)\r
+ // serious problem #2 - No, Not a problem, as framesPerHostCallback take into account\r
+ // sample size while it is not a problem for PA full-duplex, we must care of\r
+ // preriod only!\r
+ /*if (stream->out.framesPerHostCallback != stream->in.framesPerHostCallback)\r
{\r
PRINT(("WASAPI: OpenStream: framesPerHostCallback discrepancy\n"));\r
goto error;\r
- }\r
+ }*/\r
}\r
\r
framesPerHostCallback = (outputParameters) ? stream->out.framesPerHostCallback:\r