Documentation ¶
Index ¶
- Constants
- type Event
- type EventType
- type Player
- func (p *Player) Close()
- func (p *Player) HasBeenPlayingFor() time.Duration
- func (p *Player) NewStream(spotId librespot.SpotifyId, bitrate int, mediaPosition int64) (*Stream, error)
- func (p *Player) Pause()
- func (p *Player) Play()
- func (p *Player) PositionMs() int64
- func (p *Player) Receive() <-chan Event
- func (p *Player) SeekMs(pos int64) error
- func (p *Player) SetPrimaryStream(source librespot.AudioSource, paused, drop bool) error
- func (p *Player) SetSecondaryStream(source librespot.AudioSource)
- func (p *Player) SetVolume(val uint32)
- func (p *Player) Stop()
- type Stream
- type SwitchingAudioSource
- func (s *SwitchingAudioSource) Close() error
- func (s *SwitchingAudioSource) Done() <-chan struct{}
- func (s *SwitchingAudioSource) PositionMs() int64
- func (s *SwitchingAudioSource) Read(p []float32) (n int, err error)
- func (s *SwitchingAudioSource) SetPositionMs(pos int64) error
- func (s *SwitchingAudioSource) SetPrimary(source librespot.AudioSource)
- func (s *SwitchingAudioSource) SetSecondary(source librespot.AudioSource)
Constants ¶
View Source
const Channels = 2
View Source
const DisableCheckMediaRestricted = true
View Source
const MaxStateVolume = 65535
View Source
const SampleRate = 44100
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Player ¶
type Player struct {
// contains filtered or unexported fields
}
func (*Player) HasBeenPlayingFor ¶
func (*Player) PositionMs ¶
func (*Player) SetPrimaryStream ¶
func (p *Player) SetPrimaryStream(source librespot.AudioSource, paused, drop bool) error
func (*Player) SetSecondaryStream ¶
func (p *Player) SetSecondaryStream(source librespot.AudioSource)
type Stream ¶
type Stream struct { Source librespot.AudioSource Media *librespot.Media File *metadatapb.AudioFile }
type SwitchingAudioSource ¶
type SwitchingAudioSource struct {
// contains filtered or unexported fields
}
func NewSwitchingAudioSource ¶
func NewSwitchingAudioSource() *SwitchingAudioSource
func (*SwitchingAudioSource) Close ¶
func (s *SwitchingAudioSource) Close() error
func (*SwitchingAudioSource) Done ¶
func (s *SwitchingAudioSource) Done() <-chan struct{}
func (*SwitchingAudioSource) PositionMs ¶
func (s *SwitchingAudioSource) PositionMs() int64
func (*SwitchingAudioSource) Read ¶
func (s *SwitchingAudioSource) Read(p []float32) (n int, err error)
func (*SwitchingAudioSource) SetPositionMs ¶
func (s *SwitchingAudioSource) SetPositionMs(pos int64) error
func (*SwitchingAudioSource) SetPrimary ¶
func (s *SwitchingAudioSource) SetPrimary(source librespot.AudioSource)
func (*SwitchingAudioSource) SetSecondary ¶
func (s *SwitchingAudioSource) SetSecondary(source librespot.AudioSource)
Click to show internal directories.
Click to hide internal directories.