[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Linphone-users]Sound card 8 bits
From: |
Simon Morlat |
Subject: |
Re: [Linphone-users]Sound card 8 bits |
Date: |
18 Dec 2002 18:19:24 +0100 |
Le lun 16/12/2002 à 15:58, Stephane List a écrit :
> Hello,
>
> I'm using a sound card that as only one channel of 8 bits for the micro.
> In the code of mediastreamer, I've seen that it must always be a 16
> bits.
>
> If I modify the mediastreamer code to initialise my sound card with 8
> bits mono, will it work ? What are the codec (speex, G711...) that can
> do 8/16 bits ?
Hi,
All codecs must work with 16 bits... You have to modify the MSSoudRead
and MSSoudWrite code to do a conversion from your 8bits to 16bits, like
this:
char *buffer8;
gint16 *buffer16;
for(i=0;i<size;i++)
buffer16[i]= ((gint16)buffer8[i]) << 8;
The quality won't be very good...
PS: it assumes that your card is giving you 8bit linear PCM, not 8bit
Mulaw or Alaw.
Simon
>
> Thanks
>
> Stephane
>
> PS : I'm using an integrated audio codec in a geode processor, so I can't
> change my soundcard :-<
--
Simon Morlat <address@hidden>