- Timestamp:
- Feb 27, 2007 11:00:14 AM (18 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/alsaaudio.c
r787 r1071 293 293 alsa_logerr2 (err, typ, "Failed to open `%s':\n", pcm_name); 294 294 #else 295 LogRel(("A udio/ALSA: Failed to open '%s' as %s\n", pcm_name, typ));295 LogRel(("ALSA: Failed to open '%s' as %s\n", pcm_name, typ)); 296 296 #endif 297 297 return -1; … … 303 303 alsa_logerr2 (err, typ, "Failed to initialize hardware parameters\n"); 304 304 #else 305 LogRel(("A udio/ALSA: Failed to initialize hardware parameters\n"));305 LogRel(("ALSA: Failed to initialize hardware parameters\n")); 306 306 #endif 307 307 goto err; … … 317 317 alsa_logerr2 (err, typ, "Failed to set access type\n"); 318 318 #else 319 LogRel(("A udio/ALSA: Failed to set access type\n"));319 LogRel(("ALSA: Failed to set access type\n")); 320 320 #endif 321 321 goto err; … … 327 327 alsa_logerr2 (err, typ, "Failed to set format %d\n", req->fmt); 328 328 #else 329 LogRel(("A udio/ALSA: Failed to set format %d\n", req->fmt));329 LogRel(("ALSA: Failed to set format %d\n", req->fmt)); 330 330 #endif 331 331 goto err; … … 337 337 alsa_logerr2 (err, typ, "Failed to set frequency %d\n", req->freq); 338 338 #else 339 LogRel(("A udio/ALSA: Failed to set frequency %dHz\n", req->freq));339 LogRel(("ALSA: Failed to set frequency %dHz\n", req->freq)); 340 340 #endif 341 341 goto err; … … 352 352 req->nchannels); 353 353 #else 354 LogRel(("A udio/ALSA: Failed to set number of channels to %d\n", req->nchannels));354 LogRel(("ALSA: Failed to set number of channels to %d\n", req->nchannels)); 355 355 #endif 356 356 goto err; … … 363 363 nchannels); 364 364 #else 365 LogRel(("A udio/ALSA: Cannot handle obtained number of channels (%d)\n", nchannels));365 LogRel(("ALSA: Cannot handle obtained number of channels (%d)\n", nchannels)); 366 366 #endif 367 367 goto err; … … 390 390 req->period_size); 391 391 #else 392 LogRel(("A udio/ALSA: Failed to set period time %d\n", req->period_size));392 LogRel(("ALSA: Failed to set period time %d\n", req->period_size)); 393 393 #endif 394 394 goto err; … … 409 409 req->buffer_size); 410 410 #else 411 LogRel(("A udio/ALSA: Failed to set buffer time %d\n", req->buffer_size));411 LogRel(("ALSA: Failed to set buffer time %d\n", req->buffer_size)); 412 412 #endif 413 413 goto err; … … 435 435 ); 436 436 #else 437 LogRel(("A udio/ALSA: Could not get minimal period size for %s\n", typ));437 LogRel(("ALSA: Could not get minimal period size for %s\n", typ)); 438 438 #endif 439 439 } … … 474 474 period_size); 475 475 #else 476 LogRel(("A udio/ALSA: Failed to set period size %d (%s)\n",476 LogRel(("ALSA: Failed to set period size %d (%s)\n", 477 477 period_size, snd_strerror(err))); 478 478 #endif … … 497 497 typ); 498 498 #else 499 LogRel(("A udio/ALSA: Could not get minimal buffer size for %s\n", typ));499 LogRel(("ALSA: Could not get minimal buffer size for %s\n", typ)); 500 500 #endif 501 501 } … … 527 527 buffer_size); 528 528 #else 529 LogRel(("A udio/ALSA: Failed to set buffer size %d (%s)\n",529 LogRel(("ALSA: Failed to set buffer size %d (%s)\n", 530 530 buffer_size, snd_strerror(err))); 531 531 #endif … … 543 543 alsa_logerr2 (err, typ, "Failed to apply audio parameters\n"); 544 544 #else 545 LogRel(("A udio/ALSA: Failed to apply audio parameters\n"));545 LogRel(("ALSA: Failed to apply audio parameters\n")); 546 546 #endif 547 547 goto err; … … 553 553 alsa_logerr2 (err, typ, "Failed to get buffer size\n"); 554 554 #else 555 LogRel(("A udio/ALSA: Failed to get buffer size\n"));555 LogRel(("ALSA: Failed to get buffer size\n")); 556 556 #endif 557 557 goto err; … … 559 559 560 560 #ifdef VBOX 561 LogRel(("A udio/ALSA: %s frequency %dHz, period size %d, buffer size %d\n",561 LogRel(("ALSA: %s frequency %dHz, period size %d, buffer size %d\n", 562 562 typ, req->freq, period_size, obt_buffer_size)); 563 563 #endif -
trunk/src/VBox/Devices/Audio/audio.c
r366 r1071 1533 1533 } 1534 1534 1535 LogRel(("Audio: Trying driver '%s'.\n", drvname)); 1536 1535 1537 if (drvname) { 1536 1538 int found = 0; … … 1552 1554 for (i = 0; !done && i < sizeof (drvtab) / sizeof (drvtab[0]); i++) { 1553 1555 if (drvtab[i]->can_be_default) { 1556 LogRel(("Audio: Initialization of driver '%s' failed, trying '%s'.\n", 1557 drvname, drvtab[i]->name)); 1558 drvname = drvtab[i]->name; 1554 1559 done = !audio_driver_init (s, drvtab[i]); 1555 1560 } … … 1563 1568 } 1564 1569 else { 1570 LogRel(("Audio: Initialization of driver '%s' failed, using NULL driver.\n", drvname)); 1565 1571 dolog ("warning: Using timer based audio emulation\n"); 1566 1572 } … … 1771 1777 void AUD_set_record_source (audrecsource_t *ars, audrecsource_t *als) 1772 1778 { 1773 LogRel(("A UDIO: set_record_source ars=%d als=%d (not implemented)\n", *ars, *als));1779 LogRel(("Audio: set_record_source ars=%d als=%d (not implemented)\n", *ars, *als)); 1774 1780 } 1775 1781 … … 1862 1868 if (VBOX_FAILURE (rc)) 1863 1869 return rc; 1864 1865 LogRel(("Using Audio driver '%s'\n", drvname));1866 1870 1867 1871 rc = AUD_init (pDrvIns, drvname); -
trunk/src/VBox/Devices/Audio/dsound_template.h
r1 r1071 199 199 } 200 200 201 #ifdef DSBTYPE_IN 202 if (!s->dsound_capture) 203 return -1; 204 #endif 205 201 206 memset (&bd, 0, sizeof (bd)); 202 207 bd.dwSize = sizeof (bd); -
trunk/src/VBox/Devices/Audio/dsoundaudio.c
r366 r1071 232 232 233 233 AUD_log (AUDIO_CAP, "Reason: %s\n", str); 234 #ifdef VBOX 235 LogRel(("DSound: Reason: %s\n", str)); 236 #endif 234 237 } 235 238 … … 538 541 539 542 if (FAILED (hr)) { 543 #ifndef VBOX 540 544 dsound_logerr (hr, "Could not set cooperative level for window %p\n", 541 545 hwnd); 546 #else 547 LogRel(("DSound: Could not set cooperative level for window %p\n", hwnd)); 548 dsound_log_hresult(hr); 549 #endif 542 550 return -1; 543 551 } … … 565 573 ); 566 574 if (FAILED (hr)) { 575 #ifndef VBOX 567 576 dsound_logerr (hr, "Could not create primary playback buffer\n"); 577 #else 578 LogRel(("DSound: Could not create primary playback buffer\n")); 579 dsound_log_hresult(hr); 580 #endif 568 581 return -1; 569 582 } … … 571 584 hr = IDirectSoundBuffer_SetFormat (s->dsound_primary_buffer, &wfx); 572 585 if (FAILED (hr)) { 586 #ifndef VBOX 573 587 dsound_logerr (hr, "Could not set primary playback buffer format\n"); 588 #else 589 LogRel(("DSound: Could not set primary playback buffer format\n")); 590 dsound_log_hresult(hr); 591 #endif 574 592 } 575 593 … … 581 599 ); 582 600 if (FAILED (hr)) { 601 #ifndef VBOX 583 602 dsound_logerr (hr, "Could not get primary playback buffer format\n"); 603 #else 604 LogRel(("DSound: Could not get primary playback buffer format\n")); 605 dsound_log_hresult(hr); 606 #endif 584 607 goto fail0; 585 608 } … … 983 1006 hr = CoInitializeEx (NULL, COINIT_MULTITHREADED); 984 1007 if (FAILED (hr)) { 1008 #ifndef VBOX 985 1009 dsound_logerr (hr, "Could not initialize COM\n"); 1010 #else 1011 LogRel(("DSound: Could not initialize COM\n")); 1012 dsound_log_hresult(hr); 1013 #endif 986 1014 return NULL; 987 1015 } … … 995 1023 ); 996 1024 if (FAILED (hr)) { 1025 #ifndef VBOX 997 1026 dsound_logerr (hr, "Could not create DirectSound instance\n"); 1027 #else 1028 LogRel(("DSound: Could not create DirectSound instance\n")); 1029 dsound_log_hresult(hr); 1030 #endif 998 1031 return NULL; 999 1032 } … … 1001 1034 hr = IDirectSound_Initialize (s->dsound, NULL); 1002 1035 if (FAILED (hr)) { 1036 #ifndef VBOX 1003 1037 dsound_logerr (hr, "Could not initialize DirectSound\n"); 1038 #else 1039 LogRel(("DSound: Could not initialize DirectSound\n")); 1040 dsound_log_hresult(hr); 1041 #endif 1004 1042 1005 1043 hr = IDirectSound_Release (s->dsound); … … 1019 1057 ); 1020 1058 if (FAILED (hr)) { 1059 #ifndef VBOX 1021 1060 dsound_logerr (hr, "Could not create DirectSoundCapture instance\n"); 1061 #else 1062 LogRel(("DSound: Could not create DirectSoundCapture instance\n")); 1063 dsound_log_hresult(hr); 1064 #endif 1022 1065 } 1023 1066 else { 1024 1067 hr = IDirectSoundCapture_Initialize (s->dsound_capture, NULL); 1025 1068 if (FAILED (hr)) { 1069 #ifndef VBOX 1026 1070 dsound_logerr (hr, "Could not initialize DirectSoundCapture\n"); 1071 #else 1072 LogRel(("DSound: Could not initialize DirectSoundCapture\n")); 1073 dsound_log_hresult(hr); 1074 #endif 1027 1075 1028 1076 hr = IDirectSoundCapture_Release (s->dsound_capture); -
trunk/src/VBox/Devices/Audio/ossaudio.c
r366 r1071 227 227 oss_logerr2 (errno, typ, "Failed to open `%s'\n", dspname); 228 228 #else 229 LogRel((" Audio/OSS: Failed to open %s for %s (%s)\n",229 LogRel(("OSS: Failed to open %s for %s (%s)\n", 230 230 dspname, typ, strerror(errno))); 231 231 #endif … … 234 234 235 235 #ifdef VBOX 236 LogRel((" Audio/OSS: Successfully opened %s for %s\n", dspname, typ));236 LogRel(("OSS: Successfully opened %s for %s\n", dspname, typ)); 237 237 #endif 238 238 … … 245 245 oss_logerr2 (errno, typ, "Failed to set sample size %d\n", req->fmt); 246 246 #else 247 LogRel((" Audio/OSS: Failed to set sample size %d (%s)\n",247 LogRel(("OSS: Failed to set sample size %d (%s)\n", 248 248 req->fmt, strerror(errno))); 249 249 #endif … … 256 256 req->nchannels); 257 257 #else 258 LogRel((" Audio/OSS: Failed to set nchannels=%d (%s)\n",258 LogRel(("OSS: Failed to set nchannels=%d (%s)\n", 259 259 req->nchannels, strerror(errno))); 260 260 #endif … … 266 266 oss_logerr2 (errno, typ, "Failed to set frequency %d\n", req->freq); 267 267 #else 268 LogRel((" Audio/OSS: Failed to set freq=%dHZ\n", req->freq, strerror(errno)));268 LogRel(("OSS: Failed to set freq=%dHZ\n", req->freq, strerror(errno))); 269 269 #endif 270 270 goto err; … … 275 275 oss_logerr2 (errno, typ, "Failed to set non-blocking mode\n"); 276 276 #else 277 LogRel((" Audio/OSS: Failed to set non-blocking mode (%s)\n", strerror(errno)));277 LogRel(("OSS: Failed to set non-blocking mode (%s)\n", strerror(errno))); 278 278 #endif 279 279 goto err; … … 286 286 req->nfrags, req->fragsize); 287 287 #else 288 LogRel((" Audio/OSS: Failed to set buffer_length=%d,%d (%s)\n",288 LogRel(("OSS: Failed to set buffer_length=%d,%d (%s)\n", 289 289 req->nfrags, req->fragsize, strerror(errno))); 290 290 #endif … … 296 296 oss_logerr2 (errno, typ, "Failed to get buffer length\n"); 297 297 #else 298 LogRel((" Audio/OSS: Failed to get buffer length (%s)\n", strerror(errno)));298 LogRel(("OSS: Failed to get buffer length (%s)\n", strerror(errno))); 299 299 #endif 300 300 goto err; … … 327 327 oss_anal_close (&fd); 328 328 #ifdef VBOX 329 LogRel((" Audio/OSS: Closed %s for %s\n",329 LogRel(("OSS: Closed %s for %s\n", 330 330 in ? conf.devpath_in : conf.devpath_out, in ? "ADC" : "DAC")); 331 331 #endif … … 482 482 oss_anal_close (&oss->fd); 483 483 #ifdef VBOX 484 LogRel((" Audio/OSS: Closed %s for DAC\n", conf.devpath_out));484 LogRel(("OSS: Closed %s for DAC\n", conf.devpath_out)); 485 485 #endif 486 486 … … 530 530 oss_anal_close (&fd); 531 531 #ifdef VBOX 532 LogRel((" Audio/OSS: Closed %s for DAC\n", conf.devpath_out));532 LogRel(("OSS: Closed %s for DAC\n", conf.devpath_out)); 533 533 #endif 534 534 return -1; … … 611 611 oss_anal_close (&fd); 612 612 #ifdef VBOX 613 LogRel((" Audio/OSS: Closed %s for DAC\n", conf.devpath_out));613 LogRel(("OSS: Closed %s for DAC\n", conf.devpath_out)); 614 614 #endif 615 615 return -1; … … 687 687 oss_anal_close (&fd); 688 688 #ifdef VBOX 689 LogRel((" Audio/OSS: Closed %s for ADC\n", conf.devpath_in));689 LogRel(("OSS: Closed %s for ADC\n", conf.devpath_in)); 690 690 #endif 691 691 return -1; … … 713 713 oss_anal_close (&fd); 714 714 #ifdef VBOX 715 LogRel((" Audio/OSS: Closed %s for ADC\n", conf.devpath_in));715 LogRel(("OSS: Closed %s for ADC\n", conf.devpath_in)); 716 716 #endif 717 717 return -1; … … 728 728 oss_anal_close (&oss->fd); 729 729 #ifdef VBOX 730 LogRel((" Audio/OSS: Closed %s for ADC\n", conf.devpath_in));730 LogRel(("OSS: Closed %s for ADC\n", conf.devpath_in)); 731 731 #endif 732 732 -
trunk/src/VBox/Main/AudioAdapterImpl.cpp
r1 r1071 225 225 226 226 #ifdef __WIN__ 227 #ifdef VBOX_WITH_WINMM 227 228 case AudioDriverType_WINMMAudioDriver: 228 229 { … … 231 232 break; 232 233 } 234 #endif 233 235 case AudioDriverType_DSOUNDAudioDriver: 234 236 { -
trunk/src/VBox/Main/ConsoleImpl.cpp
r1015 r1071 5301 5301 } 5302 5302 #ifdef __WIN__ 5303 #ifdef VBOX_WITH_WINMM 5303 5304 case AudioDriverType_WINMMAudioDriver: 5304 5305 { … … 5306 5307 break; 5307 5308 } 5309 #endif 5308 5310 case AudioDriverType_DSOUNDAudioDriver: 5309 5311 { … … 5311 5313 break; 5312 5314 } 5313 #endif /* !__LINUX__ */5315 #endif /* __WIN__ */ 5314 5316 #ifdef __LINUX__ 5315 5317 case AudioDriverType_OSSAudioDriver: -
trunk/src/VBox/Main/MachineImpl.cpp
r1015 r1071 3827 3827 #ifdef __WIN__ 3828 3828 else if (driver == L"winmm") 3829 #ifdef VBOX_WITH_WINMM 3829 3830 audioDriver = AudioDriverType_WINMMAudioDriver; 3831 #else 3832 // fall back to dsound 3833 audioDriver = AudioDriverType_DSOUNDAudioDriver; 3834 #endif 3830 3835 else if (driver == L"dsound") 3831 3836 audioDriver = AudioDriverType_DSOUNDAudioDriver; … … 5582 5587 #ifdef __WIN__ 5583 5588 case AudioDriverType_WINMMAudioDriver: 5589 #ifdef VBOX_WITH_WINMM 5584 5590 { 5585 5591 CFGLDRSetString (adapterNode, "driver", "winmm"); 5586 5592 break; 5587 5593 } 5594 #endif 5588 5595 case AudioDriverType_DSOUNDAudioDriver: 5589 5596 { … … 5592 5599 } 5593 5600 #endif /* __WIN__ */ 5601 case AudioDriverType_ALSAAudioDriver: 5594 5602 #ifdef VBOX_WITH_ALSA 5595 case AudioDriverType_ALSAAudioDriver:5596 5603 { 5597 5604 CFGLDRSetString (adapterNode, "driver", "alsa"); 5598 5605 break; 5599 5606 } 5600 #else5601 /* fall back to OSS */5602 case AudioDriverType_ALSAAudioDriver:5603 5607 #endif 5604 5608 #ifdef __LINUX__ -
trunk/src/VBox/Main/Makefile
r1041 r1071 111 111 ifdef VBOX_WITH_ALSA 112 112 VBoxSVC_DEFS += VBOX_WITH_ALSA 113 endif 114 ifdef VBOX_WITH_WINMM 115 VBoxSVC_DEFS += VBOX_WITH_WINMM 113 116 endif 114 117 ifdef VBOX_WITHOUT_LINUX_COMPILER_H … … 219 222 VBoxC_DEFS += VBOX_WITH_ALSA 220 223 endif 224 ifdef VBOX_WITH_WINMM 225 VBoxC_DEFS += VBOX_WITH_WINMM 226 endif 221 227 VBoxC_DEFS.win.x86 += _WIN32_WINNT=0x0400 222 228 VBoxC_DEFS.win.amd64 += _WIN32_WINNT=0x0510
Note:
See TracChangeset
for help on using the changeset viewer.