Skip to content

Commit

Permalink
add godocs
Browse files Browse the repository at this point in the history
  • Loading branch information
dudk committed Apr 4, 2021
1 parent 2020bb9 commit 1543526
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@ var (
)

type (
// PluginAllocatorFunc allocates new plugin instance and its
// dispatcher.
PluginAllocatorFunc func(Host) (Plugin, Dispatcher)

// Plugin is a VST2 effect that processes float/double signal buffers.
Plugin struct {
InputChannels int
OutputChannels int
Expand All @@ -39,19 +42,22 @@ type (
dispatchFunc
}

// Dispatcher handles plugin dispatch calls from the host.
Dispatcher struct {
SetBufferSizeFunc(size int)
}

// ProcessDoubleFunc defines logic for double signal processing.
ProcessDoubleFunc func(in, out DoubleBuffer)

// ProcessFloatFunc defines logic for float signal processing.
ProcessFloatFunc func(in, out FloatBuffer)

callbackHandler struct {
callback C.HostCallback
}

dispatchFunc func(op PluginOpcode, index int32, value int64, ptr unsafe.Pointer, opt float32) int64

ProcessDoubleFunc func(in, out DoubleBuffer)

ProcessFloatFunc func(in, out FloatBuffer)
)

func (d Dispatcher) dispatchFunc(params []*Parameter) dispatchFunc {
Expand Down

0 comments on commit 1543526

Please sign in to comment.