Documentation
¶
Index ¶
- Constants
- type OpusPlayer
- func NewPlayerF32FromFile(path string, stream bool) (*OpusPlayer[float32], error)
- func NewPlayerF32FromReader(reader io.Reader) (*OpusPlayer[float32], error)
- func NewPlayerFromFile(path string, stream bool) (*OpusPlayer[int16], error)
- func NewPlayerFromReader(reader io.Reader) (*OpusPlayer[int16], error)
Constants ¶
View Source
const OpusSampleRateHz = ogg.OpusSampleRateHz
the decoded sample rate for Opus streams
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OpusPlayer ¶
type OpusPlayer[T player.DataType] = player.OpusPlayer[T]
func NewPlayerF32FromFile ¶ added in v1.3.0
func NewPlayerF32FromFile(path string, stream bool) (*OpusPlayer[float32], error)
Similar to NewPlayerFromFile but produces float32 PCM samples in the range [-1.0, 1.0].
func NewPlayerF32FromReader ¶ added in v1.3.0
func NewPlayerF32FromReader(reader io.Reader) (*OpusPlayer[float32], error)
Similar to NewPlayerFromReader but produces float32 PCM samples in the range [-1.0, 1.0].
func NewPlayerFromFile ¶
func NewPlayerFromFile(path string, stream bool) (*OpusPlayer[int16], error)
Create a new player from a file path. If stream is true, the file will be streamed instead of fully loaded into memory. This player produces int16 PCM samples. Note that internally the file object is closed when the garbage collector collects the player.
func NewPlayerFromReader ¶
func NewPlayerFromReader(reader io.Reader) (*OpusPlayer[int16], error)
Create a new player from an existing reader. If the reader is seekable (implements io.Seeker), seeking will be supported. This player produces int16 PCM samples.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
oggopus2wav
command
|
|
|
oggopusdump
command
|
|
|
oggopusextract
command
|
|
|
wav2oggopus
command
|
|
|
OpusPlayer is a high level API for decoding Ogg Opus audio streams.
|
OpusPlayer is a high level API for decoding Ogg Opus audio streams. |
Click to show internal directories.
Click to hide internal directories.