Changeset 88359 in vbox
- Timestamp:
- Apr 4, 2021 11:51:06 PM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 143606
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/pdmaudioifs.h
r88358 r88359 1451 1451 #define PDMIHOSTAUDIO_IID "be34182b-d579-41e8-96e0-abb94900460f" 1452 1452 1453 1454 /** Pointer to a audio notify from host interface. */ 1455 typedef struct PDMIAUDIONOTIFYFROMHOST *PPDMIAUDIONOTIFYFROMHOST; 1456 1457 /** 1458 * PDM audio notification interface, for use by host audio. 1459 * 1460 * @todo better name? 1461 */ 1462 typedef struct PDMIAUDIONOTIFYFROMHOST 1463 { 1464 /** 1465 * One or more audio devices have changed in some way. 1466 * 1467 * The upstream driver/device should re-evaluate the devices they're using. 1468 * 1469 * @param pInterface Pointer to this interface. 1470 */ 1471 DECLR3CALLBACKMEMBER(void, pfnNotifyDevicesChanged,(PPDMIAUDIONOTIFYFROMHOST pInterface)); 1472 } PDMIAUDIONOTIFYFROMHOST; 1473 1474 /** PDMIAUDIONOTIFYFROMHOST interface ID. */ 1475 #define PDMIAUDIONOTIFYFROMHOST_IID "ec10f36b-ec2d-4b97-9044-2a59fba837ad" 1476 1453 1477 /** @} */ 1454 1478 -
trunk/src/VBox/Devices/Audio/DrvAudio.cpp
r88358 r88359 278 278 /** Our audio connector interface. */ 279 279 PDMIAUDIOCONNECTOR IAudioConnector; 280 #ifdef VBOX_WITH_AUDIO_CALLBACKS 281 /** Interface used by the host backend. */ 282 PDMIAUDIONOTIFYFROMHOST IAudioNotifyFromHost; 283 #endif 280 284 /** Pointer to the driver instance. */ 281 285 PPDMDRVINS pDrvIns; … … 836 840 * The actual re-initialization will happen at some later point in time. 837 841 * 838 * @returns VBox status code.839 842 * @param pThis Pointer to driver instance. 840 843 */ 841 static int drvAudioScheduleReInitInternal(PDRVAUDIO pThis) 842 { 843 AssertPtrReturn(pThis, VERR_INVALID_POINTER); 844 844 static void drvAudioScheduleReInitInternal(PDRVAUDIO pThis) 845 { 845 846 LogFunc(("\n")); 846 847 … … 858 859 pThis->fEnumerateDevices = true; 859 860 # endif 860 861 return VINF_SUCCESS;862 861 } 863 862 #endif /* VBOX_WITH_AUDIO_CALLBACKS */ … … 1938 1937 case PDMAUDIOBACKENDCBTYPE_DEVICES_CHANGED: 1939 1938 LogRel(("Audio: Device configuration of driver '%s' has changed\n", pThis->szName)); 1940 rc =drvAudioScheduleReInitInternal(pThis);1939 drvAudioScheduleReInitInternal(pThis); 1941 1940 break; 1942 1941 … … 3406 3405 3407 3406 3407 #ifdef VBOX_WITH_AUDIO_CALLBACKS 3408 /********************************************************************************************************************************* 3409 * PDMIAUDIONOTIFYFROMHOST interface implementation. * 3410 *********************************************************************************************************************************/ 3411 3412 /** 3413 * @interface_method_impl{PDMIAUDIONOTIFYFROMHOST,pfnNotifyDevicesChanged} 3414 */ 3415 static DECLCALLBACK(void) drvAudioNotifyFromHost_NotifyDevicesChanged(PPDMIAUDIONOTIFYFROMHOST pInterface) 3416 { 3417 PDRVAUDIO pThis = RT_FROM_MEMBER(pInterface, DRVAUDIO, IAudioNotifyFromHost); 3418 3419 LogRel(("Audio: Device configuration of driver '%s' has changed\n", pThis->szName)); 3420 drvAudioScheduleReInitInternal(pThis); 3421 } 3422 3423 #endif /* VBOX_WITH_AUDIO_CALLBACKS */ 3424 3425 3408 3426 /********************************************************************************************************************************* 3409 3427 * PDMIBASE interface implementation. * … … 3422 3440 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase); 3423 3441 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIAUDIOCONNECTOR, &pThis->IAudioConnector); 3442 #ifdef VBOX_WITH_AUDIO_CALLBACKS 3443 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIAUDIONOTIFYFROMHOST, &pThis->IAudioNotifyFromHost); 3444 #endif 3424 3445 3425 3446 return NULL; … … 3848 3869 pThis->IAudioConnector.pfnStreamPlay = drvAudioStreamPlay; 3849 3870 pThis->IAudioConnector.pfnStreamCapture = drvAudioStreamCapture; 3871 #ifdef VBOX_WITH_AUDIO_CALLBACKS 3872 /* IAudioNotifyFromHost */ 3873 pThis->IAudioNotifyFromHost.pfnNotifyDevicesChanged = drvAudioNotifyFromHost_NotifyDevicesChanged; 3874 #endif 3850 3875 3851 3876 /*
Note:
See TracChangeset
for help on using the changeset viewer.