Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

base fork: m-labs/flickernoise
base: e240f4e
...
head fork: m-labs/flickernoise
compare: 9a58ed8
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Showing with 7 additions and 6 deletions.
  1. +6 −5 src/gui/audio.c
  2. +1 −1  src/shortcuts.c
11 src/gui/audio.c
View
@@ -79,7 +79,7 @@ static void set_level(int channel, unsigned int val)
{
int request;
- val = val | (val << 8);
+ val = channel ? val | (mic_boost << 8) : val | (val << 8);
request = channel ? SOUND_MIXER_WRITE(SOUND_MIXER_MIC) : SOUND_MIXER_WRITE(SOUND_MIXER_LINE);
ioctl(mixer_fd, request, &val);
}
@@ -119,9 +119,9 @@ static void mute_callback(mtk_event *e, void *arg)
}
}
-static void set_micboost(int boost)
+static inline void set_micboost(int boost)
{
- ioctl(mixer_fd, SOUND_MIXER_WRITE(SOUND_MIXER_MIC_BOOST), &boost);
+ set_level(1, (mic_mute ? 0 : mic_vol) | (boost << 8));
}
static void micboost_callback(mtk_event *e, void *arg)
@@ -145,16 +145,17 @@ void load_audio_config(void)
mtk_cmdf(appid, "b_mutmic.set(-state %s)", mic_mute ? "on" : "off");
mtk_cmdf(appid, "b_micboost.set(-state %s)", mic_boost ? "on" : "off");
+ set_micboost(mic_boost);
+
if(line_mute)
set_level(0, 0);
else
set_level(0, line_vol);
+
if(mic_mute)
set_level(1, 0);
else
set_level(1, mic_vol);
-
- set_micboost(mic_boost);
}
static void set_config(void)
2  src/shortcuts.c
View
@@ -105,7 +105,7 @@ static void shortcuts_callback(mtk_event *e, int count)
clean_shutdown(1);
else if(ctrl && (e[i].press.code == MTK_KEY_F1))
switch_resolution();
- else if(ctrl && (e[i].press.code == MTK_KEY_PAUSE))
+ else if(e[i].press.code == MTK_KEY_SYSRQ)
fbgrab(NULL);
else if(ctrl && (e[i].press.code == MTK_KEY_H))
help();

No commit comments for this range

Something went wrong with that request. Please try again.