Skip to content

Commit 13724b6

Browse files
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.3
1 parent e8b57f2 commit 13724b6

File tree

7 files changed

+324
-102
lines changed

7 files changed

+324
-102
lines changed

.github/workflows/pya-ci.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,15 @@ jobs:
4040
run: |
4141
conda init bash
4242
conda config --add channels defaults
43+
conda config --add channels conda-forge
4344
conda activate test-env
44-
conda install ffmpeg coverage python-coveralls --file=requirements_remote.txt --file=requirements_test.txt
45+
# Explicitly install ffmpeg from conda-forge
46+
conda install -c conda-forge ffmpeg
47+
conda install coverage python-coveralls --file=requirements_remote.txt --file=requirements_test.txt
4548
# pyaudio is not yet available on conda
4649
pip install -r requirements.txt
4750
- name: Run tests
4851
shell: bash -l {0}
4952
run: |
5053
conda activate test-env
51-
pytest --cov pya/
54+
pytest -v --cov pya/

Changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
## 0.5.3 (Apr 2025)
4+
* Improve aserver playback with ringbuffer and event scheduling
5+
36
## 0.5.2 (Nov 2023)
47
* #82, `pyaudio` is now optional: If you plan to use `PyAudioBackend`, install `pya` with `pip install pya[pyaudio]`.
58
* Fix audio device bug

examples/pya-examples.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2124,7 +2124,7 @@
21242124
"name": "python",
21252125
"nbconvert_exporter": "python",
21262126
"pygments_lexer": "ipython3",
2127-
"version": "3.10.7"
2127+
"version": "3.12.8"
21282128
},
21292129
"toc": {
21302130
"base_numbering": 1,

0 commit comments

Comments
 (0)