Skip to content

Commit

Permalink
frames counter
Browse files Browse the repository at this point in the history
  • Loading branch information
csiwek committed Aug 2, 2019
1 parent 8ce5b1a commit 682c20a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions opus.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 682c20a

Please sign in to comment.