Skip to content

Conversation

@philipbl
Copy link
Member

I removed the loop_speaker function and instead create a task that calls loop on the users behalf when playing notes in the background.

@philipbl philipbl requested a review from jgoeders June 29, 2024 02:35
@philipbl
Copy link
Member Author

@jgoeders, I would like to get your thoughts on the code. I think the changes I made here should work just fine in the y-board-v3 library because all the changes are done in the yboard.cpp file and not yaudio.cpp.

@philipbl
Copy link
Member Author

Specifically, I want your thoughts on creating and then deleting the task if all the notes are done. My other thought was to create the task in the setup function and just let it sit there if there is nothing to play. But I liked the idea of not having the task running unless someone is using the speaker. 🤷

@jgoeders
Copy link
Contributor

jgoeders commented Jul 1, 2024

Looks pretty clean. If it works reliably, I think this is a good way to do it.

@philipbl
Copy link
Member Author

philipbl commented Jul 1, 2024

Before we merge this, I would like to make sure removing loop_speaker from the v3 library (y-board/y-board-v3#25) is possible. I don't want the two APIs to get out of sync for too long.

@jgoeders
Copy link
Contributor

@philipbl This looks great. Thanks for doing all this!

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

Successfully merging this pull request may close these issues.

3 participants