synthizer

package module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 18, 2023 License: MIT Imports: 6 Imported by: 0

README

go-synthizer

A golang binding to the synthizer audio library.

Status

While many functionality is missing, But this should work if you try to use it for basic audio usage, Stuff like custom streams, FromFloatArrays, Events and filters are not here yet, Although should be soon.

What can we do now?

  • Initialize, With or without libraryConfig.
  • Creating context.
  • Creating generators, StreamingGenerator, NoiseGenerator and bufferGenerator.
  • Creating Sources, Direct, ScalarPanned, AngularPanned, And Source3D
  • Creating Buffers.
  • Creating streams, From file and memory, Custom is not implemented because I'm not really sure of a safe way to do it, And to be honest, I don't understand how it works my self, So if you do, Please submit a pull request.
  • Editing properties.
  • Creating reverb with GlobalFdnReverb.

Documentation

Overview

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

MIT License

! Copyright (c) 2021 mohamedSulaimanAlmarzooqi

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Index

Constants

View Source
const (
	LOG_LEVEL_ERROR LogLevel = C.SYZ_LOG_LEVEL_ERROR
	LOG_LEVEL_WARN           = C.SYZ_LOG_LEVEL_WARN
	LOG_LEVEL_INFO           = C.SYZ_LOG_LEVEL_INFO
	LOG_LEVEL_DEBUG          = C.SYZ_LOG_LEVEL_DEBUG
)
View Source
const (
	OTYPE_CONTEXT                  OBJECT = C.SYZ_OTYPE_CONTEXT
	OTYPE_BUFFER                          = C.SYZ_OTYPE_BUFFER
	OTYPE_BUFFER_GENERATOR                = C.SYZ_OTYPE_BUFFER_GENERATOR
	OTYPE_STREAMING_GENERATOR             = C.SYZ_OTYPE_STREAMING_GENERATOR
	OTYPE_NOISE_GENERATOR                 = C.SYZ_OTYPE_NOISE_GENERATOR
	OTYPE_DIRECT_SOURCE                   = C.SYZ_OTYPE_DIRECT_SOURCE
	OTYPE_ANGULAR_PANNED_SOURCE           = C.SYZ_OTYPE_ANGULAR_PANNED_SOURCE
	OTYPE_SCALAR_PANNED_SOURCE            = C.SYZ_OTYPE_SCALAR_PANNED_SOURCE
	OTYPE_SOURCE_3D                       = C.SYZ_OTYPE_SOURCE_3D
	OTYPE_GLOBAL_ECHO                     = C.SYZ_OTYPE_GLOBAL_ECHO
	OTYPE_GLOBAL_FDN_REVERB               = C.SYZ_OTYPE_GLOBAL_FDN_REVERB
	OTYPE_STREAM_HANDLE                   = C.SYZ_OTYPE_STREAM_HANDLE
	OTYPE_AUTOMATION_BATCH                = C.SYZ_OTYPE_AUTOMATION_BATCH
	OTYPE_FAST_SINE_BANK_GENERATOR        = C.SYZ_OTYPE_FAST_SINE_BANK_GENERATOR
)
View Source
const (
	PANNER_STRATEGY_DELEGATE PANNER_STRATEGY = C.SYZ_PANNER_STRATEGY_DELEGATE
	PANNER_STRATEGY_HRTF                     = C.SYZ_PANNER_STRATEGY_HRTF
	PANNER_STRATEGY_STEREO                   = C.SYZ_PANNER_STRATEGY_STEREO
	PANNER_STRATEGY_COUNT                    = C.SYZ_PANNER_STRATEGY_COUNT
)
View Source
const (
	DISTANCE_MODEL_NONE        DISTANCE_MODEL = C.SYZ_DISTANCE_MODEL_NONE
	DISTANCE_MODEL_LINEAR                     = C.SYZ_DISTANCE_MODEL_LINEAR
	DISTANCE_MODEL_EXPONENTIAL                = C.SYZ_DISTANCE_MODEL_EXPONENTIAL
	DISTANCE_MODEL_INVERSE                    = C.SYZ_DISTANCE_MODEL_INVERSE
	DISTANCE_MODEL_COUNT                      = C.SYZ_DISTANCE_MODEL_COUNT
)
View Source
const (
	NOISE_TYPE_UNIFORM        NOISE_TYPE = C.SYZ_NOISE_TYPE_UNIFORM
	NOISE_TYPE_VM                        = C.SYZ_NOISE_TYPE_VM
	NOISE_TYPE_FILTERED_BROWN            = C.SYZ_NOISE_TYPE_FILTERED_BROWN
	NOISE_TYPE_COUNT                     = C.SYZ_NOISE_TYPE_COUNT
)
View Source
const (
	P_AZIMUTH                               = C.SYZ_P_AZIMUTH
	P_BUFFER                                = C.SYZ_P_BUFFER
	P_ELEVATION                             = C.SYZ_P_ELEVATION
	P_GAIN                                  = C.SYZ_P_GAIN
	P_DEFAULT_PANNER_STRATEGY               = C.SYZ_P_DEFAULT_PANNER_STRATEGY
	P_PANNING_SCALAR                        = C.SYZ_P_PANNING_SCALAR
	P_PLAYBACK_POSITION                     = C.SYZ_P_PLAYBACK_POSITION
	P_POSITION                              = C.SYZ_P_POSITION
	P_ORIENTATION                           = C.SYZ_P_ORIENTATION
	P_CLOSENESS_BOOST                       = C.SYZ_P_CLOSENESS_BOOST
	P_CLOSENESS_BOOST_DISTANCE              = C.SYZ_P_CLOSENESS_BOOST_DISTANCE
	P_DISTANCE_MAX                          = C.SYZ_P_DISTANCE_MAX
	P_DISTANCE_MODEL                        = C.SYZ_P_DISTANCE_MODEL
	P_DISTANCE_REF                          = C.SYZ_P_DISTANCE_REF
	P_ROLLOFF                               = C.SYZ_P_ROLLOFF
	P_DEFAULT_CLOSENESS_BOOST               = C.SYZ_P_DEFAULT_CLOSENESS_BOOST
	P_DEFAULT_CLOSENESS_BOOST_DISTANCE      = C.SYZ_P_DEFAULT_CLOSENESS_BOOST_DISTANCE
	P_DEFAULT_DISTANCE_MAX                  = C.SYZ_P_DEFAULT_DISTANCE_MAX
	P_DEFAULT_DISTANCE_MODEL                = C.SYZ_P_DEFAULT_DISTANCE_MODEL
	P_DEFAULT_DISTANCE_REF                  = C.SYZ_P_DEFAULT_DISTANCE_REF
	P_DEFAULT_ROLLOFF                       = C.SYZ_P_DEFAULT_ROLLOFF
	P_LOOPING                               = C.SYZ_P_LOOPING
	P_NOISE_TYPE                            = C.SYZ_P_NOISE_TYPE
	P_PITCH_BEND                            = C.SYZ_P_PITCH_BEND
	P_INPUT_FILTER_ENABLED                  = C.SYZ_P_INPUT_FILTER_ENABLED
	P_INPUT_FILTER_CUTOFF                   = C.SYZ_P_INPUT_FILTER_CUTOFF
	P_MEAN_FREE_PATH                        = C.SYZ_P_MEAN_FREE_PATH
	P_T60                                   = C.SYZ_P_T60
	P_LATE_REFLECTIONS_LF_ROLLOFF           = C.SYZ_P_LATE_REFLECTIONS_LF_ROLLOFF
	P_LATE_REFLECTIONS_LF_REFERENCE         = C.SYZ_P_LATE_REFLECTIONS_LF_REFERENCE
	P_LATE_REFLECTIONS_HF_ROLLOFF           = C.SYZ_P_LATE_REFLECTIONS_HF_ROLLOFF
	P_LATE_REFLECTIONS_HF_REFERENCE         = C.SYZ_P_LATE_REFLECTIONS_HF_REFERENCE
	P_LATE_REFLECTIONS_DIFFUSION            = C.SYZ_P_LATE_REFLECTIONS_DIFFUSION
	P_LATE_REFLECTIONS_MODULATION_DEPTH     = C.SYZ_P_LATE_REFLECTIONS_MODULATION_DEPTH
	P_LATE_REFLECTIONS_MODULATION_FREQUENCY = C.SYZ_P_LATE_REFLECTIONS_MODULATION_FREQUENCY
	P_LATE_REFLECTIONS_DELAY                = C.SYZ_P_LATE_REFLECTIONS_DELAY
	P_FILTER                                = C.SYZ_P_FILTER
	P_FILTER_DIRECT                         = C.SYZ_P_FILTER_DIRECT
	P_FILTER_EFFECTS                        = C.SYZ_P_FILTER_EFFECTS
	P_FILTER_INPUT                          = C.SYZ_P_FILTER_INPUT
	P_CURRENT_TIME                          = C.SYZ_P_CURRENT_TIME
	P_SUGGESTED_AUTOMATION_TIME             = C.SYZ_P_SUGGESTED_AUTOMATION_TIME
	P_FREQUENCY                             = C.SYZ_P_FREQUENCY
)
View Source
const (
	EVENT_TYPE_INVALID         EVENT_TYPES = C.SYZ_EVENT_TYPE_INVALID
	EVENT_TYPE_LOOPED                      = C.SYZ_EVENT_TYPE_LOOPED
	EVENT_TYPE_FINISHED                    = C.SYZ_EVENT_TYPE_FINISHED
	EVENT_TYPE_USER_AUTOMATION             = C.SYZ_EVENT_TYPE_USER_AUTOMATION
)
View Source
const (
	AUTOMATION_COMMAND_APPEND_PROPERTY      AUTOMATION_COMMANDS = C.SYZ_AUTOMATION_COMMAND_APPEND_PROPERTY
	AUTOMATION_COMMAND_SEND_USER_EVENT                          = C.SYZ_AUTOMATION_COMMAND_SEND_USER_EVENT
	AUTOMATION_COMMAND_CLEAR_PROPERTY                           = C.SYZ_AUTOMATION_COMMAND_CLEAR_PROPERTY
	AUTOMATION_COMMAND_CLEAR_EVENTS                             = C.SYZ_AUTOMATION_COMMAND_CLEAR_EVENTS
	AUTOMATION_COMMAND_CLEAR_ALL_PROPERTIES                     = C.SYZ_AUTOMATION_COMMAND_CLEAR_ALL_PROPERTIES
)

