ezplayer

command module
v0.0.0-...-00c38e0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 20, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

README

ezplayer

A Quick 'n Dirty MP3 wrapper to play music in your Kelsey Hightower demos.

package main

import (
	"fmt"
	"os"
	"time"

	"github.com/demond2/ezplayer/player"
)

func main() {
	p := player.NewPlayer("/Users/p1contractor9/02 Magic.mp3")
	if err := p.Seek(670000); err != nil {
		fmt.Printf("Got error during seek: %s\n", err.Error())
		os.Exit(1)
	}
	p.Play()
	<-time.After(5 * time.Second)
	p.FadeOut()
	<-time.After(10 * time.Second)
	//p.Wait()
	p.Close()
}

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL