From 7839cd4c1da19094928b788fab3b7469b479e377 Mon Sep 17 00:00:00 2001 From: WeebDataHoarder <57538841+WeebDataHoarder@users.noreply.github.com> Date: Thu, 21 Apr 2022 13:03:41 +0200 Subject: [PATCH] Added utilities to fetch ALAC properties --- mp4.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/mp4.go b/mp4.go index 9fd3a90..18c101f 100644 --- a/mp4.go +++ b/mp4.go @@ -213,6 +213,18 @@ func NewFormatDecoder(reader io.Reader) *FormatDecoder { } } +func (d *FormatDecoder) GetChannels() int { + return d.handle.GetChannels() +} + +func (d *FormatDecoder) GetBitDepth() int { + return d.handle.GetBitDepth() +} + +func (d *FormatDecoder) GetSampleRate() int { + return d.handle.GetSampleRate() +} + func (d *FormatDecoder) Read() (buf []byte) { if d.currentSegment >= len(d.parsedMp4.Segments) { //EOF