Skip to content

Changing to Pyglet from Soloud for Sound #746

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

Merged
merged 65 commits into from
Nov 26, 2020
Merged

Changing to Pyglet from Soloud for Sound #746

merged 65 commits into from
Nov 26, 2020

Conversation

Cleptomania
Copy link
Member

This change re-works the sound module a bit, primarily abstracting the back-end behind a common interface, and switching from the SoLoud library to Pyglet. It has been tested against Windows, Mac, and Linux with .wav, .mp3, and .ogg formats.

There are no API breaking changes and everything should be able to use it in the same way as previously. However there are some feature additions.

Added Features:

  • Sound looping
  • Checking if a sound is playing or not
  • Retrieve the length of a sound(appeared to be broken with the SoLoud implementation)
  • Get/Set the volume of a sound after starting playback(appeared to broken with the SoLoud implementation)

This should also greatly improve cross-platform support.

The ffmpeg binaries for Mac have been added in a similar fashion to how SoLoud's binaries were included. They can be seen in the "arcade/lib" folder. If ffmpeg is desired for Windows/Linux all one would need to do is drop the corresponding binaries into there and they would automatically be loaded. The Windows/Linux binaries have not been included due Pyglet having out of the box support for Windows/Linux

@einarf
Copy link
Member

einarf commented Sep 28, 2020

We should probably try to get this one merged soon. There are some PyWeekers bumping into audio problems.

einarf and others added 28 commits November 6, 2020 04:50
* issue #782 faster checking for line of sight between Sprites

* issue #782 faster checking for line of sight between Sprites

1. shapely and setuptools removed from requirements.txt

* Update requirements.txt

removed all versioning.

Co-authored-by: akapkotel <[email protected]>
…y_to_find_line_of_sight (#788)

1. Replaced all geometry collision test with shapely functions.
2. Replaced math.sqrt function with math.hypot in get_distance function because hypot is faster - see math module documentation.
3. Removed some redundant local assignments in sprite_list.py functions with straightforward returns.

Co-authored-by: akapkotel <[email protected]>
* Updates to setuptools configuration to align with PEP 517

* chore(setup): remove trailing comma

* Pin crucial package versions

* Update MANIFEST to include .typed files.

* Finalize package version pins.
@pvcraven pvcraven merged commit e5b6bac into development Nov 26, 2020
@Cleptomania Cleptomania deleted the sound-pyglet branch December 14, 2020 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants