Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: play_control::get()->is_playing() (Read 3035 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

play_control::get()->is_playing()

I'm writing a plugin in which I need to check if the current playstate is PLAY or not. So I use this line of Code:
Code: [Select]
if (play_control::get()->is_playing()) ...
This check works fine for the playstates PLAY(true) and STOP(false). But it also returns true, if the playstate is PAUSE.
Is this intended? What else function can I use to check is playstate is PLAY, and I mean ONLY PLAY...

play_control::get()->is_playing()

Reply #1
Code: [Select]
play_control * pc = play_control::get();
if (pc->is_playing() && !pc->is_paused()) ...

play_control::get()->is_playing()

Reply #2
Ah, ok. I see. Simple solution (to simple problem I guess  ).

Many thanks.

play_control::get()->is_playing()

Reply #3
what are you working on? a user interface?

ps: you're a student of mathematics, right?