warble

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2021 License: LGPL-3.0 Imports: 16 Imported by: 0

README

Warble

This Go package implements the host-side of the Flutter Warble plugin.

Usage

Import as:

import warble "github.com/jslater89/warble/go"

Then add the following option to your go-flutter application options:

flutter.AddPlugin(warble.New()),

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WarbleEffects

type WarbleEffects struct {
	ID         uuid.UUID
	Name       string
	SampleRate beep.SampleRate
	// contains filtered or unexported fields
}

Plugin code should only lock in WarbleEffects methods.

func NewBufferedEffects

func NewBufferedEffects(id uuid.UUID, name string, sampleRate beep.SampleRate, buffer *beep.Buffer) *WarbleEffects

func NewEffects

func NewEffects(id uuid.UUID, name string, sampleRate beep.SampleRate, streamer beep.StreamSeekCloser) *WarbleEffects

func (*WarbleEffects) Buffered

func (e *WarbleEffects) Buffered() bool

func (*WarbleEffects) Close

func (e *WarbleEffects) Close() error

func (*WarbleEffects) Err

func (e *WarbleEffects) Err() error

func (*WarbleEffects) Gain

func (e *WarbleEffects) Gain(gain float64) error

func (*WarbleEffects) Info

func (e *WarbleEffects) Info() map[interface{}]interface{}

func (*WarbleEffects) Len

func (e *WarbleEffects) Len() int

func (*WarbleEffects) Pan

func (e *WarbleEffects) Pan(pan float64) error

func (*WarbleEffects) Pause

func (e *WarbleEffects) Pause(pause bool) error

func (*WarbleEffects) Play

func (e *WarbleEffects) Play()

func (*WarbleEffects) PlayBuffer

func (e *WarbleEffects) PlayBuffer(from int, to int) error

TODO: gain, pan, etc

func (*WarbleEffects) Position

func (e *WarbleEffects) Position() int

func (*WarbleEffects) Seek

func (e *WarbleEffects) Seek(p int) error

func (*WarbleEffects) Stream

func (e *WarbleEffects) Stream(samples [][2]float64) (n int, ok bool)

type WarbleNopCloser

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

func WrapWithNop

func WrapWithNop(streamer beep.StreamSeeker) WarbleNopCloser

func (*WarbleNopCloser) Close

func (c *WarbleNopCloser) Close() error

func (*WarbleNopCloser) Err

func (e *WarbleNopCloser) Err() error

func (*WarbleNopCloser) Len

func (e *WarbleNopCloser) Len() int

func (*WarbleNopCloser) Position

func (e *WarbleNopCloser) Position() int

func (*WarbleNopCloser) Seek

func (e *WarbleNopCloser) Seek(p int) error

func (*WarbleNopCloser) Stream

func (e *WarbleNopCloser) Stream(samples [][2]float64) (n int, ok bool)

type WarblePlugin

type WarblePlugin struct {
	Streamers map[uuid.UUID]*WarbleEffects
}

WarblePlugin implements flutter.Plugin and handles method.

func New

func New() *WarblePlugin

func (*WarblePlugin) InitPlugin

func (p *WarblePlugin) InitPlugin(messenger plugin.BinaryMessenger) error

InitPlugin initializes the plugin.

Jump to

Keyboard shortcuts

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