VirtualBox

Changeset 91572 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Oct 5, 2021 3:43:16 PM (3 years ago)
Author:
vboxsync
Message:

Audio/Validation Kit: Implemented setting the system's master volume to 100% on ALSA / PulseAudio stacks [build fix]. ​bugref:10008

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/utils/audio/vkatCommon.cpp

    r91571 r91572  
    7878 * @param   uPercentVol         Volume (in percent) to set.
    7979 */
    80 int audioTestSetMasterVolume(unsigned uPercentVol)
     80int audioTestSetMasterVolume(unsigned uVolPercent)
    8181{
    8282#ifdef VBOX_WITH_AUDIO_ALSA
     
    119119
    120120    long uVolMin, uVolMax;
    121 
    122121    snd_mixer_selem_get_playback_volume_range(elem, &uVolMin, &uVolMax);
    123122    ALSA_CHECK_ERR_RET(("ALSA: Failed to get playback volume range: %s\n", snd_strerror(err)));
    124123
    125     long const uVol = RT_MIN(uPercentVol, 100) * uVolMax / 100;
     124    long const uVol = RT_MIN(uVolPercent, 100) * uVolMax / 100;
    126125
    127126    err = snd_mixer_selem_set_playback_volume(elem, SND_MIXER_SCHN_FRONT_LEFT, uVol);
     
    137136# undef ALSA_CHECK_ERR_RET
    138137
     138#else  /* !VBOX_WITH_AUDIO_ALSA */
     139    RT_NOREF(uVolPercent);
    139140#endif /* VBOX_WITH_AUDIO_ALSA */
    140141
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