diff options
Diffstat (limited to 'apps/audio_thread.c')
-rw-r--r-- | apps/audio_thread.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/apps/audio_thread.c b/apps/audio_thread.c index 3af8b2bbf6..74f18454cc 100644 --- a/apps/audio_thread.c +++ b/apps/audio_thread.c | |||
@@ -27,6 +27,8 @@ | |||
27 | #include "usb.h" | 27 | #include "usb.h" |
28 | #include "pcm.h" | 28 | #include "pcm.h" |
29 | #include "sound.h" | 29 | #include "sound.h" |
30 | #include "pcmbuf.h" | ||
31 | #include "appevents.h" | ||
30 | #include "audio_thread.h" | 32 | #include "audio_thread.h" |
31 | #ifdef AUDIO_HAVE_RECORDING | 33 | #ifdef AUDIO_HAVE_RECORDING |
32 | #include "pcm_record.h" | 34 | #include "pcm_record.h" |
@@ -108,6 +110,13 @@ static void NORETURN_ATTR audio_thread(void) | |||
108 | } | 110 | } |
109 | } | 111 | } |
110 | 112 | ||
113 | void audio_voice_event(unsigned short id, void *data) | ||
114 | { | ||
115 | (void)id; | ||
116 | /* Make audio play softly while voice is speaking */ | ||
117 | pcmbuf_soft_mode(*(bool *)data); | ||
118 | } | ||
119 | |||
111 | void audio_queue_post(long id, intptr_t data) | 120 | void audio_queue_post(long id, intptr_t data) |
112 | { | 121 | { |
113 | queue_post(&audio_queue, id, data); | 122 | queue_post(&audio_queue, id, data); |
@@ -170,6 +179,8 @@ void INIT_ATTR audio_init(void) | |||
170 | recording_init(); | 179 | recording_init(); |
171 | #endif | 180 | #endif |
172 | 181 | ||
182 | add_event(VOICE_EVENT_IS_PLAYING, audio_voice_event); | ||
183 | |||
173 | /* Probably safe to say */ | 184 | /* Probably safe to say */ |
174 | audio_is_initialized = true; | 185 | audio_is_initialized = true; |
175 | 186 | ||