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

Is there a pause() method? #200

Closed
soulchainer opened this issue Sep 10, 2015 · 3 comments
Closed

Is there a pause() method? #200

soulchainer opened this issue Sep 10, 2015 · 3 comments

Comments

@soulchainer
Copy link

Hi.
I'm just trying this library and I'm a bit confused.
There is a stop() method:

stop () static
Stop all audio (global stop). Stopped audio is reset, and not paused. To play audio that has been stopped, call AbstractSoundInstance play.

It makes clear that is not a pause() method.
And we also have a paused property in AbstractSoundInstance for check if our instance is paused. And we have PLAY_SUCCEEDED that

Defines the playState of an instance that is currently playing or paused.

But where is the method for actually pause an instance? Because, I have checked the documentation and the only thing I found is a master method for stop all the sound instances and a method for stop individual instances. Not a clue of how actually pause an instance. And, of course, if I check an stopped instance about being paused, it says that it isn't paused (that's logic). And there isn't also an specific method or property for know if an instance is stopped. So, it seems to me pretty difficult to pause anything without a method for pause anything. Or to check if anything is stopped without a method/parameter to check if anything is stopped.

Any help/clarification about this, please? I'm pretty new with this, but I guess here has to be some way, right?
Thanks.

@gskinner
Copy link
Member

The docs definitely need to be improved for this, but you can just set paused=true to pause a sound instance. I'll leave this open until we fix the docs.

@soulchainer
Copy link
Author

Thanks, @gskinner :D. That was quick ñ_ñ.
I was getting crazy, I going over all the docs several times and found nothing.

@gskinner
Copy link
Member

Ya, paused used to be a read only property, but then we deprecated setPaused/getPaused, and made it a getter/setter, but it looks like while we took off the readonly flag, the description didn't get updated. Sorry about that. :)

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

2 participants