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

isPaused() ? #74

Open
ulihuber opened this issue Jul 24, 2024 · 0 comments
Open

isPaused() ? #74

ulihuber opened this issue Jul 24, 2024 · 0 comments

Comments

@ulihuber
Copy link

ulihuber commented Jul 24, 2024

Hi
I suggest integrating a function isPaused()

bool DFPlayerMini_Fast::isPaused()
{
	int16_t result = query(dfplayer::GET_STATUS_);

	if (result != -1)
		return (result & 2);

	return 0;
}

This is useful if you want some content (like actual time or some other information) played while the main file is paused and you don't want to restart the main file but resume later.
So if you pause a playback you can later on differentiate between pause and idle. It is necessary because advertisements do not start without a main file playing unless a 'helper-file' with silence is started before playAdvertisement()

Uli

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

No branches or pull requests

1 participant