Changeset a68e5e2 in mainline
- Timestamp:
- 2011-11-11T17:23:04Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4440581
- Parents:
- 88dcd19
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/audio/sb16/mixer.c
r88dcd19 ra68e5e2 144 144 if (!sb_mixer_get_control_item_count(mixer)) 145 145 return; 146 unsigned levels = 0, channels = 0, current_level; 146 const unsigned item = 0; /* 0 is Master. */ 147 unsigned levels = 0, channels = 0, level; 147 148 const char *name = NULL; 148 sb_mixer_get_control_item_info(mixer, 0, &name, &channels, &levels); 149 unsigned channel = 0; 150 for (;channel < channels; ++channel) { 151 current_level = 152 sb_mixer_get_volume_level(mixer, 0, channel); 149 150 sb_mixer_get_control_item_info(mixer, item, &name, &channels, &levels); 151 for (unsigned channel = 0; channel < channels; ++channel) { 152 level = sb_mixer_get_volume_level(mixer, item, channel); 153 153 ddf_log_note("Setting %s channel %d to %d (%d).\n", 154 name, channel, levels - 1, current_level); 155 156 sb_mixer_set_volume_level(mixer, 0, channel, levels - 1); 157 158 current_level = 159 sb_mixer_get_volume_level(mixer, 0, channel); 154 name, channel, levels - 1, level); 155 156 sb_mixer_set_volume_level(mixer, item, channel, levels - 1); 157 158 level = sb_mixer_get_volume_level(mixer, item, channel); 160 159 ddf_log_note("%s channel %d set to %d.\n", 161 name, channel, current_level);160 name, channel, level); 162 161 } 163 164 162 } 165 163 /*----------------------------------------------------------------------------*/
Note:
See TracChangeset
for help on using the changeset viewer.