Waveform analysis/Top and tail: Difference between revisions
m
→{{header|Wren}}: Minor tidy
Thundergnat (talk | contribs) m (syntax highlighting fixup automation) |
m (→{{header|Wren}}: Minor tidy) |
||
Line 400:
{{trans|Go}}
The ability to call external processes such as ''SoX'' is expected to be added to Wren-cli in the next release. In the meantime, we embed the following Wren script in a C host to complete this task.
<syntaxhighlight lang="
class C {
Line 455:
<br>
We now embed this in the following C program, compile and run it.
<syntaxhighlight lang="c">
#include <stdio.h>
#include <stdio_ext.h>
#include <stdlib.h>
Line 537 ⟶ 539:
WrenVM* vm = wrenNewVM(&config);
const char* module = "main";
const char* fileName = "
char *script = readFile(fileName);
WrenInterpretResult result = wrenInterpret(vm, module, script);
|