Changeset 58983 in vbox for trunk/include/VBox
- Timestamp:
- Dec 4, 2015 2:15:30 PM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 104507
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/pdmaudioifs.h
r58600 r58983 309 309 /** No flags being set. */ 310 310 #define PDMAUDIOSTRMSTS_FLAG_NONE 0 311 /** Whether this stream General Enabled or disabled flag. */311 /** Whether this stream is enabled or disabled. */ 312 312 #define PDMAUDIOSTRMSTS_FLAG_ENABLED RT_BIT_32(0) 313 313 /** Whether this stream has been paused or not. This also implies … … 422 422 /** Pointer to a audio connector interface. */ 423 423 typedef struct PDMIAUDIOCONNECTOR *PPDMIAUDIOCONNECTOR; 424 425 #ifdef VBOX_WITH_AUDIO_CALLBACKS 426 /** 427 * Audio callback types. These are all kept generic as those 428 * are used by all device emulations across all backends. 429 */ 430 typedef enum PDMAUDIOCALLBACKTYPE 431 { 432 PDMAUDIOCALLBACKTYPE_GENERIC = 0, 433 PDMAUDIOCALLBACKTYPE_INPUT, 434 PDMAUDIOCALLBACKTYPE_OUTPUT 435 } PDMAUDIOCALLBACKTYPE; 436 437 /** 438 * Callback data for audio input. 439 */ 440 typedef struct PDMAUDIOCALLBACKDATAIN 441 { 442 /** Input: How many bytes are availabe as input for passing 443 * to the device emulation. */ 444 uint32_t cbInAvail; 445 /** Output: How many bytes have been read. */ 446 uint32_t cbOutRead; 447 } PDMAUDIOCALLBACKDATAIN, *PPDMAUDIOCALLBACKDATAIN; 448 449 /** 450 * Callback data for audio output. 451 */ 452 typedef struct PDMAUDIOCALLBACKDATAOUT 453 { 454 /** Input: How many bytes are free for the device emulation to write. */ 455 uint32_t cbInFree; 456 /** Output: How many bytes were written by the device emulation. */ 457 uint32_t cbOutWritten; 458 } PDMAUDIOCALLBACKDATAOUT, *PPDMAUDIOCALLBACKDATAOUT; 459 460 /** 461 * Structure for keeping an audio callback. 462 */ 463 typedef struct PDMAUDIOCALLBACK 464 { 465 RTLISTANCHOR Node; 466 PDMAUDIOCALLBACKTYPE enmType; 467 void *pvCtx; 468 size_t cbCtx; 469 DECLR3CALLBACKMEMBER(int, pfnCallback, (PDMAUDIOCALLBACKTYPE enmType, void *pvCtx, size_t cbCtx, void *pvUser, size_t cbUser)); 470 } PDMAUDIOCALLBACK, *PPDMAUDIOCALLBACK; 471 #endif 472 424 473 /** 425 474 * Audio connector interface (up). … … 436 485 * @param pGstStrmIn Pointer to guest input stream to write to. 437 486 * @param pvBuf Where to store the read data. 438 * @param cb SizeNumber of bytes to read.487 * @param cbBuf Number of bytes to read. 439 488 * @param pcbRead Bytes of audio data read. Optional. 440 489 */ 441 DECLR3CALLBACKMEMBER(int, pfnRead, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOGSTSTRMIN pGstStrmIn, void *pvBuf, uint32_t cb Size, uint32_t *pcbRead));490 DECLR3CALLBACKMEMBER(int, pfnRead, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOGSTSTRMIN pGstStrmIn, void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead)); 442 491 443 492 /** … … 448 497 * @param pGstStrmOut Pointer to guest output stream to read from. 449 498 * @param pvBuf Audio data to be written. 450 * @param cb SizeNumber of bytes to be written.499 * @param cbBuf Number of bytes to be written. 451 500 * @param pcbWritten Bytes of audio data written. Optional. 452 501 */ 453 DECLR3CALLBACKMEMBER(int, pfnWrite, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOGSTSTRMOUT pGstStrmOut, const void *pvBuf, uint32_t cb Size, uint32_t *pcbWritten));502 DECLR3CALLBACKMEMBER(int, pfnWrite, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOGSTSTRMOUT pGstStrmOut, const void *pvBuf, uint32_t cbBuf, uint32_t *pcbWritten)); 454 503 455 504 /** … … 568 617 DECLR3CALLBACKMEMBER(int, pfnPlayOut, (PPDMIAUDIOCONNECTOR pInterface, uint32_t *pcSamplesPlayed)); 569 618 619 #ifdef VBOX_WITH_AUDIO_CALLBACKS 620 DECLR3CALLBACKMEMBER(int, pfnRegisterCallbacks, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOCALLBACK paCallbacks, size_t cCallbacks)); 621 DECLR3CALLBACKMEMBER(int, pfnCallback, (PPDMIAUDIOCONNECTOR pInterface, PDMAUDIOCALLBACKTYPE enmType, void *pvUser, size_t cbUser)); 622 #endif 623 570 624 } PDMIAUDIOCONNECTOR; 571 625 … … 575 629 576 630 /** 577 * Assign all needed interface callbacks for an audio backend.631 * Assigns all needed interface callbacks for an audio backend. 578 632 * 579 633 * @param a_NamePrefix The function name prefix.
Note:
See TracChangeset
for help on using the changeset viewer.