Documentation ¶
Index ¶
- Constants
- func SoundFileCheckWave(file io.ReadSeeker) (ok bool)
- type SoundFileReaderWave
- func (r *SoundFileReaderWave) Close() error
- func (r *SoundFileReaderWave) Info() audio.SoundFileInfo
- func (r *SoundFileReaderWave) Open(file io.ReadSeeker) (info audio.SoundFileInfo, err error)
- func (r *SoundFileReaderWave) Read(data []int16) (samplesRead int64, err error)
- func (r *SoundFileReaderWave) Seek(sampleOffset int64) error
Constants ¶
View Source
const ( RIFFMainChunkSize = 12 // The size of the main RIFF chunk, at the beginning of the file. RIFFHeader = "RIFF" // The "Chunk ID" in the main RIFF chunk. RIFFFormat = "WAVE" // The "Format" in the main RIFF chunk. WaveHeader = "fmt " // The "Subchunk ID" in the "fmt" subchunk. WaveFormatPCM = 1 // The "Audio Format" in the "fmt " subchunk we want, namely PCM. DataHeader = "data" // The "Subchunk ID" in the "data" subchunk. )
Variables ¶
This section is empty.
Functions ¶
func SoundFileCheckWave ¶
func SoundFileCheckWave(file io.ReadSeeker) (ok bool)
SoundFileCheckWave checks if a given file is in RIFF/WAVE audio format.
It only checks the "RIFF" and "WAVE" magics in the main RIFF chunk, i.e., it only tells if the file is definitely not in another format.
Types ¶
type SoundFileReaderWave ¶
type SoundFileReaderWave struct {
// contains filtered or unexported fields
}
SoundFileReaderWave is a decoder for the RIFF/WAVE audio format.
func (*SoundFileReaderWave) Close ¶
func (r *SoundFileReaderWave) Close() error
func (*SoundFileReaderWave) Info ¶
func (r *SoundFileReaderWave) Info() audio.SoundFileInfo
func (*SoundFileReaderWave) Open ¶
func (r *SoundFileReaderWave) Open(file io.ReadSeeker) (info audio.SoundFileInfo, err error)
func (*SoundFileReaderWave) Read ¶
func (r *SoundFileReaderWave) Read(data []int16) (samplesRead int64, err error)
func (*SoundFileReaderWave) Seek ¶
func (r *SoundFileReaderWave) Seek(sampleOffset int64) error
Click to show internal directories.
Click to hide internal directories.