Commit 13724b6
committed
feat: Improve playback with RingBuffer and EventScheduler
- Use a RingBuffer that has 4x buffer size with preallocated memory to
handle playback data write and read. The previous implementation
allocate and deallocate data array constantly during callback, which
is inefficient
- Use EventScheduler to provide the same functionality of scheduling
play event with onset (delay time)
- version 0.5.31 parent e8b57f2 commit 13724b6
File tree
7 files changed
+324
-102
lines changed- .github/workflows
- examples
- pya
- helper
- tests
7 files changed
+324
-102
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
43 | 44 | | |
44 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
45 | 48 | | |
46 | 49 | | |
47 | 50 | | |
48 | 51 | | |
49 | 52 | | |
50 | 53 | | |
51 | | - | |
| 54 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
3 | 6 | | |
4 | 7 | | |
5 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2124 | 2124 | | |
2125 | 2125 | | |
2126 | 2126 | | |
2127 | | - | |
| 2127 | + | |
2128 | 2128 | | |
2129 | 2129 | | |
2130 | 2130 | | |
| |||
0 commit comments