Skip to content

Setting updates cut out the playback #736

@Reiji777

Description

@Reiji777

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

On any device regardless its spec, setting updates will always cut out the playback abruptly for a short period of time.

  • I know that you mentioned this potential problem in the issue below, but wanna follow up a little bit.
    Setting update becomes laggy #657

  • I'm reporting it because this behavior is likely to be obvious (especially when adjusting volumes, which users would often do) on every device regardless of its spec, due to the current implementation. It was quite obvious on my Macbook and iPhone, which are supposed to be more than powerful to handle such playback.

Expected Behavior

Playback shouldn't be cut out abruptly when updating settings

Steps To Reproduce

  1. Open project website alphatab.net
  2. play the sample
  3. Adjust volumes of any track, and you will notice the cut out

Link to jsFiddle, CodePen, Project

No response

Found in Version

1.3-alpha

Platform

Web

Environment

- **OS**: MacOS
- **Browser**: Safari 15.2 (17612.3.6.1.6)

Also can reproduce the issue on iPhone X.

Anything else?

Not sure if below makes sense -- I could imagine two possible approaches to possibly optimize this behavior:

  1. Instead of immediately clearing all audio buffers and re-generating the audio, is it possible to still keep playing the old buffers until the new buffer becomes ready? I assume this way there won't be abrupt cut out, and thus the setting update should feel smoother.
  2. We expose the buffer size as a setting property, so that users can customize it based on their devices. We set the buffer size of version 1.2.1 as the default value, which has turned out to work for most devices except for those with very poor specs. This way only users with poorly performing devices will experience the delay of the setting updates -- not the best, but I assume it'd be better than impacting all users.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions