Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataReaderChunk ¶
type DataReaderChunk struct {
ID []byte // 'data'
Size uint32 // 音データの長さ * channel
Data DataReader // 実際のデータ
}
type FmtChunk ¶
type FmtChunk struct {
ID []byte // 'fmt '
Size uint32 // 16
Data *WavFmtChunkData
}
8 + 16 = 24byte
type Reader ¶
type Reader struct {
RiffChunk *RiffChunk
FmtChunk *FmtChunk
DataChunk *DataReaderChunk
NumSamples uint32
ReadSampleNum uint32
SampleTime int
// contains filtered or unexported fields
}
func ByteReader ¶
func (*Reader) ReadRawSample ¶
func (*Reader) ReadSample ¶
func (*Reader) ReadSampleInt ¶
type RiffChunk ¶
type RiffChunk struct {
ID []byte // 'RIFF'
Size uint32 // 36bytes + data_chunk_size or whole_file_size - 'RIFF'+ChunkSize (8byte)
FormatType []byte // 'WAVE'
}
12byte
type WavFmtChunkData ¶
type WavFmtChunkData struct {
WaveFormatType uint16 // PCM は 1
Channel uint16 // monoral or streo
SamplesPerSec uint32 // サンプリング周波数 44100
BytesPerSec uint32 // 1秒間に必要なbyte数
BlockSize uint16 // 量子化精度 * チャンネル数
BitsPerSamples uint16 // 量子化精度
}
16byte
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
func NewWriter ¶
func NewWriter(param WriterParam) (*Writer, error)
type WriterParam ¶
type WriterParam struct {
Out io.WriteCloser
Channel int
SampleRate int
BitsPerSample int
}
Click to show internal directories.
Click to hide internal directories.