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