Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 80b9ab3 in mainline


Ignore:
Timestamp:
2011-11-25T23:26:11Z (10 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master
Children:
427069d
Parents:
485a496
Message:

sb16: Fix: Set volume to max when too big level requested.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/audio/sb16/mixer.c

    r485a496 r80b9ab3  
    223223            &volume_table[mixer->type].table[index].channel_table[channel];
    224224
    225         if (level > chan->volume_levels)
    226                 level = chan->volume_levels;
     225        if (level >= chan->volume_levels)
     226                level = chan->volume_levels - 1;
    227227
    228228        pio_write_8(&mixer->regs->mixer_address, chan->address);
Note: See TracChangeset for help on using the changeset viewer.