- Timestamp:
- Aug 16, 2016 12:33:51 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DrvHostCoreAudio.cpp
r63534 r63547 275 275 * Defined Constants And Macros * 276 276 *********************************************************************************************************************************/ 277 /** @todo r=bird: The three API calls we use for finding, opening and closing278 * the default audio component are deprecated since 10.8. This define switches279 * over to using the replacement/renamed APIs introduced in 10.6+ */280 #define USE_NON_DEPRECATED_APIS 1281 282 277 /** @name Initialization status indicator used for the recreation of the AudioUnits. 283 278 * @{ */ … … 1260 1255 1261 1256 /* Try to find the default HAL output component. */ 1262 #ifdef USE_NON_DEPRECATED_APIS1263 1257 AudioComponentDescription cd; 1264 #else 1265 ComponentDescription cd; 1266 #endif 1258 1267 1259 RT_ZERO(cd); 1268 1260 cd.componentType = kAudioUnitType_Output; 1269 1261 cd.componentSubType = kAudioUnitSubType_HALOutput; 1270 1262 cd.componentManufacturer = kAudioUnitManufacturer_Apple; 1271 #ifdef USE_NON_DEPRECATED_APIS 1263 1272 1264 AudioComponent cp = AudioComponentFindNext(NULL, &cd); 1273 #else1274 Component cp = FindNextComponent(NULL, &cd);1275 #endif1276 1265 if (cp == 0) 1277 1266 { … … 1281 1270 1282 1271 /* Open the default HAL output component. */ 1283 #ifdef USE_NON_DEPRECATED_APIS1284 1272 err = AudioComponentInstanceNew(cp, &pStreamIn->audioUnit); 1285 #else1286 err = OpenAComponent(cp, &pStreamIn->audioUnit);1287 #endif1288 1273 if (err != noErr) 1289 1274 { … … 1685 1670 1686 1671 /* Try to find the default HAL output component. */ 1687 #ifdef USE_NON_DEPRECATED_APIS1688 1672 AudioComponentDescription cd; 1689 #else1690 ComponentDescription cd;1691 #endif1692 1673 RT_ZERO(cd); 1674 1693 1675 cd.componentType = kAudioUnitType_Output; 1694 1676 cd.componentSubType = kAudioUnitSubType_HALOutput; 1695 1677 cd.componentManufacturer = kAudioUnitManufacturer_Apple; 1696 #ifdef USE_NON_DEPRECATED_APIS 1678 1697 1679 AudioComponent cp = AudioComponentFindNext(NULL, &cd); 1698 #else1699 Component cp = FindNextComponent(NULL, &cd);1700 #endif1701 1680 if (cp == 0) 1702 1681 { … … 1706 1685 1707 1686 /* Open the default HAL output component. */ 1708 #ifdef USE_NON_DEPRECATED_APIS1709 1687 err = AudioComponentInstanceNew(cp, &pStreamOut->audioUnit); 1710 #else1711 err = OpenAComponent(cp, &pStreamOut->audioUnit);1712 #endif1713 1688 if (err != noErr) 1714 1689 { … … 2435 2410 err = AudioUnitUninitialize(pStreamIn->audioUnit); 2436 2411 if (err == noErr) 2437 #ifdef USE_NON_DEPRECATED_APIS2438 2412 err = AudioComponentInstanceDispose(pStreamIn->audioUnit); 2439 #else2440 err = CloseComponent(pStreamIn->audioUnit);2441 #endif2442 2413 2443 2414 if ( err != noErr … … 2550 2521 err = AudioUnitUninitialize(pStreamOut->audioUnit); 2551 2522 if (err == noErr) 2552 #ifdef USE_NON_DEPRECATED_APIS2553 2523 err = AudioComponentInstanceDispose(pStreamOut->audioUnit); 2554 #else2555 err = CloseComponent(pStreamOut->audioUnit);2556 #endif2557 2524 2558 2525 if ( err != noErr
Note:
See TracChangeset
for help on using the changeset viewer.