Changeset 65636 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Feb 7, 2017 10:21:21 AM (8 years ago)
- Location:
- trunk/src/VBox/Devices/Audio
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DrvAudio.h
r65624 r65636 158 158 bool DrvAudioHlpPCMPropsAreEqual(PPDMAUDIOPCMPROPS pPCMProps1, PPDMAUDIOPCMPROPS pPCMProps2); 159 159 bool DrvAudioHlpPCMPropsAreEqual(PPDMAUDIOPCMPROPS pPCMProps, PPDMAUDIOSTREAMCFG pCfg); 160 bool DrvAudioHlpPCMPropsAreValid(const PPDMAUDIOPCMPROPS pProps); 160 161 int DrvAudioHlpPCMPropsToStreamCfg(PPDMAUDIOPCMPROPS pPCMProps, PPDMAUDIOSTREAMCFG pCfg); 161 162 const char *DrvAudioHlpRecSrcToStr(PDMAUDIORECSOURCE enmRecSource); -
trunk/src/VBox/Devices/Audio/DrvAudioCommon.cpp
r65624 r65636 783 783 784 784 /** 785 * Checks whether the given PCM properties are equal with the given 786 * stream configuration. 787 * 788 * @returns @c true if equal, @c false if not. 789 * @param pProps PCM properties to compare. 790 * @param pCfg Stream configuration to compare. 791 */ 792 bool DrvAudioHlpPCMPropsAreEqual(PPDMAUDIOPCMPROPS pProps, PPDMAUDIOSTREAMCFG pCfg) 793 { 794 AssertPtrReturn(pProps, false); 795 AssertPtrReturn(pCfg, false); 796 797 return DrvAudioHlpPCMPropsAreEqual(pProps, &pCfg->Props); 798 } 799 800 /** 801 * Converts PCM properties to a audio stream configuration. 802 * 803 * @return IPRT status code. 804 * @param pPCMProps Pointer to PCM properties to convert. 805 * @param pCfg Pointer to audio stream configuration to store result into. 806 */ 807 int DrvAudioHlpPCMPropsToStreamCfg(PPDMAUDIOPCMPROPS pPCMProps, PPDMAUDIOSTREAMCFG pCfg) 808 { 809 AssertPtrReturn(pPCMProps, VERR_INVALID_POINTER); 810 AssertPtrReturn(pCfg, VERR_INVALID_POINTER); 811 812 memcpy(&pCfg->Props, pPCMProps, sizeof(PDMAUDIOPCMPROPS)); 813 return VINF_SUCCESS; 814 } 815 816 /** 817 * Checks whether a given stream configuration is valid or not. 818 * 819 * Returns @c true if configuration is valid, @c false if not. 820 * @param pCfg Stream configuration to check. 785 * Checks whether given PCM properties are valid or not. 786 * 787 * Returns @c true if properties are valid, @c false if not. 788 * @param pProps PCM properties to check. 821 789 * 822 790 * @remarks Does *not* support surround (> 2 channels) yet! This is intentional, as 823 791 * we consider surround support as experimental / not enabled by default for now. 824 792 */ 825 bool DrvAudioHlpStreamCfgIsValid(const PPDMAUDIOSTREAMCFG pCfg) 826 { 827 AssertPtrReturn(pCfg, false); 828 829 bool fValid = ( pCfg->Props.cChannels == 1 830 || pCfg->Props.cChannels == 2); /* Either stereo (2) or mono (1), per stream. */ 831 832 fValid |= ( pCfg->enmDir == PDMAUDIODIR_IN 833 || pCfg->enmDir == PDMAUDIODIR_OUT); 793 bool DrvAudioHlpPCMPropsAreValid(const PPDMAUDIOPCMPROPS pProps) 794 { 795 AssertPtrReturn(pProps, false); 796 797 bool fValid = ( pProps->cChannels == 1 798 || pProps->cChannels == 2); /* Either stereo (2) or mono (1), per stream. */ 834 799 835 800 if (fValid) 836 801 { 837 switch (p Cfg->Props.cBits)802 switch (pProps->cBits) 838 803 { 839 804 case 8: … … 851 816 return false; 852 817 853 fValid |= pCfg->Props.uHz > 0; 854 fValid |= pCfg->Props.cShift == PDMAUDIOPCMPROPS_MAKE_SHIFT_PARMS(pCfg->Props.cBits, pCfg->Props.cChannels); 855 856 fValid |= pCfg->Props.fSwapEndian == false; /** @todo Handling Big Endian audio data is not supported yet. */ 818 fValid |= pProps->uHz > 0; 819 fValid |= pProps->cShift == PDMAUDIOPCMPROPS_MAKE_SHIFT_PARMS(pProps->cBits, pProps->cChannels); 820 821 fValid |= pProps->fSwapEndian == false; /** @todo Handling Big Endian audio data is not supported yet. */ 822 823 return fValid; 824 } 825 826 /** 827 * Checks whether the given PCM properties are equal with the given 828 * stream configuration. 829 * 830 * @returns @c true if equal, @c false if not. 831 * @param pProps PCM properties to compare. 832 * @param pCfg Stream configuration to compare. 833 */ 834 bool DrvAudioHlpPCMPropsAreEqual(PPDMAUDIOPCMPROPS pProps, PPDMAUDIOSTREAMCFG pCfg) 835 { 836 AssertPtrReturn(pProps, false); 837 AssertPtrReturn(pCfg, false); 838 839 return DrvAudioHlpPCMPropsAreEqual(pProps, &pCfg->Props); 840 } 841 842 /** 843 * Converts PCM properties to a audio stream configuration. 844 * 845 * @return IPRT status code. 846 * @param pPCMProps Pointer to PCM properties to convert. 847 * @param pCfg Pointer to audio stream configuration to store result into. 848 */ 849 int DrvAudioHlpPCMPropsToStreamCfg(PPDMAUDIOPCMPROPS pPCMProps, PPDMAUDIOSTREAMCFG pCfg) 850 { 851 AssertPtrReturn(pPCMProps, VERR_INVALID_POINTER); 852 AssertPtrReturn(pCfg, VERR_INVALID_POINTER); 853 854 memcpy(&pCfg->Props, pPCMProps, sizeof(PDMAUDIOPCMPROPS)); 855 return VINF_SUCCESS; 856 } 857 858 /** 859 * Checks whether a given stream configuration is valid or not. 860 * 861 * Returns @c true if configuration is valid, @c false if not. 862 * @param pCfg Stream configuration to check. 863 * 864 * @remarks Does *not* support surround (> 2 channels) yet! This is intentional, as 865 * we consider surround support as experimental / not enabled by default for now. 866 */ 867 bool DrvAudioHlpStreamCfgIsValid(const PPDMAUDIOSTREAMCFG pCfg) 868 { 869 AssertPtrReturn(pCfg, false); 870 871 bool fValid = ( pCfg->enmDir == PDMAUDIODIR_IN 872 || pCfg->enmDir == PDMAUDIODIR_OUT); 873 874 if (fValid) 875 fValid = DrvAudioHlpPCMPropsAreValid(&pCfg->Props); 857 876 858 877 return fValid; -
trunk/src/VBox/Devices/Audio/testcase/tstAudioMixBuffer.cpp
r65635 r65636 41 41 RTTestSubF(hTest, "Single buffer"); 42 42 43 PDMAUDIOSTREAMCFG config = 44 { 45 "44100Hz, 2 Channels, S16", 46 PDMAUDIODIR_OUT, 47 { PDMAUDIOPLAYBACKDEST_UNKNOWN }, 48 { 16, /* Bits */ 49 true, /* Signed */ 50 PDMAUDIOPCMPROPS_MAKE_SHIFT_PARMS(16 /* Bits */, 2 /* Channels */), /* Shift */ 51 2, /* Channels */ 52 44100, /* Hz */ 53 false /* Swap Endian */ }, 54 0 /* cSampleBufferSize */ 55 }; 56 57 RTTESTI_CHECK(DrvAudioHlpStreamCfgIsValid(&config)); 43 /* 44100Hz, 2 Channels, S16 */ 44 PDMAUDIOPCMPROPS config = 45 { 46 16, /* Bits */ 47 true, /* Signed */ 48 PDMAUDIOPCMPROPS_MAKE_SHIFT_PARMS(16 /* Bits */, 2 /* Channels */), /* Shift */ 49 2, /* Channels */ 50 44100, /* Hz */ 51 false /* Swap Endian */ 52 }; 53 54 RTTESTI_CHECK(DrvAudioHlpPCMPropsAreValid(&config)); 58 55 59 56 uint32_t cBufSize = _1K; … … 63 60 */ 64 61 PDMAUDIOMIXBUF mb; 65 RTTESTI_CHECK_RC_OK(AudioMixBufInit(&mb, "Single", &config .Props, cBufSize));62 RTTESTI_CHECK_RC_OK(AudioMixBufInit(&mb, "Single", &config, cBufSize)); 66 63 RTTESTI_CHECK(AudioMixBufSize(&mb) == cBufSize); 67 64 RTTESTI_CHECK(AUDIOMIXBUF_B2S(&mb, AudioMixBufSizeBytes(&mb)) == cBufSize); … … 145 142 uint32_t cBufSize = RTRandU32Ex(cSamples /* Min */, 256 /* Max */); 146 143 147 PDMAUDIOSTREAMCFG cfg_p = 148 { 149 "44100Hz, 2 Channels, S16", 150 PDMAUDIODIR_OUT, 151 { PDMAUDIOPLAYBACKDEST_UNKNOWN }, 152 { 16, /* Bits */ 153 true, /* Signed */ 154 PDMAUDIOPCMPROPS_MAKE_SHIFT_PARMS(16 /* Bits */, 2 /* Channels */), /* Shift */ 155 2, /* Channels */ 156 44100, /* Hz */ 157 false /* Swap Endian */ }, 158 0 /* cSampleBufferSize */ 159 }; 160 161 RTTESTI_CHECK(DrvAudioHlpStreamCfgIsValid(&cfg_p)); 144 /* 44100Hz, 2 Channels, S16 */ 145 PDMAUDIOPCMPROPS cfg_p = 146 { 147 16, /* Bits */ 148 true, /* Signed */ 149 PDMAUDIOPCMPROPS_MAKE_SHIFT_PARMS(16 /* Bits */, 2 /* Channels */), /* Shift */ 150 2, /* Channels */ 151 44100, /* Hz */ 152 false /* Swap Endian */ 153 }; 154 155 RTTESTI_CHECK(DrvAudioHlpPCMPropsAreValid(&cfg_p)); 162 156 163 157 PDMAUDIOMIXBUF parent; 164 RTTESTI_CHECK_RC_OK(AudioMixBufInit(&parent, "Parent", &cfg_p.Props, cBufSize)); 165 166 PDMAUDIOSTREAMCFG cfg_c1 = /* Upmixing to parent */ 167 { 168 "22050Hz, 2 Channels, S16", 169 PDMAUDIODIR_OUT, 170 { PDMAUDIOPLAYBACKDEST_UNKNOWN }, 171 { 16, /* Bits */ 172 true, /* Signed */ 173 PDMAUDIOPCMPROPS_MAKE_SHIFT_PARMS(16 /* Bits */, 2 /* Channels */), /* Shift */ 174 2, /* Channels */ 175 22050, /* Hz */ 176 false /* Swap Endian */ }, 177 0 /* cSampleBufferSize */ 178 }; 179 180 RTTESTI_CHECK(DrvAudioHlpStreamCfgIsValid(&cfg_c1)); 158 RTTESTI_CHECK_RC_OK(AudioMixBufInit(&parent, "Parent", &cfg_p, cBufSize)); 159 160 /* 22050Hz, 2 Channels, S16 */ 161 PDMAUDIOPCMPROPS cfg_c1 = /* Upmixing to parent */ 162 { 163 16, /* Bits */ 164 true, /* Signed */ 165 PDMAUDIOPCMPROPS_MAKE_SHIFT_PARMS(16 /* Bits */, 2 /* Channels */), /* Shift */ 166 2, /* Channels */ 167 22050, /* Hz */ 168 false /* Swap Endian */ 169 }; 170 171 RTTESTI_CHECK(DrvAudioHlpPCMPropsAreValid(&cfg_c1)); 181 172 182 173 PDMAUDIOMIXBUF child1; 183 RTTESTI_CHECK_RC_OK(AudioMixBufInit(&child1, "Child1", &cfg_c1 .Props, cBufSize));174 RTTESTI_CHECK_RC_OK(AudioMixBufInit(&child1, "Child1", &cfg_c1, cBufSize)); 184 175 RTTESTI_CHECK_RC_OK(AudioMixBufLinkTo(&child1, &parent)); 185 176 186 PDMAUDIOSTREAMCFG cfg_c2 = /* Downmixing to parent */ 187 { 188 "48000Hz, 2 Channels, S16", 189 PDMAUDIODIR_OUT, 190 { PDMAUDIOPLAYBACKDEST_UNKNOWN }, 191 { 16, /* Bits */ 192 true, /* Signed */ 193 PDMAUDIOPCMPROPS_MAKE_SHIFT_PARMS(16 /* Bits */, 2 /* Channels */), /* Shift */ 194 2, /* Channels */ 195 48000, /* Hz */ 196 false /* Swap Endian */ }, 197 0 /* cSampleBufferSize */ 198 }; 199 200 RTTESTI_CHECK(DrvAudioHlpStreamCfgIsValid(&cfg_c2)); 177 /* 48000Hz, 2 Channels, S16 */ 178 PDMAUDIOPCMPROPS cfg_c2 = /* Downmixing to parent */ 179 { 180 16, /* Bits */ 181 true, /* Signed */ 182 PDMAUDIOPCMPROPS_MAKE_SHIFT_PARMS(16 /* Bits */, 2 /* Channels */), /* Shift */ 183 2, /* Channels */ 184 48000, /* Hz */ 185 false /* Swap Endian */ 186 }; 187 188 RTTESTI_CHECK(DrvAudioHlpPCMPropsAreValid(&cfg_c2)); 201 189 202 190 PDMAUDIOMIXBUF child2; 203 RTTESTI_CHECK_RC_OK(AudioMixBufInit(&child2, "Child2", &cfg_c2 .Props, cBufSize));191 RTTESTI_CHECK_RC_OK(AudioMixBufInit(&child2, "Child2", &cfg_c2, cBufSize)); 204 192 RTTESTI_CHECK_RC_OK(AudioMixBufLinkTo(&child2, &parent)); 205 193 … … 271 259 RTTestSubF(hTest, "Sample conversion (U8)"); 272 260 273 PDMAUDIOSTREAMCFG cfg_p = 274 { 275 "44100Hz, 1 Channel, U8", 276 PDMAUDIODIR_OUT, 277 { PDMAUDIOPLAYBACKDEST_UNKNOWN }, 278 { 8, /* Bits */ 279 false, /* Signed */ 280 PDMAUDIOPCMPROPS_MAKE_SHIFT_PARMS(8 /* Bits */, 1 /* Channels */), /* Shift */ 281 1, /* Channels */ 282 44100, /* Hz */ 283 false /* Swap Endian */ }, 284 0 /* cSampleBufferSize */ 285 }; 286 287 RTTESTI_CHECK(DrvAudioHlpStreamCfgIsValid(&cfg_p)); 261 /* 44100Hz, 1 Channel, U8 */ 262 PDMAUDIOPCMPROPS cfg_p = 263 { 264 8, /* Bits */ 265 false, /* Signed */ 266 PDMAUDIOPCMPROPS_MAKE_SHIFT_PARMS(8 /* Bits */, 1 /* Channels */), /* Shift */ 267 1, /* Channels */ 268 44100, /* Hz */ 269 false /* Swap Endian */ 270 }; 271 272 RTTESTI_CHECK(DrvAudioHlpPCMPropsAreValid(&cfg_p)); 288 273 289 274 PDMAUDIOMIXBUF parent; 290 RTTESTI_CHECK_RC_OK(AudioMixBufInit(&parent, "Parent", &cfg_p .Props, cBufSize));275 RTTESTI_CHECK_RC_OK(AudioMixBufInit(&parent, "Parent", &cfg_p, cBufSize)); 291 276 292 277 /* Child uses half the sample rate; that ensures the mixing engine can't … … 297 282 * interpolation and not immediately output. 298 283 */ 299 PDMAUDIOSTREAMCFG cfg_c = /* Upmixing to parent */ 300 { 301 "22050Hz, 1 Channel, U8", 302 PDMAUDIODIR_OUT, 303 { PDMAUDIOPLAYBACKDEST_UNKNOWN }, 304 { 8, /* Bits */ 305 false, /* Signed */ 306 PDMAUDIOPCMPROPS_MAKE_SHIFT_PARMS(8 /* Bits */, 1 /* Channels */), /* Shift */ 307 1, /* Channels */ 308 22050, /* Hz */ 309 false /* Swap Endian */ }, 310 0 /* cSampleBufferSize */ 311 }; 312 313 RTTESTI_CHECK(DrvAudioHlpStreamCfgIsValid(&cfg_c)); 284 285 /* 22050Hz, 1 Channel, U8 */ 286 PDMAUDIOPCMPROPS cfg_c = /* Upmixing to parent */ 287 { 288 8, /* Bits */ 289 false, /* Signed */ 290 PDMAUDIOPCMPROPS_MAKE_SHIFT_PARMS(8 /* Bits */, 1 /* Channels */), /* Shift */ 291 1, /* Channels */ 292 22050, /* Hz */ 293 false /* Swap Endian */ 294 }; 295 296 RTTESTI_CHECK(DrvAudioHlpPCMPropsAreValid(&cfg_c)); 314 297 315 298 PDMAUDIOMIXBUF child; 316 RTTESTI_CHECK_RC_OK(AudioMixBufInit(&child, "Child", &cfg_c .Props, cBufSize));299 RTTESTI_CHECK_RC_OK(AudioMixBufInit(&child, "Child", &cfg_c, cBufSize)); 317 300 RTTESTI_CHECK_RC_OK(AudioMixBufLinkTo(&child, &parent)); 318 301 … … 333 316 334 317 /**** 8-bit unsigned samples ****/ 335 RTTestPrintf(hTest, RTTESTLVL_DEBUG, "Conversion test %uHz %uch 8-bit\n", cfg_c. Props.uHz, cfg_c.Props.cChannels);318 RTTestPrintf(hTest, RTTESTLVL_DEBUG, "Conversion test %uHz %uch 8-bit\n", cfg_c.uHz, cfg_c.cChannels); 336 319 RTTESTI_CHECK_RC_OK(AudioMixBufWriteCirc(&child, &samples, sizeof(samples), &cSamplesWritten)); 337 320 RTTESTI_CHECK_MSG(cSamplesWritten == cSamplesChild, ("Child: Expected %RU32 written samples, got %RU32\n", cSamplesChild, cSamplesWritten)); … … 382 365 RTTestSubF(hTest, "Sample conversion (S16)"); 383 366 384 PDMAUDIOSTREAMCFG cfg_p = 385 { 386 "44100Hz, 1 Channel, S16", 387 PDMAUDIODIR_OUT, 388 { PDMAUDIOPLAYBACKDEST_UNKNOWN }, 389 { 16, /* Bits */ 390 true, /* Signed */ 391 PDMAUDIOPCMPROPS_MAKE_SHIFT_PARMS(16 /* Bits */, 1 /* Channels */), /* Shift */ 392 1, /* Channels */ 393 44100, /* Hz */ 394 false /* Swap Endian */ }, 395 0 /* cSampleBufferSize */ 396 }; 397 398 RTTESTI_CHECK(DrvAudioHlpStreamCfgIsValid(&cfg_p)); 367 /* 44100Hz, 1 Channel, S16 */ 368 PDMAUDIOPCMPROPS cfg_p = 369 { 370 16, /* Bits */ 371 true, /* Signed */ 372 PDMAUDIOPCMPROPS_MAKE_SHIFT_PARMS(16 /* Bits */, 1 /* Channels */), /* Shift */ 373 1, /* Channels */ 374 44100, /* Hz */ 375 false /* Swap Endian */ 376 }; 377 378 RTTESTI_CHECK(DrvAudioHlpPCMPropsAreValid(&cfg_p)); 399 379 400 380 PDMAUDIOMIXBUF parent; 401 RTTESTI_CHECK_RC_OK(AudioMixBufInit(&parent, "Parent", &cfg_p.Props, cBufSize)); 402 403 PDMAUDIOSTREAMCFG cfg_c = /* Upmixing to parent */ 404 { 405 "22050Hz, 1 Channel, S16", 406 PDMAUDIODIR_OUT, 407 { PDMAUDIOPLAYBACKDEST_UNKNOWN }, 408 { 16, /* Bits */ 409 true, /* Signed */ 410 PDMAUDIOPCMPROPS_MAKE_SHIFT_PARMS(16 /* Bits */, 1 /* Channels */), /* Shift */ 411 1, /* Channels */ 412 22050, /* Hz */ 413 false /* Swap Endian */ }, 414 0 /* cSampleBufferSize */ 415 }; 416 417 RTTESTI_CHECK(DrvAudioHlpStreamCfgIsValid(&cfg_c)); 381 RTTESTI_CHECK_RC_OK(AudioMixBufInit(&parent, "Parent", &cfg_p, cBufSize)); 382 383 /* 22050Hz, 1 Channel, S16 */ 384 PDMAUDIOPCMPROPS cfg_c = /* Upmixing to parent */ 385 { 386 16, /* Bits */ 387 true, /* Signed */ 388 PDMAUDIOPCMPROPS_MAKE_SHIFT_PARMS(16 /* Bits */, 1 /* Channels */), /* Shift */ 389 1, /* Channels */ 390 22050, /* Hz */ 391 false /* Swap Endian */ 392 }; 393 394 RTTESTI_CHECK(DrvAudioHlpPCMPropsAreValid(&cfg_c)); 418 395 419 396 PDMAUDIOMIXBUF child; 420 RTTESTI_CHECK_RC_OK(AudioMixBufInit(&child, "Child", &cfg_c .Props, cBufSize));397 RTTESTI_CHECK_RC_OK(AudioMixBufInit(&child, "Child", &cfg_c, cBufSize)); 421 398 RTTESTI_CHECK_RC_OK(AudioMixBufLinkTo(&child, &parent)); 422 399 … … 437 414 438 415 /**** 16-bit signed samples ****/ 439 RTTestPrintf(hTest, RTTESTLVL_DEBUG, "Conversion test %uHz %uch 16-bit\n", cfg_c. Props.uHz, cfg_c.Props.cChannels);416 RTTestPrintf(hTest, RTTESTLVL_DEBUG, "Conversion test %uHz %uch 16-bit\n", cfg_c.uHz, cfg_c.cChannels); 440 417 RTTESTI_CHECK_RC_OK(AudioMixBufWriteCirc(&child, &samples, sizeof(samples), &cSamplesWritten)); 441 418 RTTESTI_CHECK_MSG(cSamplesWritten == cSamplesChild, ("Child: Expected %RU32 written samples, got %RU32\n", cSamplesChild, cSamplesWritten)); … … 486 463 487 464 /* Same for parent/child. */ 488 PDMAUDIOSTREAMCFG cfg = 489 { 490 "44100Hz, 2 Channels, S16", 491 PDMAUDIODIR_OUT, 492 { PDMAUDIOPLAYBACKDEST_UNKNOWN }, 493 { 16, /* Bits */ 494 true, /* Signed */ 495 PDMAUDIOPCMPROPS_MAKE_SHIFT_PARMS(16 /* Bits */, 2 /* Channels */), /* Shift */ 496 2, /* Channels */ 497 44100, /* Hz */ 498 false /* Swap Endian */ }, 499 0 /* cSampleBufferSize */ 500 }; 501 502 RTTESTI_CHECK(DrvAudioHlpStreamCfgIsValid(&cfg)); 465 /* 44100Hz, 2 Channels, S16 */ 466 PDMAUDIOPCMPROPS cfg = 467 { 468 16, /* Bits */ 469 true, /* Signed */ 470 PDMAUDIOPCMPROPS_MAKE_SHIFT_PARMS(16 /* Bits */, 2 /* Channels */), /* Shift */ 471 2, /* Channels */ 472 44100, /* Hz */ 473 false /* Swap Endian */ 474 }; 475 476 RTTESTI_CHECK(DrvAudioHlpPCMPropsAreValid(&cfg)); 503 477 504 478 PDMAUDIOVOLUME vol = { false, 0, 0 }; /* Not muted. */ 505 479 PDMAUDIOMIXBUF parent; 506 RTTESTI_CHECK_RC_OK(AudioMixBufInit(&parent, "Parent", &cfg .Props, cBufSize));480 RTTESTI_CHECK_RC_OK(AudioMixBufInit(&parent, "Parent", &cfg, cBufSize)); 507 481 508 482 PDMAUDIOMIXBUF child; 509 RTTESTI_CHECK_RC_OK(AudioMixBufInit(&child, "Child", &cfg .Props, cBufSize));483 RTTESTI_CHECK_RC_OK(AudioMixBufInit(&child, "Child", &cfg, cBufSize)); 510 484 RTTESTI_CHECK_RC_OK(AudioMixBufLinkTo(&child, &parent)); 511 485 … … 528 502 529 503 /**** Volume control test ****/ 530 RTTestPrintf(hTest, RTTESTLVL_DEBUG, "Volume control test %uHz %uch \n", cfg. Props.uHz, cfg.Props.cChannels);504 RTTestPrintf(hTest, RTTESTLVL_DEBUG, "Volume control test %uHz %uch \n", cfg.uHz, cfg.cChannels); 531 505 532 506 /* 1) Full volume/0dB attenuation (255). */
Note:
See TracChangeset
for help on using the changeset viewer.