| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #include "gwion_util.h" | ||
| 2 | #include "gwion_ast.h" | ||
| 3 | #include "gwion_env.h" | ||
| 4 | #include "vm.h" | ||
| 5 | #include "gwion.h" | ||
| 6 | #include "instr.h" | ||
| 7 | #include "object.h" | ||
| 8 | #include "emit.h" | ||
| 9 | #include "operator.h" | ||
| 10 | #include "import.h" | ||
| 11 | #include "gwi.h" | ||
| 12 | #include "driver.h" | ||
| 13 | #include "traverse.h" | ||
| 14 | #include "parse.h" | ||
| 15 | #include "specialid.h" | ||
| 16 | #include "array.h" | ||
| 17 | #include "gack.h" | ||
| 18 | |||
| 19 | 638 | GWION_IMPORT(values) { | |
| 20 | 638 | VM * vm = gwi_vm(gwi); | |
| 21 | 638 | const m_float sr = vm->bbq->si->sr; | |
| 22 | 638 | gwi_item_ini(gwi, "float", "samplerate"); | |
| 23 | 638 | gwi_item_end(gwi, ae_flag_const, fnum, sr); | |
| 24 | 638 | gwi_item_ini(gwi, "float", "pi"); | |
| 25 | 638 | gwi_item_end(gwi, ae_flag_const, fnum, M_PI); | |
| 26 | 638 | gwi_item_ini(gwi, "dur", "d_zero"); | |
| 27 | 638 | gwi_item_end(gwi, ae_flag_const, fnum, 0.0); | |
| 28 | 638 | gwi_item_ini(gwi, "dur", "samp"); | |
| 29 | 638 | gwi_item_end(gwi, ae_flag_const, fnum, 1.0); | |
| 30 | 638 | gwi_item_ini(gwi, "dur", "ms"); | |
| 31 | 638 | gwi_item_end(gwi, ae_flag_const, fnum, sr / 1000.0); | |
| 32 | 638 | gwi_item_ini(gwi, "dur", "second"); | |
| 33 | 638 | gwi_item_end(gwi, ae_flag_const, fnum, sr); | |
| 34 | 638 | gwi_item_ini(gwi, "dur", "minute"); | |
| 35 | 638 | gwi_item_end(gwi, ae_flag_const, fnum, sr * 60.0); | |
| 36 | 638 | gwi_item_ini(gwi, "dur", "hour"); | |
| 37 | 638 | gwi_item_end(gwi, ae_flag_const, fnum, sr * 60 * 60); | |
| 38 | 638 | gwi_item_ini(gwi, "time", "t_zero"); | |
| 39 | 638 | gwi_item_end(gwi, ae_flag_const, fnum, 0.0); | |
| 40 | 638 | return GW_OK; | |
| 41 | } | ||
| 42 |