From 682c20a1b46c366713d29df25aa6c75b9fbd266f Mon Sep 17 00:00:00 2001 From: Cezary Siwek Date: Fri, 2 Aug 2019 15:38:14 +0100 Subject: [PATCH] frames counter --- opus.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/opus.go b/opus.go index c5b2e8d..fd48a98 100644 --- a/opus.go +++ b/opus.go @@ -37,6 +37,10 @@ type OpusReader struct { segmentMap map[uint8]uint8 } +type OpusSample struct { + Payload []byte +} + // New builds a new OGG Opus reader func NewFile(fileName string) (*OpusReader, error) { f, err := os.Open(fileName) @@ -258,6 +262,7 @@ func (i *OpusReader) getPageSample() ([]byte, error) { } i.currentSampleLen = getFrameSize(uint8(tocConfig)) + fmt.Printf("Frames size: %v \n", i.currentSampleLen) duration := uint32(frames) * length fmt.Printf("Len: %v Frames: %v , Dration :%v\n", length, frames, duration) i.CurrentSampleDuration = duration