Clone or download
tosone Add CI Golang 1.11.x and upgrade minimp3.h.
Upgrade minimp3.h to 1bfe88f1727de76ab04eb79d2db8b9a7976afd84.

Signed-off-by: Tosone <i@tosiney.com>
Latest commit b575134 Sep 17, 2018

README.md

minimp3

Decode mp3 base on https://github.com/lieff/minimp3

Build Status Coverage Status GoDoc

See examples in example directory. make and make test test the example.

package main

import (
	"io/ioutil"

	"github.com/hajimehoshi/oto"
	"github.com/tosone/minimp3"
)

func main() {
	var file, _ = ioutil.ReadFile("test.mp3")
	dec, data, _ := minimp3.DecodeFull(file)

	player, _ := oto.NewPlayer(dec.SampleRate, dec.Channels, 2, 1024)
	player.Write(data)
}