Use inline functions to convert buffer data to scalars.