Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidPath indicates that the path is... wait for it... invalid! ErrInvalidPath = errors.New("invalid path") )
Functions ¶
This section is empty.
Types ¶
type Format ¶
type Format string
Format is the audio format canonical name
var ( // Unknown means that this library couldn't detect the format type Unknown Format = "unknown" // Wav is the Waveform Audio File Format (WAVE, or more commonly known // as WAV due to its filename extension) Wav Format = "wav" // Aiff is the Audio Interchange File Format Aiff Format = "aiff" // VideoMP4 is the video mp4 format VideoMP4 Format = "video/mp4" // Mp3 is the audio mpeg/3 format Mp3 Format = "mp3" // MIDI is the MIDI format MIDI Format = "midi" )
func FileFormat ¶
FileFormat returns the known format of the passed path.
func HeaderFormat ¶
HeaderFormat is looking at the header of a file and trying to guess the format. In most cases you can pass less than 512 bytes. Note that this function won't tell the difference between a video and an audio mp4 container. See https://golang.org/pkg/net/http/#DetectContentType for details.
Click to show internal directories.
Click to hide internal directories.