Versions in this module Expand all Collapse all v0 v0.3.0 Oct 4, 2026 Changes in this version + const DefaultDeflateLevel + var ErrTooLarge = errors.New("file declares too much data") + type SaveOption func(*saveOptions) + func WithDeflate(level int) SaveOption v0.2.0 Sep 26, 2026 Changes in this version + const CoordinateCartesian + const CoordinateSpherical + const CoordinateSphericalHarmonics + const DataTypeFIR + const DataTypeSOS + const DataTypeTF + const DataTypeTFE + const UnitsCartesianMetres + const UnitsSphericalDegrees + var ErrIndexOutOfRange = errors.New("index out of range") + var ErrNoSamplingRate = errors.New("no sampling rate stored") + var ErrNotLoaded = errors.New("audio data not loaded (file opened with OpenLazy)") + var ErrNotSOFA = errors.New("not a SOFA file") + var ErrUnsupportedDataType = errors.New("unsupported DataType") + var ErrVaryingSamplingRate = errors.New("sampling rate varies across measurements") + type Attribute struct + Name string + Value any + type File struct + APIName string + APIVersion string + ApplicationName string + ApplicationVersion string + Attributes []Attribute + AuthorContact string + Comment string + Conventions string + DataType string + DateCreated string + DateModified string + Delay []float64 + Dropped []string + E int + EmitterPositionType string + EmitterPositionUnits string + EmitterPositions []Vector3 + EmitterPositionsM [][]Vector3 + Frequencies []float64 + History string + ImpulseResponses [][][]float64 + License string + ListenerPositionType string + ListenerPositionUnits string + ListenerPositions []Vector3 + ListenerUp Vector3 + ListenerUps []Vector3 + ListenerView Vector3 + ListenerViewType string + ListenerViewUnits string + ListenerViews []Vector3 + M int + N int + Organization string + Origin string + R int + ReceiverPositionType string + ReceiverPositionUnits string + ReceiverPositions []Vector3 + ReceiverPositionsM [][]Vector3 + References string + RoomTemperature float64 + RoomType string + RoomVolume float64 + SOFAConventions string + SOFAConventionsVersion string + SOSCoefficients [][][]float64 + SamplingRate []float64 + SourcePositionType string + SourcePositionUnits string + SourcePositions []Vector3 + TFImag [][][]float64 + TFImagE [][][][]float64 + TFReal [][][]float64 + TFRealE [][][][]float64 + Title string + VariableAttributes map[string][]Attribute + Variables []Variable + Version string + func Open(path string) (*File, error) + func OpenLazy(path string) (*File, error) + func OpenLazyReader(r io.ReaderAt, size int64) (*File, error) + func OpenReader(r io.ReaderAt, size int64) (*File, error) + func (f *File) AmbisonicsOrder() (order int, ok bool) + func (f *File) Close() error + func (f *File) ConventionWarnings() []string + func (f *File) DelayAt(m, r int) (float64, error) + func (f *File) DelayDimensions() []string + func (f *File) Duration() (float64, error) + func (f *File) IRAt(m, r int) ([]float64, error) + func (f *File) IRPeakdB(m, r int) (float64, error) + func (f *File) IsBRIR() bool + func (f *File) IsDirectivity() bool + func (f *File) IsSHEncoded() bool + func (f *File) IsSRIR() bool + func (f *File) RangeMeasurements(fn func(m int, ir [][]float64) error) error + func (f *File) RangeMeasurementsTF(fn func(m int, re, im [][]float64) error) error + func (f *File) ReadMeasurement(m int) ([][]float64, error) + func (f *File) ReadMeasurementSOS(m int) ([][]float64, error) + func (f *File) ReadMeasurementTF(m int) (re, im [][]float64, err error) + func (f *File) ReadMeasurementTFE(m int) (re, im [][][]float64, err error) + func (f *File) SHCoefficientCount() int + func (f *File) SHOrder() (lmax int, ok bool) + func (f *File) SHWarnings() []string + func (f *File) SamplingRateAt(m int) (float64, error) + func (f *File) SamplingRateScalar() (float64, error) + func (f *File) Save(path string) (err error) + func (f *File) SourcePositionAt(m int) (Vector3, error) + func (f *File) WriteTo(w io.Writer) (n int64, err error) + type ValidationError struct + Err error + Field string + func (e *ValidationError) Error() string + func (e *ValidationError) Unwrap() error + type Variable struct + Attributes []Attribute + Chars []byte + Dims []string + Name string + Shape []int + Values []float64 + type Vector3 struct + X float64 + Y float64 + Z float64