[Libav-user] Converting audio sample buffer format

Brad O'Hearne brado at bighillsoftware.com
Tue Feb 26 21:34:07 CET 2013

On Feb 26, 2013, at 1:01 PM, René J.V. Bertin <rjvbertin at gmail.com> wrote:

> I'm guessing nothing (and hoping that a fill function only copies data) ... uint8_t is just a way to say 'byte', and I presume that the const indicates that the function doesn't modify the array. What I don't dare to guess is why the void* type isn't used - is there a practical reason or only a 'programming principle' behind that?

Perhaps I've been staring at this too long and am losing my mind, but there is a difference between uint8_t and int8_t:

typedef signed char 		int8_t
typedef unsigned char 	uint8_t

-- the sign, and max / min values of the byte. If a byte in a sample buffer is signed, say a fictional value of -1, that isn't going to be interpreted properly if assigned to a uint8_t, no? Doesn't a fictional signed range of -1 to 1 need to be translated to an unsigned range of 0 to 2? 

Is this accurate, or is it just lunch time? 



More information about the Libav-user mailing list