Variables

This section is empty.

Functions

func CCharToGoString

func CCharToGoString(ch *C.char) string

Convert A C char* to a GoString, Freeing the C char and returning the go String.

func CHECKED

func CHECKED(x C.syz_ErrorCode) error

func GOCHECK

func GOCHECK(err error) error

func Initialize

func Initialize() error

func InitializeWithConfig

func InitializeWithConfig(config *LibraryConfig)

func NewHandle

func NewHandle() C.syz_Handle

func Shutdown

func Shutdown() error

Types

type AUTOMATION_COMMANDS

type AUTOMATION_COMMANDS C.int

type AngularPannedSource

type AngularPannedSource struct {
	Azimuth, Elevation DoubleProperty
	// contains filtered or unexported fields
}

func NewAngularPannedSource

func NewAngularPannedSource(ctx *Context, panner_strategy C.int, OV ...float32) (*AngularPannedSource, error)

func (*AngularPannedSource) AddGenerator

func (self *AngularPannedSource) AddGenerator(gen Generator) error

func (*AngularPannedSource) RemoveGenerator

func (self *AngularPannedSource) RemoveGenerator(gen Generator) error

type BiquadConfig

type BiquadConfig struct {
	// contains filtered or unexported fields
}

func BiquadConfigDesignHighpass

