Compare commits
2 Commits
024803f1d4
...
46e4fda581
Author | SHA1 | Date |
---|---|---|
Christopher Arndt | 46e4fda581 | |
Christopher Arndt | cf10456f18 |
|
@ -4,7 +4,8 @@ import nymph
|
|||
const PluginUri = "urn:nymph:examples:amp"
|
||||
|
||||
type
|
||||
SampleBuffer = UncheckedArray[cfloat]
|
||||
CSample = cfloat
|
||||
CSamples = UncheckedArray[CSample]
|
||||
|
||||
PortIndex = enum
|
||||
INPUT = 0,
|
||||
|
@ -12,8 +13,8 @@ type
|
|||
GAIN = 2
|
||||
|
||||
Amp = object
|
||||
input: ptr SampleBuffer
|
||||
output: ptr SampleBuffer
|
||||
input: ptr CSamples
|
||||
output: ptr CSamples
|
||||
gain: ptr cfloat
|
||||
|
||||
|
||||
|
@ -32,9 +33,9 @@ proc connectPort(instance: Lv2Handle; port: cuint;
|
|||
let amp = cast[ptr Amp](instance)
|
||||
case cast[PortIndex](port)
|
||||
of INPUT:
|
||||
amp.input = cast[ptr SampleBuffer](dataLocation)
|
||||
amp.input = cast[ptr CSamples](dataLocation)
|
||||
of OUTPUT:
|
||||
amp.output = cast[ptr SampleBuffer](dataLocation)
|
||||
amp.output = cast[ptr CSamples](dataLocation)
|
||||
of GAIN:
|
||||
amp.gain = cast[ptr cfloat](dataLocation)
|
||||
|
||||
|
|
Loading…
Reference in New Issue