Milo Wong wrote:
> So, I am going to encode the analog output of audio source(float, -1
> to +1 ??) to digital bit streams(byte) for digital signal Processing
> later on.
What exactly are you trying to accomplish? The samples you get from an
audio source, like any other GNU radio source, have already been
digitized. Are you trying to extract a modulated signal that contains
digital data (i.e. FSK, PSK) from your audio source?
> But I found there's no ADC or encoder in GRC which could properly
> convert float: -1~+1 to Byte: 00~FF. Is there any way to achieve that? 
If you're just looking to convert floats to bytes, use either
gr.float_to_char (range -128 to 127) or gr.float_to_uchar (range 0 to
255). However, be aware that you will lose a lot of dynamic range—the
input is converted to a long integer first, then clipped. You will need
to scale your signal by adding 1 and dividing by 2/255 before you
convert it.

You



_______________________________________________
Discuss-gnuradio mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to