VirtualBox

Changeset 59375 in vbox


Ignore:
Timestamp:
Jan 18, 2016 12:56:54 PM (9 years ago)
Author:
vboxsync
Message:

Audio: introduced VERR_AUDIO_BACKEND_INIT_FAILED

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/err.h

    r59305 r59375  
    27012701/** @} */
    27022702
     2703
    27032704/** @name Main API Status Codes
    27042705 * @{
     
    27122713/** @} */
    27132714
     2715
    27142716/** @name VBox Drag and Drop Status Codes
    27152717 * @{
     
    27202722
    27212723
     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
    27222734/* SED-END */
    27232735
  • trunk/src/VBox/Devices/Audio/DrvHostALSAAudio.cpp

    r59097 r59375  
    399399            LogRel(("ALSA: Failed to open \"%s\" as %s: %s\n", pszDev,
    400400                    fIn ? "ADC" : "DAC", snd_strerror(err)));
    401             rc = VERR_GENERAL_FAILURE; /** @todo Find a better rc. */
     401            rc = VERR_AUDIO_BACKEND_INIT_FAILED;
    402402            break;
    403403        }
     
    410410            LogRel(("ALSA: Failed to initialize hardware parameters: %s\n",
    411411                    snd_strerror(err)));
    412             rc = VERR_GENERAL_FAILURE; /** @todo Find a better rc. */
     412            rc = VERR_AUDIO_BACKEND_INIT_FAILED;
    413413            break;
    414414        }
     
    419419        {
    420420            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;
    422422            break;
    423423        }
     
    428428            LogRel(("ALSA: Failed to set audio format to %d: %s\n",
    429429                    pCfgReq->fmt, snd_strerror(err)));
    430             rc = VERR_GENERAL_FAILURE; /** @todo Find a better rc. */
     430            rc = VERR_AUDIO_BACKEND_INIT_FAILED;
    431431            break;
    432432        }
     
    437437            LogRel(("ALSA: Failed to set frequency to %dHz: %s\n",
    438438                    pCfgReq->freq, snd_strerror(err)));
    439             rc = VERR_GENERAL_FAILURE; /** @todo Find a better rc. */
     439            rc = VERR_AUDIO_BACKEND_INIT_FAILED;
    440440            break;
    441441        }
     
    445445        {
    446446            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;
    448448            break;
    449449        }
     
    453453        {
    454454            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;
    456456            break;
    457457        }
     
    482482                    {
    483483                        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;
    485485                        break;
    486486                    }
     
    492492                {
    493493                    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;
    495495                    break;
    496496                }
     
    513513                    {
    514514                        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;
    516516                        break;
    517517                    }
     
    539539                        LogRel(("ALSA: Failed to set period size %d (%s)\n",
    540540                                period_size_f, snd_strerror(err)));
    541                         rc = VERR_GENERAL_FAILURE; /** @todo Find a better rc. */
     541                        rc = VERR_AUDIO_BACKEND_INIT_FAILED;
    542542                        break;
    543543                    }
     
    553553                {
    554554                    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;
    556556                    break;
    557557                }
     
    579579                    LogRel(("ALSA: Failed to set buffer size %d: %s\n",
    580580                            buffer_size_f, snd_strerror(err)));
    581                     rc = VERR_GENERAL_FAILURE; /** @todo Find a better rc. */
     581                    rc = VERR_AUDIO_BACKEND_INIT_FAILED;
    582582                    break;
    583583                }
     
    591591        {
    592592            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;
    594594            break;
    595595        }
     
    599599        {
    600600            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;
    602602            break;
    603603        }
     
    609609        {
    610610            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;
    612612            break;
    613613        }
     
    620620        {
    621621            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;
    623623            break;
    624624        }
     
    876876                default:
    877877                    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! */
    879880                    break;
    880881            }
  • trunk/src/VBox/Devices/Audio/DrvHostCoreAudio.cpp

    r59097 r59375  
    750750    {
    751751        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;
    753753    }
    754754
     
    758758    {
    759759        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;
    761761    }
    762762
     
    772772    {
    773773        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;
    775775    }
    776776
     
    780780    {
    781781        LogRel(("CoreAudio: Failed to open output component (%RI32)\n", err));
    782         return VERR_GENERAL_FAILURE; /** @todo Fudge! */
     782        return VERR_AUDIO_BACKEND_INIT_FAILED;
    783783    }
    784784
     
    790790    {
    791791        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;
    793793    }
    794794
     
    800800    {
    801801        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;
    803803    }
    804804
     
    809809    {
    810810        LogRel(("CoreAudio: Failed to set current device (%RI32)\n", err));
    811         return VERR_GENERAL_FAILURE; /** @todo Fudge! */
     811        return VERR_AUDIO_BACKEND_INIT_FAILED;
    812812    }
    813813
     
    826826    {
    827827        LogRel(("CoreAudio: Failed to register input callback (%RI32)\n", err));
    828         return VERR_GENERAL_FAILURE; /** @todo Fudge! */
     828        return VERR_AUDIO_BACKEND_INIT_FAILED;
    829829    }
    830830
     
    836836    {
    837837        LogRel(("CoreAudio: Failed to get device format (%RI32)\n", err));
    838         return VERR_GENERAL_FAILURE; /** @todo Fudge! */
     838        return VERR_AUDIO_BACKEND_INIT_FAILED;
    839839    }
    840840
     
    857857            LogRel(("CoreAudio: Failed to create the audio converte(%RI32). Input Format=%d, Output Foramt=%d\n",
    858858                     err, pStreamIn->deviceFormat, pStreamIn->streamFormat));
    859             return VERR_GENERAL_FAILURE; /** @todo Fudge! */
     859            return VERR_AUDIO_BACKEND_INIT_FAILED;
    860860        }
    861861
     
    876876            {
    877877                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;
    879879            }
    880880        }
     
    886886        {
    887887            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;
    889889        }
    890890#if 0
     
    905905    {
    906906        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;
    908908    }
    909909
     
    917917    if (err != noErr)    {
    918918        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;
    920920    }
    921921
     
    925925    {
    926926        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;
    928928    }
    929929
     
    934934    {
    935935        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;
    937937    }
    938938
     
    948948    {
    949949        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;
    951951    }
    952952
     
    10951095    {
    10961096        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;
    10981098    }
    10991099
     
    11031103    {
    11041104        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;
    11061106    }
    11071107
     
    11171117    {
    11181118        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;
    11201120    }
    11211121
     
    11251125    {
    11261126        LogRel(("CoreAudio: Failed to open output component (%RI32)\n", err));
    1127         return VERR_GENERAL_FAILURE; /** @todo Fudge! */
     1127        return VERR_AUDIO_BACKEND_INIT_FAILED;
    11281128    }
    11291129
     
    11351135    {
    11361136        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;
    11381138    }
    11391139
     
    11441144    {
    11451145        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;
    11471147    }
    11481148
     
    11611161    {
    11621162        LogRel(("CoreAudio: Failed to register output callback (%RI32)\n", err));
    1163         return VERR_GENERAL_FAILURE; /** @todo Fudge! */
     1163        return VERR_AUDIO_BACKEND_INIT_FAILED;
    11641164    }
    11651165
     
    11711171    {
    11721172        LogRel(("CoreAudio: Failed to get device format (%RI32)\n", err));
    1173         return VERR_GENERAL_FAILURE; /** @todo Fudge! */
     1173        return VERR_AUDIO_BACKEND_INIT_FAILED;
    11741174    }
    11751175
     
    11881188    {
    11891189        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;
    11911191    }
    11921192
     
    11971197    {
    11981198        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;
    12001200    }
    12011201
     
    12101210    {
    12111211        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;
    12131213    }
    12141214
     
    12181218    {
    12191219        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;
    12211221    }
    12221222
     
    12341234
    12351235        AudioUnitUninitialize(pStreamOut->audioUnit);
    1236         return VERR_GENERAL_FAILURE; /** @todo Fudge! */
     1236        return VERR_AUDIO_BACKEND_INIT_FAILED;
    12371237    }
    12381238
  • trunk/src/VBox/Devices/Audio/DrvHostPulseAudio.cpp

    r59097 r59375  
    380380                LogRel(("PulseAudio: Could not connect input stream \"%s\": %s\n",
    381381                        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;
    383383                break;
    384384            }
     
    394394                LogRel(("PulseAudio: Could not connect playback stream \"%s\": %s\n",
    395395                        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;
    397397                break;
    398398            }
     
    414414                LogRel(("PulseAudio: Failed to initialize stream \"%s\" (state %ld)\n",
    415415                        pszName, sstate));
    416                 rc = VERR_GENERAL_FAILURE; /** @todo Find a better rc. */
     416                rc = VERR_AUDIO_BACKEND_INIT_FAILED;
    417417                break;
    418418            }
     
    491491            LogRel(("PulseAudio: Failed to start threaded mainloop: %s\n",
    492492                     pa_strerror(pa_context_errno(g_pContext))));
    493             rc = VERR_GENERAL_FAILURE; /** @todo Find a better rc. */
     493            rc = VERR_AUDIO_BACKEND_INIT_FAILED;
    494494            break;
    495495        }
     
    505505            LogRel(("PulseAudio: Failed to connect to server: %s\n",
    506506                     pa_strerror(pa_context_errno(g_pContext))));
    507             rc = VERR_GENERAL_FAILURE; /** @todo Find a better rc. */
     507            rc = VERR_AUDIO_BACKEND_INIT_FAILED;
    508508            break;
    509509        }
     
    523523            {
    524524                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;
    526526                break;
    527527            }
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette