Documentation ¶
Overview ¶
Package wavwriter provides a media writer that writes bytes in μ-law (PCMU) or A-law (PCMA) format to a WAV file.
Index ¶
- Constants
- Variables
- type WavWriter
- func (i *WavWriter) Close() error
- func (i *WavWriter) DecodePcmaToPcmWrite(pcma []byte) error
- func (i *WavWriter) DecodePcmuToPcmWrite(pcmu []byte) error
- func (i *WavWriter) Write(bs []byte) error
- func (i *WavWriter) WriteInt16(int16Data []int16) error
- func (i *WavWriter) WriteRTP(packet *rtp.Packet) error
Constants ¶
View Source
const ( WavAudioFormatPcmRaw = 1 //no compression, raw (linear) pcm // a WavAudioFormat value of 6 or 7 would indicate that the audio data is stored in the A-law or μ-law format, which are forms of compressed PCM commonly used in telephony. WavAudioFormatPcmA = 6 //A-law WavAudioFormatPcmU = 7 //μ-law )
Variables ¶
View Source
var AvailablePcmTypes = []int{WavAudioFormatPcmRaw, WavAudioFormatPcmA, WavAudioFormatPcmU}
View Source
var ErrorInvalidPcmType = fmt.Errorf("invalid pcm type")
Functions ¶
This section is empty.
Types ¶
type WavWriter ¶
type WavWriter struct {
// contains filtered or unexported fields
}
func (*WavWriter) DecodePcmaToPcmWrite ¶
func (*WavWriter) DecodePcmuToPcmWrite ¶
func (*WavWriter) WriteInt16 ¶
Click to show internal directories.
Click to hide internal directories.