Changeset 53523 in vbox for trunk/src/VBox
- Timestamp:
- Dec 12, 2014 1:46:29 PM (10 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DrvHostOSSAudio.cpp
r53511 r53523 68 68 { 69 69 /** Note: Always must come first! */ 70 PDMAUDIOHSTSTRMIN hw;70 PDMAUDIOHSTSTRMIN pStreamIn; 71 71 int hFile; 72 72 int cFragments; … … 79 79 { 80 80 /** Note: Always must come first! */ 81 PDMAUDIOHSTSTRMOUT hw;81 PDMAUDIOHSTSTRMOUT pStreamOut; 82 82 int hFile; 83 83 int cFragments; … … 204 204 } 205 205 206 static void drvHostOSSAudioClose(int *phFile) 207 { 208 if (!phFile) 209 return; 210 211 if (*phFile) 212 { 213 if (close(*phFile)) 214 LogRel(("Audio: Closing descriptor failed: %s\n", 215 strerror(errno))); 216 else 217 *phFile = -1; 206 static int drvHostOSSAudioClose(int *phFile) 207 { 208 if (!phFile || !*phFile) 209 return VINF_SUCCESS; 210 211 int rc; 212 if (close(*phFile)) 213 { 214 LogRel(("Audio: Closing descriptor failed: %s\n", 215 strerror(errno))); 216 rc = VERR_GENERAL_FAILURE; /** @todo */ 218 217 } 218 else 219 { 220 *phFile = -1; 221 rc = VINF_SUCCESS; 222 } 223 224 return rc; 219 225 } 220 226 … … 232 238 do 233 239 { 234 const char *pszD SP= fIn ? s_OSSConf.devpath_in : s_OSSConf.devpath_out;235 if (!pszD SP)236 { 237 LogRel(("Audio: Invalid or no %s DSPset\n",240 const char *pszDev = fIn ? s_OSSConf.devpath_in : s_OSSConf.devpath_out; 241 if (!pszDev) 242 { 243 LogRel(("Audio: Invalid or no %s device name set\n", 238 244 fIn ? "input" : "output")); 239 245 rc = VERR_INVALID_PARAMETER; … … 241 247 } 242 248 243 hFile = open(pszD SP, (fIn ? O_RDONLY : O_WRONLY) | O_NONBLOCK);244 if ( !hFile)245 { 246 LogRel(("Audio: Failed to open %s: %s\n", pszD SP, strerror(errno)));249 hFile = open(pszDev, (fIn ? O_RDONLY : O_WRONLY) | O_NONBLOCK); 250 if (hFile == -1) 251 { 252 LogRel(("Audio: Failed to open %s: %s\n", pszDev, strerror(errno))); 247 253 rc = RTErrConvertFromErrno(errno); 248 254 break; -
trunk/src/VBox/Devices/Makefile.kmk
r53442 r53523 529 529 530 530 ifeq ($(KBUILD_TARGET),linux) 531 VBoxDD_SOURCES += \ 532 Audio/DrvHostOssAudio.cpp 531 VBoxDD_SOURCES += \ 532 Audio/DrvHostOSSAudio.cpp 533 533 534 ifdef VBOX_WITH_PULSE 534 535 VBoxDD_DEFS += VBOX_WITH_PULSE … … 539 540 540 541 ifdef VBOX_WITH_ALSA 541 VBoxDD_DEFS .linux+= VBOX_WITH_ALSA542 VBoxDD_SOURCES .linux+= \543 Audio/DrvHostAlsaAudio.cpp \544 Audio/alsa_stubs.c542 VBoxDD_DEFS += VBOX_WITH_ALSA 543 VBoxDD_SOURCES += \ 544 Audio/DrvHostALSAAudio.cpp \ 545 Audio/alsa_stubs.c 545 546 endif 546 547 endif … … 548 549 ifeq ($(KBUILD_TARGET),freebsd) 549 550 VBoxDD_SOURCES += \ 550 Audio/DrvHostO ssAudio.cpp551 Audio/DrvHostOSSAudio.cpp 551 552 ifdef VBOX_WITH_PULSE 552 553 VBoxDD_DEFS += VBOX_WITH_PULSE -
trunk/src/VBox/Devices/build/VBoxDD.cpp
r53442 r53523 125 125 if (RT_FAILURE(rc)) 126 126 return rc; 127 #ifdef VBOX_WITH_PDM_AUDIO_DRIVER 128 //rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceAudioVRDE); 129 //if (RT_FAILURE(rc)) 130 // return rc; 131 #else 127 #ifndef VBOX_WITH_PDM_AUDIO_DRIVER 132 128 rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceAudioSniffer); 133 129 if (RT_FAILURE(rc)) … … 296 292 if (RT_FAILURE(rc)) 297 293 return rc; 294 rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvHostALSAAudio); 295 if (RT_FAILURE(rc)) 296 return rc; 297 rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvHostOSSAudio); 298 if (RT_FAILURE(rc)) 299 return rc; 298 300 # endif 299 301 # if defined(RT_OS_FREEBSD) 300 rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvHostO ssAudio);302 rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvHostOSSAudio); 301 303 if (RT_FAILURE(rc)) 302 304 return rc; … … 308 310 # endif 309 311 # if defined(RT_OS_SOLARIS) 312 rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvHostOSSAudio); 313 if (RT_FAILURE(rc)) 314 return rc; 310 315 rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvHostSolAudio); 311 316 if (RT_FAILURE(rc)) -
trunk/src/VBox/Devices/build/VBoxDD.h
r53442 r53523 125 125 # if defined(RT_OS_LINUX) 126 126 extern const PDMDRVREG g_DrvHostPulseAudio; 127 extern const PDMDRVREG g_DrvHostALSAAudio; 128 extern const PDMDRVREG g_DrvHostOSSAudio; 127 129 # endif 128 130 # if defined(RT_OS_DARWIN) … … 130 132 # endif 131 133 # if defined(RT_OS_SOLARIS) 134 extern const PDMDRVREG g_DrvHostOSSAudio; 132 135 extern const PDMDRVREG g_DrvHostSolAudio; 133 136 # endif 134 137 # if defined(RT_OS_FREEBSD) 135 extern const PDMDRVREG g_DrvHostO ssAudio;138 extern const PDMDRVREG g_DrvHostOSSAudio; 136 139 # endif 137 140 #endif -
trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp
r53486 r53523 2721 2721 { 2722 2722 # ifdef VBOX_WITH_PDM_AUDIO_DRIVER 2723 InsertConfigString(pLunL1, "Driver", "A lsaAudio");2723 InsertConfigString(pLunL1, "Driver", "ALSAAudio"); 2724 2724 # else 2725 2725 InsertConfigString(pCfg, "AudioDriver", "alsa"); … … 2743 2743 { 2744 2744 # ifdef VBOX_WITH_PDM_AUDIO_DRIVER 2745 // #error "Port OSS audio backend!" /** @todo Port OSS driver. */ 2745 InsertConfigString(pLunL1, "Driver", "OSSAudio"); 2746 2746 # else 2747 2747 InsertConfigString(pCfg, "AudioDriver", "ossaudio");
Note:
See TracChangeset
for help on using the changeset viewer.