aLavaGolem / minimp3

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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)
}

About

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

License:MIT License


Languages

Language:C 86.1%Language:Go 12.8%Language:Makefile 1.1%