Debian Codegraph @

/

debian golang-github-youpy-go-wav 0.3.0+ds-1.1debian golang-github-youpy-go-wav-dev gomod github.com/youpy/go-wav debiangomakefilemarkdownshellyaml 19 files · 172 symbols
View dependency graph

Depends on

README (full)

go-wav Build Status

A Go library to read/write WAVE(RIFF waveform Audio) Format

Usage

package main

import (
	"flag"
	"fmt"
	"github.com/youpy/go-wav"
	"io"
	"os"
)

func main() {
	infile_path := flag.String("infile", "", "wav file to read")
	flag.Parse()

	file, _ := os.Open(*infile_path)
	reader := wav.NewReader(file)

  	defer file.Close()

	for {
		samples, err := reader.ReadSamples()
		if err == io.EOF {
			break
		}

		for _, sample := range samples {
			fmt.Printf("L/R: %d/%d\n", reader.IntValue(sample, 0), reader.IntValue(sample, 1))
		}
	}
}

Supported format

Format

  • PCM
  • IEEE float (read-only)
  • G.711 A-law (read-only)
  • G.711 ยต-law (read-only)

Number of channels

  • 1(mono)
  • 2(stereo)

Bits per sample

  • 32-bit
  • 24-bit
  • 16-bit
  • 8-bit

Documentation

  • https://godoc.org/github.com/youpy/go-wav

See Also

  • http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/WAVE.html
dir .github/
dir benchmark/
dir debian/
file .travis.yml
file LICENSE
file README.md
file go.mod
file go.sum
file reader.go
file reader_test.go
file test_helper.go
file wav.go
file writer.go
file writer_test.go