diff options
author | Fulup Ar Foll <fulup@iot.bzh> | 2018-05-17 21:43:24 +0200 |
---|---|---|
committer | Fulup Ar Foll <fulup@iot.bzh> | 2018-05-17 21:43:24 +0200 |
commit | 253df14bd84f535a54f4d12c95399899e1343c20 (patch) | |
tree | 16093cc86d2874afb3311124613e69e23e74acbc /plugins/alsa/alsa-plug-multi.c | |
parent | 29f5fc4e093b8793eaeeef056d0b998182269718 (diff) |
Initial version with dynamic APIs
Diffstat (limited to 'plugins/alsa/alsa-plug-multi.c')
-rw-r--r-- | plugins/alsa/alsa-plug-multi.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/alsa/alsa-plug-multi.c b/plugins/alsa/alsa-plug-multi.c index 3e82e1e..0dd417d 100644 --- a/plugins/alsa/alsa-plug-multi.c +++ b/plugins/alsa/alsa-plug-multi.c @@ -23,15 +23,17 @@ ALSA_PLUG_PROTO(multi); PUBLIC AlsaPcmInfoT* AlsaCreateMulti(CtlSourceT *source, const char *pcmUid, int open) { - + SoftMixerHandleT *mixerHandle = (SoftMixerHandleT*) source->context; snd_config_t *multiConfig, *elemConfig, *slavesConfig, *slaveConfig, *bindingsConfig, *bindingConfig, *pcmConfig; int error = 0, channelIdx=0; AlsaPcmInfoT *pcmPlug = calloc(1, sizeof (AlsaPcmInfoT)); pcmPlug->uid = pcmUid; pcmPlug->cardid = pcmUid; - AlsaPcmInfoT* pcmSlaves=Softmixer->sndcardCtl; - if (!Softmixer->sndcardCtl) { + assert(mixerHandle); + + AlsaPcmInfoT* pcmSlaves=mixerHandle->backend; + if (!pcmSlaves) { AFB_ApiError(source->api, "AlsaCreateMulti: No Sound Card find [should register snd_cards first]"); goto OnErrorExit; } |