04-06-2020 01:48 AM
hello everyone,
1-I want to convert the audio signal into a bitstream and apply digital modulation schemes
2- At the receiver side then recover the output audio signal.
3- put at the output side I cannot recover the complete and clear signal.
i also attached the screenshot of the code.
suggestions are welcome...
thanks in advance.
04-06-2020 03:33 AM
One problem could be that you're casting your floats (doubles or singles) to integers (type unknown), and then to an I8. A 4 or 8 byte float won't fit in an I8, so you'll loose 1/4th or 1/8th of your data. We can't see this from an image.
Try to cast the array of floats to an array of bytes (without the for loop).
It would be easier to spot problems if the code is clean. Bugs hide in messy code. 'Highlight' of the mess is the init array wire going to the right, then up, to the left, and down again. Can't imagine this works well for you, imagine how it is for us, seeing this for the first time...
04-06-2020 04:19 AM
thanks for your reply,
i convert dbl to fxp and than to i8.
i attached the snippet of this code. please see this code and guide.what exactly the issue is ?
04-06-2020 07:06 AM
@Aht22 wrote:
thanks for your reply,
i convert dbl to fxp and than to i8.
No, you're casting a dbl to a fxp, and then convert it to i8.
Put a probe on the dbls and fxps to see that the fxps don't have anything to do with the dbls. I was assuming you'd want to send the binary doubles, but if you want to send values with a range from -128 to +128 casting is the wrong tool. The fxps are not really needed, you can simply convert (not cast) the dbls to i8s.
04-06-2020 07:24 AM - edited 04-06-2020 07:32 AM
This is something new to me. I just assumed all audio formats were formatted as integer numbers representing sample amplitude at that integer type - e.g., a byte for 8-bit encoding, a word for 16-bit encoding, etc...