func BiquadConfigDesignHighpass(frequency float64, OV ...float64) (*BiquadConfig, error)

func BiquadConfigDesignIdentity

func BiquadConfigDesignIdentity() (*BiquadConfig, error)

func BiquadConfigDesignLowpass

func BiquadConfigDesignLowpass(frequency float64, OV ...float64) (*BiquadConfig, error)

func BiquadDesignBandpass

func BiquadDesignBandpass(frequency float64, bandwidth float64) (*BiquadConfig, error)

type BiquadProperty

type BiquadProperty struct {
	PropertyBase
}

func NewBiquadProperty

func NewBiquadProperty(instance *objectBase, property C.int) BiquadProperty

func (*BiquadProperty) Set

func (self *BiquadProperty) Set(value BiquadConfig) error

type BoolProperty

type BoolProperty struct {
	PropertyBase
}

A boolean property, For stuff like looping so we don't need to let the user do something like object.looping.Set(1) OR something like that.

func NewBoolProperty

func NewBoolProperty(instance *objectBase, property C.int) BoolProperty

func (*BoolProperty) Get

func (self *BoolProperty) Get() (bool, error)

func (*BoolProperty) Set

func (self *BoolProperty) Set(val bool) error

type Buffer

type Buffer struct {
	// contains filtered or unexported fields
}

func BufferFromEncodedData

func BufferFromEncodedData(data string) (*Buffer, error)

func BufferFromFile

func BufferFromFile(path string) (*Buffer, error)

func BufferFromStreamHandle

func BufferFromStreamHandle(stream StreamHandle) (*Buffer, error)

func (*Buffer) ConfigDeleteBehavior

func (self *Buffer) ConfigDeleteBehavior(linger int, timeout float32) error

func (*Buffer) Destroy

func (self *Buffer) Destroy() error

func (*Buffer) GetChannels

func (self *Buffer) GetChannels() (int, error)

func (*Buffer) GetHandle

func (self *Buffer) GetHandle() *C.syz_Handle

func (*Buffer) GetHandleChecked

func (self *Buffer) GetHandleChecked() (*C.syz_Handle, error)

func (*Buffer) GetLengthInSamples

func (self *Buffer) GetLengthInSamples() (int, error)

func (*Buffer) GetLengthInSeconds

func (self *Buffer) GetLengthInSeconds() (float64, error)

type BufferGenerator

type BufferGenerator struct {
	Looping          BoolProperty
	Buffer           ObjectProperty
	PlaybackPosition DoubleProperty
	// contains filtered or unexported fields
}

Todo: Add Buffer.GetLengthInBytes

func NewBufferGenerator

func NewBufferGenerator(ctx *Context) (*BufferGenerator, error)

type Context

type Context struct {
	Pausable
	Gain, Default_distance_ref, Default_distance_max, Default_rolloff, Default_closeness_boost, Default_closeness_boost_distance DoubleProperty
	Position                                                                                                                     Double3Property
	Orientation                                                                                                                  Double6Property
	Default_distance_model, Default_panner_strategy                                                                              IntProperty
}

func NewContext

func NewContext() (*Context, error)

func (*Context) ConfigDeleteBehavior

func (self *Context) ConfigDeleteBehavior(linger int, timeout float32) error

func (*Context) ConfigRoute

func (self *Context) ConfigRoute(output ObjectBase, input ObjectBase, optionalV ...float64) error

func (*Context) Destroy

func (self *Context) Destroy() error

func (*Context) GetHandle

func (self *Context) GetHandle() *C.syz_Handle

func (*Context) GetHandleChecked

func (self *Context) GetHandleChecked() (*C.syz_Handle, error)

func (*Context) RemoveRoute

func (self *Context) RemoveRoute(output objectBase, input objectBase, optionalV ...float64) error

type DISTANCE_MODEL

type DISTANCE_MODEL C.int

type DirectSource

type DirectSource struct {
	// contains filtered or unexported fields
}

func NewDirectSource

func NewDirectSource(ctx *Context) (*DirectSource, error)

func (*DirectSource) AddGenerator

func (self *DirectSource) AddGenerator(gen Generator) error

func (*DirectSource) RemoveGenerator

func (self *DirectSource) RemoveGenerator(gen Generator) error

type Double3Property

type Double3Property struct {
	PropertyBase
}

func NewDouble3Property

func NewDouble3Property(instance *objectBase, property C.int) Double3Property

func (*Double3Property) Get

func (self *Double3Property) Get() (float32, float32, float32, error)

func (*Double3Property) Set

func (self *Double3Property) Set(x float32, y float32, z float32) error

type Double6Property

type Double6Property struct {
	PropertyBase
}

func NewDouble6Property

func NewDouble6Property(instance *objectBase, property C.int) Double6Property

func (*Double6Property) Get

func (*Double6Property) Set

func (self *Double6Property) Set(x1 float32, y1 float32, z1 float32, x2 float32, y2 float32, z2 float32) error

type DoubleProperty

type DoubleProperty struct {
	PropertyBase
}

func NewDoubleProperty

func NewDoubleProperty(instance *objectBase, property C.int) DoubleProperty

func (*DoubleProperty) Get

