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

Play only a part of the sound #11

Open
Pirulax opened this issue Mar 7, 2022 · 2 comments
Open

Play only a part of the sound #11

Pirulax opened this issue Mar 7, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@Pirulax
Copy link

Pirulax commented Mar 7, 2022

So, I'd like to play only a part of the sound, eg.:

pb = Playback("sound.wav")
pb.play(10, 15) # Should only play the part between the 10th and 15th second

My workaround would be to keep checking if curr_pos is > end and stop playing.

Thank you very much for the library, it took me a few hours to find one that supports accurate positions with multiple sounds at once.

@cheofusi cheofusi added the enhancement New feature or request label Mar 8, 2022
@cheofusi
Copy link
Owner

cheofusi commented Mar 8, 2022

Hi Pirulax,

I'm really glad the library was useful to you. A parameterized play method would be great to have but I'd be rather very busy for the rest of this week. If you're feeling like it, give it a go and open a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants
@Pirulax @cheofusi and others