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

AudioStreamPlayer ignores Resource loop option #35314

Closed
toby3d opened this issue Jan 19, 2020 · 5 comments
Closed

AudioStreamPlayer ignores Resource loop option #35314

toby3d opened this issue Jan 19, 2020 · 5 comments

Comments

@toby3d
Copy link
Contributor

toby3d commented Jan 19, 2020

Godot version: 43caf83

OS/device including version: Linux 5.4.12-1-MANJARO # 1 SMP PREEMPT Wed Jan 15 08:05:08 UTC 2020 x86_64 GNU/Linux

Issue description: Despite the loopback option turned off, a call to play() causes the sound to play continuously in a loop.

Steps to reproduce:

  • Add AudioStreamPlayer
  • Import OGG-sound
  • Uncheck loop option in OGG-resource settings
  • Bind play() method on pressing button
  • Press the button

Minimal reproduction project: test.tar.gz

@akien-mga
Copy link
Member

I can't reproduce it, it works fine for me.
It even works with Live scene editing by toggling off "Loop" while the game and sound are playing.

@toby3d
Copy link
Contributor Author

toby3d commented Jan 19, 2020

Oops, the problem was in PulseAudio.

@toby3d
Copy link
Contributor Author

toby3d commented Jan 19, 2020

Ah, no, it doesn't seem to be in PA. The checkbox is not updates option in the resource properties, I have to open the scene in a text editor and change the loop parameter from true to false manually.
image

@PapaCheese
Copy link

is there a way around this? i want to use ogg because its light but i cant make it not loop

@akien-mga
Copy link
Member

I still can't reproduce the issue.

When you import an OGG file, you can define whether you want it to loop or not in the Import tab. If you change your mind, you can reimport it.

Screenshot_20200708_090455
This will loop.

Screenshot_20200708_090514
This won't (you should click "Reimport" to apply changes).

Alternatively, if you don't want to reimport the OGG (e.g. you use it looping in some places, non looping in others), you can save the imported resource as a .tres file (with "Save as" in the inspector) and then you are able to change its import options on a per-resource basis.

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

No branches or pull requests

4 participants