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 AudioCache
- type MakePlayerFunc
Constants ¶
View Source
const CombatLbxPath = "cmbtsnd.lbx"
View Source
const NewSoundLbxPath = "newsound.lbx"
View Source
const SampleRate = 44100
View Source
const SoundLbxPath = "soundfx.lbx"
Variables ¶
View Source
var Context *audiolib.Context
Functions ¶
func Initialize ¶
func Initialize()
func LoadCombatSound ¶
func LoadSoundFromLbx ¶
Types ¶
type AudioCache ¶
type AudioCache struct {
// contains filtered or unexported fields
}
func MakeAudioCache ¶
func MakeAudioCache(cache *lbx.LbxCache) *AudioCache
func (*AudioCache) GetCombatSound ¶
func (cache *AudioCache) GetCombatSound(index int) (*audiolib.Player, error)
func (*AudioCache) GetNewSound ¶
func (cache *AudioCache) GetNewSound(index int) (*audiolib.Player, error)
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.