Documentation ¶
Index ¶
- Constants
- Variables
- func Init(dev string, freq, channels, flags int) error
- func Quit()
- func SampleType() int
- func Ticks() uint
- func TicksPerSecond() uint
- type Module
- type Song
- func (s *Song) BeatsPerMinute() int
- func (s *Song) Close()
- func (s *Song) Finished() bool
- func (s *Song) Frames() int
- func (s *Song) Level(channel int) int
- func (s *Song) Line() int
- func (s *Song) Lines() int
- func (s *Song) Name() string
- func (s *Song) Pause()
- func (s *Song) Play() error
- func (s *Song) Replay()
- func (s *Song) Seek(offset, whence int)
- func (s *Song) SetLooping(loop bool)
- func (s *Song) SetVolume(vol int)
- func (s *Song) TicksPerLine() int
- func (s *Song) Volume() int
Constants ¶
View Source
const ( // Init flags NO_DEBUG_OUTPUT = C.SV_INIT_FLAG_NO_DEBUG_OUTPUT USER_AUDIO_CALLBACK = C.SV_INIT_FLAG_USER_AUDIO_CALLBACK AUDIO_INT16 = C.SV_INIT_FLAG_AUDIO_INT16 AUDIO_FLOAT32 = C.SV_INIT_FLAG_AUDIO_FLOAT32 ONE_THREAD = C.SV_INIT_FLAG_ONE_THREAD // Note constants NOTE_OFF = C.NOTECMD_NOTE_OFF ALL_NOTES_OFF = C.NOTECMD_ALL_NOTES_OFF CLEAN_SYNTHS = C.NOTECMD_CLEAN_SYNTHS STOP = C.NOTECMD_STOP PLAY = C.NOTECMD_PLAY // Module flags FLAG_EXISTS = C.SV_MODULE_FLAG_EXISTS FLAG_EFFECT = C.SV_MODULE_FLAG_EFFECT INPUTS_OFF = C.SV_MODULE_INPUTS_OFF INPUTS_MASK = C.SV_MODULE_INPUTS_MASK OUTPUTS_OFF = C.SV_MODULE_OUTPUTS_OFF OUTPUTS_MASK = C.SV_MODULE_OUTPUTS_MASK // Type flags INT16 = C.SV_STYPE_INT16 INT32 = C.SV_STYPE_INT32 FLOAT32 = C.SV_STYPE_FLOAT32 FLOAT64 = C.SV_STYPE_FLOAT64 )
Variables ¶
View Source
var (
Version string
)
Functions ¶
func SampleType ¶
func SampleType() int
SampleType returns the internal sample type of the sunvox engine.
func TicksPerSecond ¶
func TicksPerSecond() uint
TicksPerSecond returns the number of sunvox ticks per second.
Types ¶
type Song ¶
type Song struct { Mod []*Module // contains filtered or unexported fields }
Song is used to load and play sunvox songs.
func (*Song) BeatsPerMinute ¶
BeatsPerMinute returns the songs beats per minute.
func (*Song) Close ¶
func (s *Song) Close()
Close the song. The song should not be used after calling this.
func (*Song) Pause ¶
func (s *Song) Pause()
Pause stops the song's playback at its current position.
func (*Song) Seek ¶
Seek sets the offset of the song in lines, interpreted according to whence: // 0 means relative to the start of the song, 1 means relative to the current // line, and 2 means relative to the end.
func (*Song) SetLooping ¶
SetLooping enables or disables looping.
func (*Song) TicksPerLine ¶
TicksPerLine returns the number of ticks per line.
Click to show internal directories.
Click to hide internal directories.