Skip to content
This repository has been archived by the owner on Oct 24, 2020. It is now read-only.

Latency in playing sfx #11

Open
gmarty opened this issue Aug 17, 2016 · 2 comments
Open

Latency in playing sfx #11

gmarty opened this issue Aug 17, 2016 · 2 comments

Comments

@gmarty
Copy link

gmarty commented Aug 17, 2016

I noticed there's a long time between the moment sfx is called and the moment the sound is actually played (about 1 second or so).

I'm not super familiar with this part of picolove but is there room for optimisation to reduce this latency? Are the sounds generated and cached in advance? If not, is it possible to do so?

I'm happy to help if anyone can point me in the right direction.

@gamax92
Copy link
Collaborator

gamax92 commented Aug 17, 2016

The sound system in picolove isn't sampled or anything, it's a large synthesizer that is constantly always generating audio on the fly and can't really be cached at all.

But I'll look into this issue, thank you for reporting.

@gamax92
Copy link
Collaborator

gamax92 commented Sep 22, 2016

For anyone looking at this issue, there's two variables in main.lua that control latency:
__buffer_count=8
__buffer_size=1024
Feel free to reduce these values and report back what works good for you without stuttery audio.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants