Changeset 73529 in vbox for trunk/include
- Timestamp:
- Aug 6, 2018 4:26:43 PM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 124158
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/pdmaudioifs.h
r73467 r73529 511 511 typedef struct PDMAUDIOPCMPROPS 512 512 { 513 /** Sample width . Bits per sample. */514 uint8_t cB its;513 /** Sample width (in bytes). */ 514 uint8_t cBytes; 515 515 /** Number of audio channels. */ 516 516 uint8_t cChannels; … … 535 535 536 536 /** Initializor for PDMAUDIOPCMPROPS. */ 537 #define PDMAUDIOPCMPROPS_INITIALIZOR(a_cB its, a_fSigned, a_cCannels, a_uHz, a_cShift, a_fSwapEndian) \538 { a_cB its, a_cCannels, a_cShift, a_fSigned, a_fSwapEndian, a_uHz }537 #define PDMAUDIOPCMPROPS_INITIALIZOR(a_cBytes, a_fSigned, a_cCannels, a_uHz, a_cShift, a_fSwapEndian) \ 538 { a_cBytes, a_cCannels, a_cShift, a_fSigned, a_fSwapEndian, a_uHz } 539 539 /** Calculates the cShift value of given sample bits and audio channels. 540 540 * Note: Does only support mono/stereo channels for now. */ 541 #define PDMAUDIOPCMPROPS_MAKE_SHIFT_PARMS(cB its, cChannels) ((cChannels == 2) + (cBits / 16))541 #define PDMAUDIOPCMPROPS_MAKE_SHIFT_PARMS(cBytes, cChannels) ((cChannels == 2) + (cBytes / 2)) 542 542 /** Calculates the cShift value of a PDMAUDIOPCMPROPS structure. */ 543 #define PDMAUDIOPCMPROPS_MAKE_SHIFT(pProps) PDMAUDIOPCMPROPS_MAKE_SHIFT_PARMS((pProps)->cB its, (pProps)->cChannels)543 #define PDMAUDIOPCMPROPS_MAKE_SHIFT(pProps) PDMAUDIOPCMPROPS_MAKE_SHIFT_PARMS((pProps)->cBytes, (pProps)->cChannels) 544 544 /** Converts (audio) frames to bytes. 545 545 * Needs the cShift value set correctly, using PDMAUDIOPCMPROPS_MAKE_SHIFT. */
Note:
See TracChangeset
for help on using the changeset viewer.