blop

package module
v0.0.0-...-1809ccc Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2020 License: MIT Imports: 10 Imported by: 2

README

Blop

A little library that simplifies the way to load sounds and play them in any go applications.

go get -u github.com/lambher/blop

Features

Blop is based on the Beep package

  • Load WAV, MP3 and FLAC.
  • Play sound in easily way
  • Very small codebase. The core is just ~1K LOC.

Usage

package main

import "github.com/lambher/blop"

func main() {
    blop.LoadSound("blop", "sounds/blop.wav")

    // somewhere in your application
    blop.Play("blop")
}

Examples

| Example

Dependencies

Blop uses Beep package under the hood. Check its requirements to see what you need to install for building your application.

Running an already built application should work with no extra dependencies.

Licence

MIT

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadSound

func LoadSound(key, path string) error

func Play

func Play(key string)

Types

type Sound

type Sound struct {
	// contains filtered or unexported fields
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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