aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/alsa/alsa-api-mixer.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/alsa/alsa-api-mixer.c')
-rw-r--r--plugins/alsa/alsa-api-mixer.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/plugins/alsa/alsa-api-mixer.c b/plugins/alsa/alsa-api-mixer.c
index bc27e24..16b05ff 100644
--- a/plugins/alsa/alsa-api-mixer.c
+++ b/plugins/alsa/alsa-api-mixer.c
@@ -614,13 +614,16 @@ STATIC void MixerAttachVerb(afb_req_t request) {
// In AVIRT mode, we require both the loops and streams JSON objects to
// construct the loopbacks, so when the loops are set, but the streams
// are not, we need to save the loops until the streams are given to us
- if (streamsJ && (loopsJ || LoopsJ)) {
- AFB_API_INFO(mixer->api, "%s set LOOPS/AVIRT", __func__);
- error = ApiLoopAttach(mixer, request, uid,
- ((loopsJ) ? loopsJ : LoopsJ), streamsJ);
- if (error)
- goto fail;
- }
+ if (streamsJ && (loopsJ || LoopsJ)) {
+ AFB_API_INFO(mixer->api, "%s set LOOPS/AVIRT", __func__);
+ error = ApiLoopAttach(mixer, request, uid, ((loopsJ) ? loopsJ : LoopsJ), streamsJ);
+ if (error) {
+ goto fail;
+ }
+ // Now, forget the saved LoopsJ
+ if (LoopsJ)
+ LoopsJ = NULL;
+ }
AFB_API_INFO(mixer->api, "%s set RAMPS", __func__);