Changeset 88278 in vbox
- Timestamp:
- Mar 24, 2021 1:54:00 PM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 143483
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/pdmaudioifs.h
r88269 r88278 694 694 /** The frame size. */ 695 695 uint8_t cbFrame; 696 /** Sample width (in bytes). */697 uint8_t cbSampleX : 4;698 /** Number of audio channels. */699 uint8_t cChannelsX : 4;700 696 /** Shift count used with PDMAUDIOPCMPROPS_F2B and PDMAUDIOPCMPROPS_B2F. 701 697 * Depends on number of stream channels and the stream format being used, calc … … 703 699 * @sa PDMAUDIOSTREAMCFG_B2F, PDMAUDIOSTREAMCFG_F2B */ 704 700 uint8_t cShiftX; 701 /** Sample width (in bytes). */ 702 RT_GCC_EXTENSION 703 uint8_t cbSampleX : 4; 704 /** Number of audio channels. */ 705 RT_GCC_EXTENSION 706 uint8_t cChannelsX : 4; 705 707 /** Signed or unsigned sample. */ 706 708 bool fSigned : 1; … … 723 725 /** Initializer for PDMAUDIOPCMPROPS. */ 724 726 #define PDMAUDIOPCMPROPS_INITIALIZER(a_cbSample, a_fSigned, a_cChannels, a_uHz, a_fSwapEndian) \ 725 { (a_cbSample) * (a_cChannels), a_cbSample, a_cChannels, PDMAUDIOPCMPROPS_MAKE_SHIFT_PARMS(a_cbSample, a_cChannels), \727 { (a_cbSample) * (a_cChannels), PDMAUDIOPCMPROPS_MAKE_SHIFT_PARMS(a_cbSample, a_cChannels), a_cbSample, a_cChannels, \ 726 728 a_fSigned, a_fSwapEndian, false /*fRaw*/, a_uHz } 727 729 /** Calculates the cShift value of given sample bits and audio channels. -
trunk/src/VBox/Devices/Audio/DrvAudio.cpp
r88269 r88278 1647 1647 * Do the playing if we decided to play something. 1648 1648 */ 1649 int rc = VINF_SUCCESS;1649 int rc; 1650 1650 if (cFramesToPlay) 1651 1651 { … … 1653 1653 pThis->pHostDrvAudio->pfnStreamPlayBegin(pThis->pHostDrvAudio, pStream->pvBackend); 1654 1654 1655 /** @todo r=bird: I don't honestly see any difference in interleaved,1656 * non-interrleaved, raw, complicate, or whatever frame format we're1657 * dealing with here. We'll be formatting a chunk of audio data and feed1658 * it to the backend, the formatting is taken care of by the mixer and1659 * we don't really care about the format anywhere here.1660 *1661 * Raw audio is just stereo S64, btw. Since drvAudioStreamPlayRaw1662 * actually copies the mixer data instead of accessing the internal mixer1663 * buffer directly, there is no advantage to having separate code paths1664 * here. It only leads to more incomplete crappy code (I find the code1665 * quality quite appaling, given the amount of time spent on it).1666 *1667 * What's more, I think the non-interleaved designation here is wrong1668 * anyway. Non-interleaved means a stereo chunk of 8 frames is1669 * formatted:1670 * - LLLLLLLLRRRRRRRR1671 * whereas I'm pretty darn sure we do:1672 * - LRLRLRLRLRLRLRLR1673 * given that the mixer doesn't know how to output the former. See the1674 * audioMixBufConvTo##a_Name##Stereo() code, it clearly output LR pairs.1675 *1676 * https://stackoverflow.com/questions/17879933/whats-the-interleaved-audio1677 */1678 1655 rc = drvAudioStreamPlayDoIt(pThis, pStream, cFramesToPlay, pcFramesPlayed); 1679 1656 … … 1683 1660 pStream->tsLastPlayedCapturedNs = RTTimeNanoTS(); 1684 1661 } 1662 else 1663 rc = VINF_SUCCESS; 1685 1664 1686 1665 Log3Func(("[%s] Live=%RU32 fr (%RU64 ms) Period=%RU32 fr (%RU64 ms) Writable=%RU32 fr (%RU64 ms) -> ToPlay=%RU32 fr (%RU64 ms) Played=%RU32 fr (%RU64 ms)%s\n",
Note:
See TracChangeset
for help on using the changeset viewer.