Changeset 59375 in vbox
- Timestamp:
- Jan 18, 2016 12:56:54 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
-
include/VBox/err.h (modified) (3 diffs)
-
src/VBox/Devices/Audio/DrvHostALSAAudio.cpp (modified) (18 diffs)
-
src/VBox/Devices/Audio/DrvHostCoreAudio.cpp (modified) (30 diffs)
-
src/VBox/Devices/Audio/DrvHostPulseAudio.cpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/err.h
r59305 r59375 2701 2701 /** @} */ 2702 2702 2703 2703 2704 /** @name Main API Status Codes 2704 2705 * @{ … … 2712 2713 /** @} */ 2713 2714 2715 2714 2716 /** @name VBox Drag and Drop Status Codes 2715 2717 * @{ … … 2720 2722 2721 2723 2724 /** @name Audio Status Codes 2725 * @{ 2726 */ 2727 /** Host backend couldn't be initialized. Happen if the audio server is not 2728 * reachable, audio hardware is not available or similar. We should use the 2729 * NULL audio driver. */ 2730 #define VERR_AUDIO_BACKEND_INIT_FAILED (-6600) 2731 /** @} */ 2732 2733 2722 2734 /* SED-END */ 2723 2735 -
trunk/src/VBox/Devices/Audio/DrvHostALSAAudio.cpp
r59097 r59375 399 399 LogRel(("ALSA: Failed to open \"%s\" as %s: %s\n", pszDev, 400 400 fIn ? "ADC" : "DAC", snd_strerror(err))); 401 rc = VERR_ GENERAL_FAILURE; /** @todo Find a better rc. */401 rc = VERR_AUDIO_BACKEND_INIT_FAILED; 402 402 break; 403 403 } … … 410 410 LogRel(("ALSA: Failed to initialize hardware parameters: %s\n", 411 411 snd_strerror(err))); 412 rc = VERR_ GENERAL_FAILURE; /** @todo Find a better rc. */412 rc = VERR_AUDIO_BACKEND_INIT_FAILED; 413 413 break; 414 414 } … … 419 419 { 420 420 LogRel(("ALSA: Failed to set access type: %s\n", snd_strerror(err))); 421 rc = VERR_ GENERAL_FAILURE; /** @todo Find a better rc. */421 rc = VERR_AUDIO_BACKEND_INIT_FAILED; 422 422 break; 423 423 } … … 428 428 LogRel(("ALSA: Failed to set audio format to %d: %s\n", 429 429 pCfgReq->fmt, snd_strerror(err))); 430 rc = VERR_ GENERAL_FAILURE; /** @todo Find a better rc. */430 rc = VERR_AUDIO_BACKEND_INIT_FAILED; 431 431 break; 432 432 } … … 437 437 LogRel(("ALSA: Failed to set frequency to %dHz: %s\n", 438 438 pCfgReq->freq, snd_strerror(err))); 439 rc = VERR_ GENERAL_FAILURE; /** @todo Find a better rc. */439 rc = VERR_AUDIO_BACKEND_INIT_FAILED; 440 440 break; 441 441 } … … 445 445 { 446 446 LogRel(("ALSA: Failed to set number of channels to %d\n", pCfgReq->nchannels)); 447 rc = VERR_ GENERAL_FAILURE; /** @todo Find a better rc. */447 rc = VERR_AUDIO_BACKEND_INIT_FAILED; 448 448 break; 449 449 } … … 453 453 { 454 454 LogRel(("ALSA: Number of audio channels (%u) not supported\n", cChannels)); 455 rc = VERR_ GENERAL_FAILURE; /** @todo Find a better rc. */455 rc = VERR_AUDIO_BACKEND_INIT_FAILED; 456 456 break; 457 457 } … … 482 482 { 483 483 LogRel(("ALSA: Failed to set period time %d\n", pCfgReq->period_size)); 484 rc = VERR_ GENERAL_FAILURE; /** @todo Find a better rc. */484 rc = VERR_AUDIO_BACKEND_INIT_FAILED; 485 485 break; 486 486 } … … 492 492 { 493 493 LogRel(("ALSA: Failed to set buffer time %d\n", pCfgReq->buffer_size)); 494 rc = VERR_ GENERAL_FAILURE; /** @todo Find a better rc. */494 rc = VERR_AUDIO_BACKEND_INIT_FAILED; 495 495 break; 496 496 } … … 513 513 { 514 514 LogRel(("ALSA: Could not determine minimal period size\n")); 515 rc = VERR_ GENERAL_FAILURE; /** @todo Find a better rc. */515 rc = VERR_AUDIO_BACKEND_INIT_FAILED; 516 516 break; 517 517 } … … 539 539 LogRel(("ALSA: Failed to set period size %d (%s)\n", 540 540 period_size_f, snd_strerror(err))); 541 rc = VERR_ GENERAL_FAILURE; /** @todo Find a better rc. */541 rc = VERR_AUDIO_BACKEND_INIT_FAILED; 542 542 break; 543 543 } … … 553 553 { 554 554 LogRel(("ALSA: Could not retrieve minimal buffer size\n")); 555 rc = VERR_ GENERAL_FAILURE; /** @todo Find a better rc. */555 rc = VERR_AUDIO_BACKEND_INIT_FAILED; 556 556 break; 557 557 } … … 579 579 LogRel(("ALSA: Failed to set buffer size %d: %s\n", 580 580 buffer_size_f, snd_strerror(err))); 581 rc = VERR_ GENERAL_FAILURE; /** @todo Find a better rc. */581 rc = VERR_AUDIO_BACKEND_INIT_FAILED; 582 582 break; 583 583 } … … 591 591 { 592 592 LogRel(("ALSA: Failed to apply audio parameters\n")); 593 rc = VERR_ GENERAL_FAILURE; /** @todo Find a better rc. */593 rc = VERR_AUDIO_BACKEND_INIT_FAILED; 594 594 break; 595 595 } … … 599 599 { 600 600 LogRel(("ALSA: Failed to get buffer size\n")); 601 rc = VERR_ GENERAL_FAILURE; /** @todo Find a better rc. */601 rc = VERR_AUDIO_BACKEND_INIT_FAILED; 602 602 break; 603 603 } … … 609 609 { 610 610 LogRel(("ALSA: Failed to get period size\n")); 611 rc = VERR_ GENERAL_FAILURE; /** @todo Find a better rc. */611 rc = VERR_AUDIO_BACKEND_INIT_FAILED; 612 612 break; 613 613 } … … 620 620 { 621 621 LogRel(("ALSA: Could not prepare hPCM %p\n", (void *)phPCM)); 622 rc = VERR_ GENERAL_FAILURE; /** @todo Find a better rc. */622 rc = VERR_AUDIO_BACKEND_INIT_FAILED; 623 623 break; 624 624 } … … 876 876 default: 877 877 LogFunc(("Failed to read input frames: %s\n", snd_strerror(cRead))); 878 rc = VERR_GENERAL_FAILURE; /** @todo Fudge! */ 878 rc = VERR_AUDIO_BACKEND_INIT_FAILED; 879 VERR_GENERAL_FAILURE; /** @todo Fudge! */ 879 880 break; 880 881 } -
trunk/src/VBox/Devices/Audio/DrvHostCoreAudio.cpp
r59097 r59375 750 750 { 751 751 LogRel(("CoreAudio: Failed to determine frame buffer size of the audio input device (%RI32)\n", err)); 752 return VERR_ GENERAL_FAILURE; /** @todo Fudge! */752 return VERR_AUDIO_BACKEND_INIT_FAILED; 753 753 } 754 754 … … 758 758 { 759 759 LogRel(("CoreAudio: Failed to set frame buffer size for the audio input device (%RI32)\n", err)); 760 return VERR_ GENERAL_FAILURE; /** @todo Fudge! */760 return VERR_AUDIO_BACKEND_INIT_FAILED; 761 761 } 762 762 … … 772 772 { 773 773 LogRel(("CoreAudio: Failed to find HAL output component\n")); /** @todo Return error value? */ 774 return VERR_ GENERAL_FAILURE; /** @todo Fudge! */774 return VERR_AUDIO_BACKEND_INIT_FAILED; 775 775 } 776 776 … … 780 780 { 781 781 LogRel(("CoreAudio: Failed to open output component (%RI32)\n", err)); 782 return VERR_ GENERAL_FAILURE; /** @todo Fudge! */782 return VERR_AUDIO_BACKEND_INIT_FAILED; 783 783 } 784 784 … … 790 790 { 791 791 LogRel(("CoreAudio: Failed to disable input I/O mode for input stream (%RI32)\n", err)); 792 return VERR_ GENERAL_FAILURE; /** @todo Fudge! */792 return VERR_AUDIO_BACKEND_INIT_FAILED; 793 793 } 794 794 … … 800 800 { 801 801 LogRel(("CoreAudio: Failed to disable output I/O mode for input stream (%RI32)\n", err)); 802 return VERR_ GENERAL_FAILURE; /** @todo Fudge! */802 return VERR_AUDIO_BACKEND_INIT_FAILED; 803 803 } 804 804 … … 809 809 { 810 810 LogRel(("CoreAudio: Failed to set current device (%RI32)\n", err)); 811 return VERR_ GENERAL_FAILURE; /** @todo Fudge! */811 return VERR_AUDIO_BACKEND_INIT_FAILED; 812 812 } 813 813 … … 826 826 { 827 827 LogRel(("CoreAudio: Failed to register input callback (%RI32)\n", err)); 828 return VERR_ GENERAL_FAILURE; /** @todo Fudge! */828 return VERR_AUDIO_BACKEND_INIT_FAILED; 829 829 } 830 830 … … 836 836 { 837 837 LogRel(("CoreAudio: Failed to get device format (%RI32)\n", err)); 838 return VERR_ GENERAL_FAILURE; /** @todo Fudge! */838 return VERR_AUDIO_BACKEND_INIT_FAILED; 839 839 } 840 840 … … 857 857 LogRel(("CoreAudio: Failed to create the audio converte(%RI32). Input Format=%d, Output Foramt=%d\n", 858 858 err, pStreamIn->deviceFormat, pStreamIn->streamFormat)); 859 return VERR_ GENERAL_FAILURE; /** @todo Fudge! */859 return VERR_AUDIO_BACKEND_INIT_FAILED; 860 860 } 861 861 … … 876 876 { 877 877 LogRel(("CoreAudio: Failed to set channel mapping for the audio input converter (%RI32)\n", err)); 878 return VERR_ GENERAL_FAILURE; /** @todo Fudge! */878 return VERR_AUDIO_BACKEND_INIT_FAILED; 879 879 } 880 880 } … … 886 886 { 887 887 LogRel(("CoreAudio: Failed to set input format for input stream (%RI32)\n", err)); 888 return VERR_ GENERAL_FAILURE; /** @todo Fudge! */888 return VERR_AUDIO_BACKEND_INIT_FAILED; 889 889 } 890 890 #if 0 … … 905 905 { 906 906 LogRel(("CoreAudio: Failed to set output format for input stream (%RI32)\n", err)); 907 return VERR_ GENERAL_FAILURE; /** @todo Fudge! */907 return VERR_AUDIO_BACKEND_INIT_FAILED; 908 908 } 909 909 … … 917 917 if (err != noErr) { 918 918 LogRel(("CoreAudio: Failed to set maximum frame buffer size for input stream (%RI32)\n", err)); 919 return VERR_ GENERAL_FAILURE; /** @todo Fudge! */919 return VERR_AUDIO_BACKEND_INIT_FAILED; 920 920 } 921 921 … … 925 925 { 926 926 LogRel(("CoreAudio: Failed to initialize audio unit for input stream (%RI32)\n", err)); 927 return VERR_ GENERAL_FAILURE; /** @todo Fudge! */927 return VERR_AUDIO_BACKEND_INIT_FAILED; 928 928 } 929 929 … … 934 934 { 935 935 LogRel(("CoreAudio: Failed to get input device format (%RI32)\n", err)); 936 return VERR_ GENERAL_FAILURE; /** @todo Fudge! */936 return VERR_AUDIO_BACKEND_INIT_FAILED; 937 937 } 938 938 … … 948 948 { 949 949 LogRel(("CoreAudio: Failed to get maximum frame buffer size from input audio device (%RI32)\n", err)); 950 return VERR_ GENERAL_FAILURE; /** @todo Fudge! */950 return VERR_AUDIO_BACKEND_INIT_FAILED; 951 951 } 952 952 … … 1095 1095 { 1096 1096 LogRel(("CoreAudio: Failed to determine frame buffer size of the audio output device (%RI32)\n", err)); 1097 return VERR_ GENERAL_FAILURE; /** @todo Fudge! */1097 return VERR_AUDIO_BACKEND_INIT_FAILED; 1098 1098 } 1099 1099 … … 1103 1103 { 1104 1104 LogRel(("CoreAudio: Failed to set frame buffer size for the audio output device (%RI32)\n", err)); 1105 return VERR_ GENERAL_FAILURE; /** @todo Fudge! */1105 return VERR_AUDIO_BACKEND_INIT_FAILED; 1106 1106 } 1107 1107 … … 1117 1117 { 1118 1118 LogRel(("CoreAudio: Failed to find HAL output component\n")); /** @todo Return error value? */ 1119 return VERR_ GENERAL_FAILURE; /** @todo Fudge! */1119 return VERR_AUDIO_BACKEND_INIT_FAILED; 1120 1120 } 1121 1121 … … 1125 1125 { 1126 1126 LogRel(("CoreAudio: Failed to open output component (%RI32)\n", err)); 1127 return VERR_ GENERAL_FAILURE; /** @todo Fudge! */1127 return VERR_AUDIO_BACKEND_INIT_FAILED; 1128 1128 } 1129 1129 … … 1135 1135 { 1136 1136 LogRel(("CoreAudio: Failed to disable I/O mode for output stream (%RI32)\n", err)); 1137 return VERR_ GENERAL_FAILURE; /** @todo Fudge! */1137 return VERR_AUDIO_BACKEND_INIT_FAILED; 1138 1138 } 1139 1139 … … 1144 1144 { 1145 1145 LogRel(("CoreAudio: Failed to set current device for output stream (%RI32)\n", err)); 1146 return VERR_ GENERAL_FAILURE; /** @todo Fudge! */1146 return VERR_AUDIO_BACKEND_INIT_FAILED; 1147 1147 } 1148 1148 … … 1161 1161 { 1162 1162 LogRel(("CoreAudio: Failed to register output callback (%RI32)\n", err)); 1163 return VERR_ GENERAL_FAILURE; /** @todo Fudge! */1163 return VERR_AUDIO_BACKEND_INIT_FAILED; 1164 1164 } 1165 1165 … … 1171 1171 { 1172 1172 LogRel(("CoreAudio: Failed to get device format (%RI32)\n", err)); 1173 return VERR_ GENERAL_FAILURE; /** @todo Fudge! */1173 return VERR_AUDIO_BACKEND_INIT_FAILED; 1174 1174 } 1175 1175 … … 1188 1188 { 1189 1189 LogRel(("CoreAudio: Failed to set stream format for output stream (%RI32)\n", err)); 1190 return VERR_ GENERAL_FAILURE; /** @todo Fudge! */1190 return VERR_AUDIO_BACKEND_INIT_FAILED; 1191 1191 } 1192 1192 … … 1197 1197 { 1198 1198 LogRel(("CoreAudio: Failed to retrieve device format for output stream (%RI32)\n", err)); 1199 return VERR_ GENERAL_FAILURE; /** @todo Fudge! */1199 return VERR_AUDIO_BACKEND_INIT_FAILED; 1200 1200 } 1201 1201 … … 1210 1210 { 1211 1211 LogRel(("CoreAudio: Failed to set maximum frame buffer size for output AudioUnit (%RI32)\n", err)); 1212 return VERR_ GENERAL_FAILURE; /** @todo Fudge! */1212 return VERR_AUDIO_BACKEND_INIT_FAILED; 1213 1213 } 1214 1214 … … 1218 1218 { 1219 1219 LogRel(("CoreAudio: Failed to initialize the output audio device (%RI32)\n", err)); 1220 return VERR_ GENERAL_FAILURE; /** @todo Fudge! */1220 return VERR_AUDIO_BACKEND_INIT_FAILED; 1221 1221 } 1222 1222 … … 1234 1234 1235 1235 AudioUnitUninitialize(pStreamOut->audioUnit); 1236 return VERR_ GENERAL_FAILURE; /** @todo Fudge! */1236 return VERR_AUDIO_BACKEND_INIT_FAILED; 1237 1237 } 1238 1238 -
trunk/src/VBox/Devices/Audio/DrvHostPulseAudio.cpp
r59097 r59375 380 380 LogRel(("PulseAudio: Could not connect input stream \"%s\": %s\n", 381 381 pszName, pa_strerror(pa_context_errno(g_pContext)))); 382 rc = VERR_ GENERAL_FAILURE; /** @todo Find a better rc. */382 rc = VERR_AUDIO_BACKEND_INIT_FAILED; 383 383 break; 384 384 } … … 394 394 LogRel(("PulseAudio: Could not connect playback stream \"%s\": %s\n", 395 395 pszName, pa_strerror(pa_context_errno(g_pContext)))); 396 rc = VERR_ GENERAL_FAILURE; /** @todo Find a better rc. */396 rc = VERR_AUDIO_BACKEND_INIT_FAILED; 397 397 break; 398 398 } … … 414 414 LogRel(("PulseAudio: Failed to initialize stream \"%s\" (state %ld)\n", 415 415 pszName, sstate)); 416 rc = VERR_ GENERAL_FAILURE; /** @todo Find a better rc. */416 rc = VERR_AUDIO_BACKEND_INIT_FAILED; 417 417 break; 418 418 } … … 491 491 LogRel(("PulseAudio: Failed to start threaded mainloop: %s\n", 492 492 pa_strerror(pa_context_errno(g_pContext)))); 493 rc = VERR_ GENERAL_FAILURE; /** @todo Find a better rc. */493 rc = VERR_AUDIO_BACKEND_INIT_FAILED; 494 494 break; 495 495 } … … 505 505 LogRel(("PulseAudio: Failed to connect to server: %s\n", 506 506 pa_strerror(pa_context_errno(g_pContext)))); 507 rc = VERR_ GENERAL_FAILURE; /** @todo Find a better rc. */507 rc = VERR_AUDIO_BACKEND_INIT_FAILED; 508 508 break; 509 509 } … … 523 523 { 524 524 LogRel(("PulseAudio: Failed to initialize context (state %d)\n", cstate)); 525 rc = VERR_ GENERAL_FAILURE; /** @todo Find a better rc. */525 rc = VERR_AUDIO_BACKEND_INIT_FAILED; 526 526 break; 527 527 }
Note:
See TracChangeset
for help on using the changeset viewer.

