Extract the number of samples and frames from AAC data.
@paramin buf pointer to AAC data buffer
@paramout samples Pointer to where number of samples is written
@paramout frames Pointer to where number of frames is written
@return Returns 0 on success, error code on failure.