Hi ,
I am trying to convert signed int samples from the codec to unsigned char ( 8 bit ) for libltc
I'm using in the interupt but i think its too slow..
unsigned char samples = (right_in >> 8) & 0xff;
ltc_decoder_write (decoder, &samples, 1, 0);
I was looking at the Mods available in your codec but i'm not sure how to use them ?
how do I get the library / sketch to use MultiSU16X8toL16 ?
it would save time ? the libltc function i'm using requires a pointer to 'unsigned 8 bit char' samples buffer..
I tried,
int temp1;
int temp2;
MultiSU16X8toL16(temp1,temp2, &right_in); // can i use this multiplyer to get 8bit unsigned char ?
ltc_decoder_write (decoder, &temp1, 1, 0);
but i get errors...
- It is currently Tue Jun 28, 2022 2:12 am • All times are UTC - 8 hours [ DST ]
point to codec shield buffer
2 posts
• Page 1 of 1
Re: point to codec shield buffer
if you just want 16b signed -> 8b unsigned, do the following (byte = unsigned char)
byte output = (right_in >> 8) + 0x80;
byte output = (right_in >> 8) + 0x80;
- guest
- Site Admin
- Posts: 449
- Joined: Thu May 20, 2010 11:58 pm
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 3 guests