Changeset 70994 in vbox for trunk/src/VBox/Devices/Audio
- Timestamp:
- Feb 13, 2018 11:18:31 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DrvHostPulseAudio.cpp
r69118 r70994 5 5 6 6 /* 7 * Copyright (C) 2006-201 7Oracle Corporation7 * Copyright (C) 2006-2018 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 94 94 * Specify UINT32_MAX for unlimited logging. */ 95 95 uint32_t cLogErrors; 96 /** The stream (base) name; needed for distinguishing 97 * streams in the PulseAudio mixer controls if multiple 98 * VMs are running at the same time. */ 99 char szStreamName[64]; 96 100 } DRVHOSTPULSEAUDIO, *PDRVHOSTPULSEAUDIO; 97 101 … … 758 762 pStreamPA->BufAttr.tlength, pStreamPA->BufAttr.maxlength, pStreamPA->BufAttr.minreq)); 759 763 764 Assert(pCfgReq->enmDir == PDMAUDIODIR_OUT); 765 766 char szName[256]; 767 RTStrPrintf2(szName, sizeof(szName), "VirtualBox %s [%s]", 768 DrvAudioHlpPlaybackDstToStr(pCfgReq->DestSource.Dest), pThis->szStreamName); 769 760 770 /* Note that the struct BufAttr is updated to the obtained values after this call! */ 761 int rc = paStreamOpen(pThis, pStreamPA, false /* fIn */, "PulseAudio (Out)");771 int rc = paStreamOpen(pThis, pStreamPA, false /* fIn */, szName); 762 772 if (RT_FAILURE(rc)) 763 773 return rc; … … 800 810 pStreamPA->BufAttr.maxlength = (pStreamPA->BufAttr.fragsize * 3) / 2; 801 811 812 Assert(pCfgReq->enmDir == PDMAUDIODIR_IN); 813 814 char szName[256]; 815 RTStrPrintf2(szName, sizeof(szName), "VirtualBox %s [%s]", 816 DrvAudioHlpRecSrcToStr(pCfgReq->DestSource.Source), pThis->szStreamName); 817 802 818 /* Note: Other members of BufAttr are ignored for record streams. */ 803 int rc = paStreamOpen(pThis, pStreamPA, true /* fIn */, "PulseAudio (In)");819 int rc = paStreamOpen(pThis, pStreamPA, true /* fIn */, szName); 804 820 if (RT_FAILURE(rc)) 805 821 return rc; … … 1577 1593 1578 1594 1579 1580 1595 /** 1581 1596 * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamGetStatus} … … 1664 1679 /* IHostAudio */ 1665 1680 PDMAUDIO_IHOSTAUDIO_CALLBACKS(drvHostPulseAudio); 1681 1682 int rc2 = CFGMR3QueryString(pCfg, "StreamName", pThis->szStreamName, sizeof(pThis->szStreamName)); 1683 AssertMsgRCReturn(rc2, ("Confguration error: No/bad \"StreamName\" value, rc=%Rrc\n", rc2), rc2); 1666 1684 1667 1685 return VINF_SUCCESS;
Note:
See TracChangeset
for help on using the changeset viewer.