Re: [Freeswitch-dev] Merging A Law Audio data

2010-06-29 Thread Steve Underwood
On 06/29/2010 09:38 PM, Anthony Minessale wrote:
> you either have to decode them and merge them together by adding the 
> samples or know some kind of dsp trick to do it while its encoded.
There isn't really a DSP trick you can use. You could use a 64k entry 
look up table, but otherwise you decompress the A-law, add with 
saturation, compress to A-law and send it.

Steve

>
>
> On Mon, Jun 28, 2010 at 4:34 AM, Achim Stamm  > wrote:
>
> Hello!
>
> I have following problem:
>
> I get 160 Bytes Audio data (Format PCM A Law) from a Free Switch
> Session
> and save the data in a byte vector.
> At same time i get 160 Bytes Audio data (Format PCM A Law) from an
> external program and save the data in a byte vector.
> I want to merge the two audio data like a conference FreeSwitch
> Session
> mixed them.
> Can I use a Free Switch audio - Merge (C ++)  Function ?
> How does Free Switch merge Audio Data in Conference mode ?
>
> regards
>
> Achim Stamm
>
> --
> Achim Stamm, Dipl.-Inform. (FH)
>
>
> Lyncker & Theis GmbH
> Wilhelmstr. 16
> 65185 Wiesbaden
> Germany
>
> Fon +49 611/9006951
> Fax +49 611/9406125
>
>
> Handelsregister: HRB 23156 Amtsgericht Wiesbaden
> Steuernummer: 04323897052
> USt-IdNr.: DE255806399
>
> Geschäftsführer:
> Filip Lyncker,
> Armin Theis
>
>
> ___
> FreeSWITCH-dev mailing list
> [email protected]
> 
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> http://www.freeswitch.org
>
>
>
>
> -- 
> Anthony Minessale II
>
> FreeSWITCH http://www.freeswitch.org/
> ClueCon http://www.cluecon.com/
> Twitter: http://twitter.com/FreeSWITCH_wire
>
> AIM: anthm
> MSN:[email protected] 
> 
> GTALK/JABBER/PAYPAL:[email protected] 
> 
> IRC: irc.freenode.net  #freeswitch
>
> FreeSWITCH Developer Conference
> sip:[email protected] 
> 
> googletalk:[email protected] 
> 
> pstn:+19193869900
>
>
> ___
> FreeSWITCH-dev mailing list
> [email protected]
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> http://www.freeswitch.org
>


___
FreeSWITCH-dev mailing list
[email protected]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org


Re: [Freeswitch-dev] Merging A Law Audio data

2010-06-29 Thread Anthony Minessale
you either have to decode them and merge them together by adding the samples
or know some kind of dsp trick to do it while its encoded.


On Mon, Jun 28, 2010 at 4:34 AM, Achim Stamm  wrote:

> Hello!
>
> I have following problem:
>
> I get 160 Bytes Audio data (Format PCM A Law) from a Free Switch Session
> and save the data in a byte vector.
> At same time i get 160 Bytes Audio data (Format PCM A Law) from an
> external program and save the data in a byte vector.
> I want to merge the two audio data like a conference FreeSwitch Session
> mixed them.
> Can I use a Free Switch audio - Merge (C ++)  Function ?
> How does Free Switch merge Audio Data in Conference mode ?
>
> regards
>
> Achim Stamm
>
> --
> Achim Stamm, Dipl.-Inform. (FH)
>
>
> Lyncker & Theis GmbH
> Wilhelmstr. 16
> 65185 Wiesbaden
> Germany
>
> Fon +49 611/9006951
> Fax +49 611/9406125
>
>
> Handelsregister: HRB 23156 Amtsgericht Wiesbaden
> Steuernummer: 04323897052
> USt-IdNr.: DE255806399
>
> Geschäftsführer:
> Filip Lyncker,
> Armin Theis
>
>
> ___
> FreeSWITCH-dev mailing list
> [email protected]
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> http://www.freeswitch.org
>



-- 
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
Twitter: http://twitter.com/FreeSWITCH_wire

AIM: anthm
MSN:[email protected] 
GTALK/JABBER/PAYPAL:[email protected]
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:[email protected] 
googletalk:[email protected]
pstn:+19193869900
___
FreeSWITCH-dev mailing list
[email protected]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org


Re: [Freeswitch-dev] Merging A Law Audio data

2010-06-29 Thread Brian West
But thats raw PCM that its mixing together.  I don't think you can directly mix 
A Law audio without first taking it to Signed Linear.

/b

On Jun 29, 2010, at 8:29 AM, Steven Ayre wrote:

> See the source of src/mod/applications/mod_conference/mod_conference.c, 
> function conference_thread_run
> 
> It reads frames from each of the participants and manually combines them all 
> to form a mux frame, which is then sent to all participants. This is done 
> using the internal audio representation (possibly L16). So even where 
> everyone is using the same codec, e.g. PCMA, there's transcoding going on.
> 
> I don't know any way to achieve what you want at the moment, but someone else 
> might. You should be able to write you own module to do it too though.
> 
> -Steve


___
FreeSWITCH-dev mailing list
[email protected]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org


Re: [Freeswitch-dev] Merging A Law Audio data

2010-06-29 Thread Steven Ayre
See the source of src/mod/applications/mod_conference/mod_conference.c,
function conference_thread_run

It reads frames from each of the participants and manually combines them all
to form a mux frame, which is then sent to all participants. This is done
using the internal audio representation (possibly L16). So even where
everyone is using the same codec, e.g. PCMA, there's transcoding going on.

I don't know any way to achieve what you want at the moment, but someone
else might. You should be able to write you own module to do it too though.

-Steve


On 28 June 2010 10:34, Achim Stamm  wrote:

> Hello!
>
> I have following problem:
>
> I get 160 Bytes Audio data (Format PCM A Law) from a Free Switch Session
> and save the data in a byte vector.
> At same time i get 160 Bytes Audio data (Format PCM A Law) from an
> external program and save the data in a byte vector.
> I want to merge the two audio data like a conference FreeSwitch Session
> mixed them.
> Can I use a Free Switch audio - Merge (C ++)  Function ?
> How does Free Switch merge Audio Data in Conference mode ?
>
> regards
>
> Achim Stamm
>
> --
> Achim Stamm, Dipl.-Inform. (FH)
>
>
> Lyncker & Theis GmbH
> Wilhelmstr. 16
> 65185 Wiesbaden
> Germany
>
> Fon +49 611/9006951
> Fax +49 611/9406125
>
>
> Handelsregister: HRB 23156 Amtsgericht Wiesbaden
> Steuernummer: 04323897052
> USt-IdNr.: DE255806399
>
> Geschäftsführer:
> Filip Lyncker,
> Armin Theis
>
>
> ___
> FreeSWITCH-dev mailing list
> [email protected]
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> http://www.freeswitch.org
>
___
FreeSWITCH-dev mailing list
[email protected]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org