Documentation ¶
Index ¶
- type Miniaudio
- func (p *Miniaudio) Address() string
- func (p *Miniaudio) Configure(address string, sampleRate float64, nbChannels int, echo bool, ...)
- func (p *Miniaudio) Done() chan interface{}
- func (p *Miniaudio) Echo() bool
- func (p *Miniaudio) NbChannels() int
- func (p *Miniaudio) Play(access string, echo bool) error
- func (p *Miniaudio) ReadStreamFrom(c io.Reader) error
- func (p *Miniaudio) SampleRate() float64
- func (p *Miniaudio) WriteStreamTo(c io.Writer) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Miniaudio ¶
type Miniaudio struct { streams.Streamable Format malgo.FormatType // Default malgo.FormatS16 // If defined each packet is Compressed / Decompressed. Compressor streams.Compressor // contains filtered or unexported fields }
Miniaudio Streamable support. Source: Miniaudio(https://miniaud.io) "Miniaudio is an audio playback and capture library for C and C++. It's made up of a single source file, has no external dependencies and is released into the public domain." We use the embedded go bindings malgo(https://github.com/gen2brain/malgo)
+---------------+----------------------------------------+---------------------------+ | ma_format_f32 | 32-bit floating point | [-1, 1] | | ma_format_s16 | 16-bit signed integer | [-32768, 32767] | | ma_format_s24 | 24-bit signed integer (tightly packed) | [-8388608, 8388607] | | ma_format_s32 | 32-bit signed integer | [-2147483648, 2147483647] | | ma_format_u8 | 8-bit unsigned integer | [0, 255] | +---------------+----------------------------------------+---------------------------+
func (*Miniaudio) Done ¶
func (p *Miniaudio) Done() chan interface{}
Done is the cancellation channel
func (*Miniaudio) ReadStreamFrom ¶
ReadStreamFrom receive the stream plays the audio via miniaudio.
func (*Miniaudio) SampleRate ¶
SampleRate is the sample rate :)
Click to show internal directories.
Click to hide internal directories.