Changeset 68358 in vbox
- Timestamp:
- Aug 9, 2017 3:25:45 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DrvHostPulseAudio.cpp
r68357 r68358 46 46 #define VBOX_PULSEAUDIO_MAX_LOG_REL_ERRORS 32 /** @todo Make this configurable thru driver options. */ 47 47 48 /* Whether to use PulseAudio's asynchronous handling or not. */49 //#define PULSEAUDIO_ASYNC /** @todo Make this configurable thru driver options. */50 51 48 #ifndef PA_STREAM_NOFLAGS 52 49 # define PA_STREAM_NOFLAGS (pa_context_flags_t)0x0000U /* since 0.9.19 */ … … 66 63 ( (PDRVHOSTPULSEAUDIO)((uintptr_t)pInterface - RT_OFFSETOF(DRVHOSTPULSEAUDIO, IHostAudio)) ) 67 64 68 #define PULSEAUDIO_ASYNC69 65 70 66 /********************************************************************************************************************************* … … 191 187 static int paEnumerate(PDRVHOSTPULSEAUDIO pThis, PPDMAUDIOBACKENDCFG pCfg, uint32_t fEnum); 192 188 static int paError(PDRVHOSTPULSEAUDIO pThis, const char *szMsg); 189 #ifdef DEBUG 193 190 static void paStreamCbUnderflow(pa_stream *pStream, void *pvContext); 194 #ifdef PULSEAUDIO_ASYNC 195 static void paStreamCbReqWrite(pa_stream *pStream, size_t cbLen, void *pvContext); 191 static void paStreamCbReqWrite(pa_stream *pStream, size_t cbLen, void *pvContext); 196 192 #endif 197 193 static void paStreamCbSuccess(pa_stream *pStream, int fSuccess, void *pvContext); … … 407 403 408 404 409 #ifdef PULSEAUDIO_ASYNC405 #ifdef DEBUG 410 406 static void paStreamCbReqWrite(pa_stream *pStream, size_t cbLen, void *pvContext) 411 407 { … … 421 417 Log2Func(("Requested %zu bytes -- Current latency is %RU64ms\n", cbLen, usec / 1000)); 422 418 } 423 #endif /* PULSEAUDIO_ASYNC */424 419 425 420 … … 448 443 } 449 444 450 # ifdef LOG_ENABLED445 # ifdef LOG_ENABLED 451 446 pa_usec_t curLatencyUs = 0; 452 447 pa_stream_get_latency(pStream, &curLatencyUs, NULL /* Neg */); … … 460 455 Log2Func(("curPosWrite=%RU64ms, curTs=%RU64ms, curDelta=%RI64ms, curLatency=%RU64ms\n", 461 456 curPosWritesUs / 1000, curTsUs / 1000, (((int64_t)curPosWritesUs - (int64_t)curTsUs) / 1000), curLatencyUs / 1000)); 462 #endif 463 } 464 465 466 #ifdef VBOX_STRICT 457 # endif 458 } 459 460 467 461 static void paStreamCbOverflow(pa_stream *pStream, void *pvContext) 468 462 { … … 471 465 Log2Func(("Warning: Hit overflow\n")); 472 466 } 473 #endif 467 #endif /* DEBUG */ 474 468 475 469 … … 528 522 } 529 523 530 #ifdef PULSEAUDIO_ASYNC524 #ifdef DEBUG 531 525 pa_stream_set_write_callback (pStream, paStreamCbReqWrite, pStreamPA); 532 #endif533 526 pa_stream_set_underflow_callback (pStream, paStreamCbUnderflow, pStreamPA); 534 #ifdef VBOX_STRICT535 527 if (!fIn) /* Only for output streams. */ 536 528 pa_stream_set_overflow_callback(pStream, paStreamCbOverflow, pStreamPA);
Note:
See TracChangeset
for help on using the changeset viewer.