[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Linphone-developers] Patch to support different alsa

From: ingo . krabbe
Subject: Re: [Linphone-developers] Patch to support different alsa
Date: Wed, 2 Apr 2014 11:47:43 +0200

And of course I forgot to free the alloced area...

>> Hey Linphoners,
>> today I tried to setup my laptop with linphone. I use two soundcards in my 
>> laptop, one for radio/music listening is a HighDefinition USB Card plugged 
>> into a hifi amplifier and should be used for ring tones only, as I want to 
>> notice when a call comes in, the other one I want to use for playback 
>> through headphones.
>> Once you got familiar with alsa you should switch off any sound daemons, 
>> imho, as its much harder to customize sound daemon configuration, but 
>> configuring alsa. So did I, years ago actually.
>> Of course I don't want linphone to block control of my sound devices as 
>> other software I might want to run as my favourite game, a browser or a 
>> music player might want to play audio through the cards too. So I cannot use 
>> the device detection algorithm, that finds cards only, but I need to specify 
>> two custom alsa devices, that are configured as dmix slaves.
>> But the alsadev configuration string is interpreted as one string and 
>> repeated configuration strings aren't handled. So with the current source 
>> code I can only setup one custom alsa device.
>> The patch attached modifies the configuration algorithm to read alsadev as a 
>> , separated list of custom alsa devices.
>> If you extend the delimiters to several characters (",;:" for example) you 
>> should write some extra code to strip delimiters from the string. I can do 
>> that if you request that, but the code works for me, so I'll leave it as it 
>> is for now.
>> cheers ingo
>> _______________________________________________
>> Linphone-developers mailing list
>> address@hidden
commit feaa86bf7c5c66bb1e3008f15fcaebc03ba3f9e8
Author: Ingo Krabbe <address@hidden>
Date:   Wed Apr 2 11:45:39 2014 +0200

    free the leak

diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c
index cb1d0c2..0415727 100644
--- a/coreapi/linphonecore.c
+++ b/coreapi/linphonecore.c
@@ -555,6 +555,7 @@ static void sound_config_read(LinphoneCore *lc)
+               free(d);
        if (tmp>0) ms_alsa_card_set_forced_sample_rate(tmp);

reply via email to

[Prev in Thread] Current Thread [Next in Thread]