func (self *DoubleProperty) Get() (float32, error)

func (*DoubleProperty) Set

func (self *DoubleProperty) Set(value float32) error

type EVENT_TYPES

type EVENT_TYPES C.int

type EchoTapConfig

type EchoTapConfig struct {
	Delay float64
	GainL float64
	GainR float64
}

func NewEchoTapConfig

func NewEchoTapConfig(delay float64, gain_l float64, gain_r float64) *EchoTapConfig

type Generator

type Generator interface {
	ObjectBase
	// contains filtered or unexported methods
}

type GlobalEffect

type GlobalEffect struct {
	FilterInput BiquadProperty
	Gain        DoubleProperty
	// contains filtered or unexported fields
}

func (*GlobalEffect) ConfigDeleteBehavior

func (self *GlobalEffect) ConfigDeleteBehavior(linger int, timeout float32) error

func (*GlobalEffect) Destroy

func (self *GlobalEffect) Destroy() error

func (*GlobalEffect) GetHandle

func (self *GlobalEffect) GetHandle() *C.syz_Handle

func (*GlobalEffect) GetHandleChecked

func (self *GlobalEffect) GetHandleChecked() (*C.syz_Handle, error)

func (*GlobalEffect) Reset

func (self *GlobalEffect) Reset() error

type GlobalFdnReverb

type GlobalFdnReverb struct {
	GlobalEffect
	MeanFreePath, T60, LateReflectionsLfRolloff, LateReflectionsLfReference, LateReflectionsHfRolloff, LateReflectionsHfReference, LateReflectionsDiffusion, LateReflectionsModulationDepth, LateReflectionsModulationFrequency, LateReflectionsDelay DoubleProperty
}

Todo, Add GlobalEcho.

func NewGlobalFdnReverb

func NewGlobalFdnReverb(ctx *Context) (*GlobalFdnReverb, error)

func (*GlobalFdnReverb) ConfigDeleteBehavior

func (self *GlobalFdnReverb) ConfigDeleteBehavior(linger int, timeout float32) error

func (*GlobalFdnReverb) Destroy

func (self *GlobalFdnReverb) Destroy() error

func (*GlobalFdnReverb) GetHandle

func (self *GlobalFdnReverb) GetHandle() *C.syz_Handle

func (*GlobalFdnReverb) GetHandleChecked

func (self *GlobalFdnReverb) GetHandleChecked() (*C.syz_Handle, error)

type INTERPOLATION_TYPES

type INTERPOLATION_TYPES C.int
const (
	INTERPOLATION_TYPE_NONE   INTERPOLATION_TYPES = C.SYZ_INTERPOLATION_TYPE_NONE
	INTERPOLATION_TYPE_LINEAR                     = C.SYZ_INTERPOLATION_TYPE_LINEAR
)

type IntProperty

type IntProperty struct {
	PropertyBase
}

func NewIntProperty

func NewIntProperty(instance *objectBase, property C.int) IntProperty

func (*IntProperty) Get

func (self *IntProperty) Get() (int, error)

func (*IntProperty) Set

func (self *IntProperty) Set(value int) error

type LibraryConfig

type LibraryConfig struct {
	// contains filtered or unexported fields
}

func NewLibraryConfig

func NewLibraryConfig(log_level LogLevel, logging_backend LoggingBackend) LibraryConfig

func (*LibraryConfig) SetLibsndfilePath

func (self *LibraryConfig) SetLibsndfilePath(path string)

type LogLevel

type LogLevel C.int

type LoggingBackend

type LoggingBackend C.int
const (
	LOGGING_BACKEND_NONE   LoggingBackend = C.SYZ_LOGGING_BACKEND_NONE
	LOGGING_BACKEND_STDERR                = C.SYZ_LOGGING_BACKEND_STDERR
)

type NOISE_TYPE

type NOISE_TYPE C.int

type NoiseGenerator

type NoiseGenerator struct {
	NoiseType IntProperty
	// contains filtered or unexported fields
}

func NewNoiseGenerator

func NewNoiseGenerator(ctx *Context, channels int) (*NoiseGenerator, error)

type OBJECT

type OBJECT C.int

type ObjectBase

type ObjectBase interface {
	GetHandleChecked() (*C.syz_Handle, error)
	GetHandle() *C.syz_Handle
	Destroy() error
	ConfigDeleteBehavior(int, float32) error
}

