Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phonon reverb can get cut off #407

Closed
bjornbytes opened this issue Apr 12, 2021 · 1 comment
Closed

Phonon reverb can get cut off #407

bjornbytes opened this issue Apr 12, 2021 · 1 comment
Labels
bug uh oh

Comments

@bjornbytes
Copy link
Owner

If you use the phonon spatializer and play Sources with the reverb Effect enabled (with an audio mesh active), they reverberate. However, when the Source stops, the phonon 'convolution effect' gets flushed. This cuts off the reverb, which sucks. You can pad the source with silence to work around it, but this is still unacceptable.

  • Instead of flushing convolution effects when a source stops, you could flush them when a new Source starts and grabs a previously-used slot. In practice this would probably fix most of the cutoff, but if a new Source is started while the reverb of another stopped source is still playing, it could result in cutoff. So this doesn't really work.
  • The mixer (or potentially phonon) could pad sources with silence when they stop playing, to allow reverb to complete. This is definitely doable but requires some tricky changes. It may also be separately useful for adding either delay or interpolation features to Sources.
  • phonon could pool its convolution effects. Instead of a direct mapping from Source ID to convolution effect, there could be a pool of convolution effects. When a new reverb source comes along, it grabs a convolution effect from the pool. When the source stops, it doesn't flush its convolution effect but puts it on a list of "decaying convolution effects". These have a timer set to the max reverb duration (irDuration, currently 1 second) and get decayed. Once fully decayed, they are returned to the pool. The pool could either have an unlimited number of effects (growable, guaranteed to never have cutoff), or a fixed number of convolution effects (cutoff possible but only happens when pool is exhausted, always flushes the most-decayed reverb tail). The effects could also be lazily initialized or initialized at startup.
@bjornbytes bjornbytes added the bug uh oh label Apr 12, 2021
@bjornbytes
Copy link
Owner Author

Oops, this is a duplicate of #404

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug uh oh
Projects
None yet
Development

No branches or pull requests

1 participant