Documentation
¶
Index ¶
- Constants
- Variables
- func Initialize()
- func IsReady() bool
- func LoadCombatSound(cache *lbx.LbxCache, index int) (*audiolib.Player, error)
- func LoadNewSound(cache *lbx.LbxCache, index int) (*audiolib.Player, error)
- func LoadSound(cache *lbx.LbxCache, index int) (*audiolib.Player, error)
- func LoadSoundFromLbx(soundLbx *lbx.LbxFile, index int) (*audiolib.Player, error)
- func SaveVoc(outputFile io.Writer, soundLbx *lbx.LbxFile, entryIndex int) error
- func SaveWav(outputFile io.Writer, soundLbx *lbx.LbxFile, index int) error
- type MakePlayerFunc
Constants ¶
View Source
const SampleRate = 44100
Variables ¶
View Source
var Context *audiolib.Context
Functions ¶
func Initialize ¶
func Initialize()
func LoadCombatSound ¶
func LoadSoundFromLbx ¶
Types ¶
type MakePlayerFunc ¶
func GetSoundMaker ¶
func GetSoundMaker(soundLbx *lbx.LbxFile, index int) (MakePlayerFunc, error)
precomputes the resampled sound data so all the client has to do is invoke the returned function. this is useful if you want to play the same sound multiple times
f, err := GetSoundMaker(soundLbx, index) player, err := f() player.Play() // play again player, err = f() player.Play()
func LoadSoundMaker ¶
func LoadSoundMaker(cache *lbx.LbxCache, index int) (MakePlayerFunc, error)
Click to show internal directories.
Click to hide internal directories.