Synthizer main object interface.

type ObjectProperty

type ObjectProperty struct {
	PropertyBase
}

func NewObjectProperty

func NewObjectProperty(instance *objectBase, property C.int) ObjectProperty

func (*ObjectProperty) Set

func (self *ObjectProperty) Set(value ObjectBase) error

type PANNER_STRATEGY

type PANNER_STRATEGY C.int

type PROPERTIES

type PROPERTIES C.int

type Pausable

type Pausable struct {
	// contains filtered or unexported fields
}

func NewPausable

func NewPausable(handle *C.syz_Handle) Pausable

func (*Pausable) ConfigDeleteBehavior

func (self *Pausable) ConfigDeleteBehavior(linger int, timeout float32) error

func (*Pausable) Destroy

func (self *Pausable) Destroy() error

func (*Pausable) GetHandle

func (self *Pausable) GetHandle() *C.syz_Handle

func (*Pausable) GetHandleChecked

func (self *Pausable) GetHandleChecked() (*C.syz_Handle, error)

func (*Pausable) Pause

func (self *Pausable) Pause() error

func (*Pausable) Play

func (self *Pausable) Play() error

type PropertyBase

type PropertyBase struct {
	// contains filtered or unexported fields
}

func (*PropertyBase) GetHandleChecked

func (self *PropertyBase) GetHandleChecked() (*C.syz_Handle, error)

func (*PropertyBase) GetProperty

func (self *PropertyBase) GetProperty() C.int

type ScalarPannedSource

type ScalarPannedSource struct {
	PanningScalar DoubleProperty
	// contains filtered or unexported fields
}

func NewScalarPannedSource

func NewScalarPannedSource(ctx *Context, panner_strategy C.int, panning_scalar float32) (*ScalarPannedSource, error)

func (*ScalarPannedSource) AddGenerator

func (self *ScalarPannedSource) AddGenerator(gen Generator) error

func (*ScalarPannedSource) RemoveGenerator

func (self *ScalarPannedSource) RemoveGenerator(gen Generator) error

type Source

type Source interface {
	AddGenerator(Generator) error
	RemoveGenerator(Generator) error
	ObjectBase
}

type Source3D

type Source3D struct {
	DistanceRef, DistanceMax, Rolloff, ClosenessBoost, ClosenessBoostDistance DoubleProperty
	Position                                                                  Double3Property
	Orientation                                                               Double6Property
	DistanceModel                                                             IntProperty
	// contains filtered or unexported fields
}

func NewSource3D

func NewSource3D(ctx *Context) (*Source3D, error)

func (*Source3D) AddGenerator

func (self *Source3D) AddGenerator(gen Generator) error

func (*Source3D) RemoveGenerator

func (self *Source3D) RemoveGenerator(gen Generator) error

type StreamHandle

type StreamHandle struct {
	// contains filtered or unexported fields
}

func StreamHandleFromFile

func StreamHandleFromFile(path string) (*StreamHandle, error)

func StreamHandleFromMemory

func StreamHandleFromMemory(data string) (*StreamHandle, error)

Probably needs improvement, Now it only accepts a string because I can't figure a way to safely pass everything from a byte array as const *char, But if you do, Then please submit a pull request.

func (*StreamHandle) ConfigDeleteBehavior

func (self *StreamHandle) ConfigDeleteBehavior(linger int, timeout float32) error

func (*StreamHandle) Destroy

func (self *StreamHandle) Destroy() error

func (*StreamHandle) GetHandle

func (self *StreamHandle) GetHandle() *C.syz_Handle

func (*StreamHandle) GetHandleChecked

func (self *StreamHandle) GetHandleChecked() (*C.syz_Handle, error)

type StreamingGenerator

type StreamingGenerator struct {
	Looping          BoolProperty
	PlaybackPosition DoubleProperty
	// contains filtered or unexported fields
}

func StreamingGeneratorFromFile

func StreamingGeneratorFromFile(ctx *Context, path string) (*StreamingGenerator, error)

func StreamingGeneratorFromHandle

func StreamingGeneratorFromHandle(ctx *Context, stream *StreamHandle) (*StreamingGenerator, error)

Directories

Path Synopsis
MIT License
MIT License

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL