add packet_get_samples_per_frame, some error query, prevent of read out of bounds