VirtualBox

Changeset 64990 in vbox


Ignore:
Timestamp:
Dec 21, 2016 6:55:19 PM (8 years ago)
Author:
vboxsync
Message:

Audio/DrvAudioCommon.cpp: Added DrvAudioHlpAudMixerCtlToStr().

Location:
trunk/src/VBox/Devices/Audio
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/DrvAudio.h

    r64568 r64990  
    182182
    183183const char *DrvAudioHlpAudDirToStr(PDMAUDIODIR enmDir);
     184const char *DrvAudioHlpAudMixerCtlToStr(PDMAUDIOMIXERCTL enmMixerCtl);
    184185char *DrvAudioHlpAudDevFlagsToStrA(PDMAUDIODEVFLAG fFlags);
    185186
  • trunk/src/VBox/Devices/Audio/DrvAudioCommon.cpp

    r64571 r64990  
    528528
    529529    AssertMsgFailed(("Invalid audio direction %ld\n", enmDir));
     530    return "Unknown";
     531}
     532
     533/**
     534 * Converts an audio mixer control to a string.
     535 *
     536 * @returns Stringified audio mixer control or "Unknown", if not found.
     537 * @param   enmMixerCtl         Audio mixer control to convert.
     538 */
     539const char *DrvAudioHlpAudMixerCtlToStr(PDMAUDIOMIXERCTL enmMixerCtl)
     540{
     541    switch (enmMixerCtl)
     542    {
     543        case PDMAUDIOMIXERCTL_VOLUME_MASTER: return "Unknown";
     544        case PDMAUDIOMIXERCTL_FRONT:         return "Front";
     545        case PDMAUDIOMIXERCTL_CENTER_LFE:    return "Center / LFE";
     546        case PDMAUDIOMIXERCTL_REAR:          return "Rear";
     547        case PDMAUDIOMIXERCTL_LINE_IN:       return "Line-In";
     548        case PDMAUDIOMIXERCTL_MIC_IN:        return "Microphone-In";
     549        default:                             break;
     550    }
     551
     552    AssertMsgFailed(("Invalid mixer control %ld\n", enmMixerCtl));
    530553    return "Unknown";
    531554}
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