func (v *AacDecoder) NumTotalAccessUnits() int {
	return int(C.aacdec_num_total_access_units(&v.m))
}
This is the number of total access units that have passed through the decoder.
@remark Statistics.
package fdkaac
import "C"
import (
	"fmt"
	"unsafe"
)
const (
	aacDecNotEnoughBits = 0x1002
)
type AacDecoder struct {
	m C.aacdec_t
}
func NewAacDecoder() *AacDecoder {
	return &AacDecoder{}
}
func (v *AacDecoder) InitRaw(asc []byte) (err error) {
	p := (*C.char)(unsafe.Pointer(&asc[0]))
	pSize := C.int(len(asc))
	r := C.aacdec_init_raw(&v.m, p, pSize)
	if int(r) != 0 {
		return fmt.Errorf("init RAW decoder failed, code is %d", int(r))
	}
	return nil
}
func (v *AacDecoder) InitAdts() (err error) {
	r := C.aacdec_init_adts(&v.m)
	if int(r) != 0 {
		return fmt.Errorf("init ADTS decoder failed, code is %d", int(r))
	}
	return nil
}
func (v *AacDecoder) Close() error {
	C.aacdec_close(&v.m)
	return nil
}
func (v *AacDecoder) fill(input []byte) (err error) {
	p := (*C.char)(unsafe.Pointer(&input[0]))
	pSize := C.int(len(input))
	leftSize := C.int(0)
	r := C.aacdec_fill(&v.m, p, pSize, &leftSize)
	if int(r) != 0 {
		return fmt.Errorf("fill aac decoder failed, code is %d", int(r))
	}
	if int(leftSize) > 0 {
		return fmt.Errorf("decoder left %v bytes", int(leftSize))
	}
	return
}
func (v *AacDecoder) Decode(frame []byte) (pcm []byte, err error) {
	if len(frame) > 0 {
		if err = v.fill(frame); err != nil {
			return
		}
	}
	nbPcm := int(C.aacdec_pcm_size(&v.m))
	if nbPcm == 0 {
		nbPcm = 50 * 1024
	}
	pcm = make([]byte, nbPcm)
	p := (*C.char)(unsafe.Pointer(&pcm[0]))
	pSize := C.int(nbPcm)
	validSize := C.int(0)
	r := C.aacdec_decode_frame(&v.m, p, pSize, &validSize)
	if int(r) == aacDecNotEnoughBits {
		return nil, nil
	}
	if int(r) != 0 {
		return nil, fmt.Errorf("decode frame failed, code is %d", int(r))
	}
	return pcm[0:int(validSize)], nil
}
func (v *AacDecoder) SampleBits() int {
	return int(C.aacdec_sample_bits(&v.m))
}
func (v *AacDecoder) SampleRate() int {
	return int(C.aacdec_sample_rate(&v.m))
}
func (v *AacDecoder) FrameSize() int {
	return int(C.aacdec_frame_size(&v.m))
}
func (v *AacDecoder) NumChannels() int {
	return int(C.aacdec_num_channels(&v.m))
}
func (v *AacDecoder) AacSampleRate() int {
	return int(C.aacdec_aac_sample_rate(&v.m))
}
func (v *AacDecoder) Profile() int {
	return int(C.aacdec_profile(&v.m))
}
func (v *AacDecoder) AudioObjectType() int {
	return int(C.aacdec_audio_object_type(&v.m))
}
func (v *AacDecoder) ChannelConfig() int {
	return int(C.aacdec_channel_config(&v.m))
}
func (v *AacDecoder) Bitrate() int {
	return int(C.aacdec_bitrate(&v.m))
}
func (v *AacDecoder) AacSamplesPerFrame() int {
	return int(C.aacdec_aac_samples_per_frame(&v.m))
}
func (v *AacDecoder) AacNumChannels() int {
	return int(C.aacdec_aac_num_channels(&v.m))
}
func (v *AacDecoder) ExtensionAudioObjectType() int {
	return int(C.aacdec_extension_audio_object_type(&v.m))
}
func (v *AacDecoder) ExtensionSamplingRate() int {
	return int(C.aacdec_extension_sampling_rate(&v.m))
}
func (v *AacDecoder) NumLostAccessUnits() int {
	return int(C.aacdec_num_lost_access_units(&v.m))
}
func (v *AacDecoder) NumTotalBytes() int {
	return int(C.aacdec_num_total_bytes(&v.m))
}
func (v *AacDecoder) NumBadBytes() int {
	return int(C.aacdec_num_bad_bytes(&v.m))
}