Documentation ¶
Index ¶
Constants ¶
const ( // PCMType is the compression type for PCM (uncompressed) audio. PCMType = "NONE" // PCMName is the descriptive name for PCM (uncompressed) audio. PCMName = "not compressed" )
const StandardVersion = 0xA2805140
StardardVersion is the recognized AIFF-C version number.
const VADPCMLoopSize = 44
VADPCMLoopSize is the size of a VADPCM loop record.
Variables ¶
var ErrNotAIFF = errors.New("not an AIFF file")
ErrNotAiff indicates that the file is not an AIFF file.
Functions ¶
This section is empty.
Types ¶
type AIFF ¶
type AIFF struct { FormatVersion FormatVersion // AIFC only. Common Common Chunks []Chunk // Excludes FormatVersion and Common, above. }
An AIFF is a decoded AIFF or AIFF-C file.
func (*AIFF) GetSamples16 ¶
GetSamples16 returns the samples in an AIFF file, converted to signed-16 bit. Not all conversions are supported.
func (*AIFF) IsCompressed ¶
IsCompressed returns true if this is a compressed AIFF file.
type ApplicationData ¶
A ApplicationData is the APPL chunk in an AIFF file.
type Common ¶
type Common struct { NumChannels int NumFrames int SampleSize int SampleRate extended.Extended Compression [4]byte CompressionName string }
A Common is the common chunk in an AIFF file.
func (*Common) IsComprsesed ¶
IsCompressed returns true if this belongs to a compressed AIFF file.
type FormatVersion ¶
type FormatVersion struct {
Timestamp uint32
}
A FormatVersion is the FVER chunk in an AIFC file.
type Instrument ¶
type Instrument struct { BaseNote int Detune int LowNote int HighNote int LowVelocity int HighVelocity int Gain int SustainLoop Loop ReleaseLoop Loop }
An Instrument is a chunk describing how to use the data in an AIFF file as a sampled musical instrument.
type Markers ¶
type Markers struct {
Markers []Marker
}
A Markers is the MARK chunk in an AIFF file.
type VADPCMCodes ¶
A VADPCMCodes contains the codebook for a VADPCM-compressed file.
type VADPCMLoop ¶
A VADPCMLoop is a loop in a VADPCM-encoded file.
func (*VADPCMLoop) Marshal ¶
func (l *VADPCMLoop) Marshal(d []byte)
Marshal writes the loop to the given buffer.
func (*VADPCMLoop) Unmarshal ¶
func (l *VADPCMLoop) Unmarshal(d []byte)
Unmarshal reads the loop from the given buffer.
type VADPCMLoops ¶
type VADPCMLoops struct {
Loops []VADPCMLoop
}
A VADPCMLoops contains the loop information for a VADPCM-encoded file.