diff options
Diffstat (limited to 'plugins/alsa/alsa-plug-vol.c')
-rw-r--r-- | plugins/alsa/alsa-plug-vol.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/plugins/alsa/alsa-plug-vol.c b/plugins/alsa/alsa-plug-vol.c index 09025c4..ade29ac 100644 --- a/plugins/alsa/alsa-plug-vol.c +++ b/plugins/alsa/alsa-plug-vol.c @@ -22,8 +22,13 @@ ALSA_PLUG_PROTO(softvol); // stream uses softvol plugin -PUBLIC void AlsaDeleteSoftvol(SoftMixerT *mixer, AlsaPcmCtlT * ctl) { + +static void softVolConfigClean(SoftMixerT *mixer, void * arg) { + snd_config_t * softvolConfig = arg; + AFB_API_DEBUG(mixer->api, "%s... softvol config", __func__); + snd_config_delete(softvolConfig); + snd_config_update(); } PUBLIC AlsaPcmCtlT *AlsaCreateSoftvol(SoftMixerT *mixer, AlsaStreamAudioT *stream, char* slaveid, AlsaSndCtlT *sndcard, char* ctlName, int max, int open) { @@ -95,7 +100,8 @@ PUBLIC AlsaPcmCtlT *AlsaCreateSoftvol(SoftMixerT *mixer, AlsaStreamAudioT *strea goto OnErrorExit; } - stream->softvolConfig = streamConfig; + pcmVol->private_data = streamConfig; + pcmVol->private_data_clean = softVolConfigClean; // Debug config & pcm //AlsaDumpCtlConfig (mixer, "plug-config", pcmConfig, 1); |