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

[UserStory] Fix issue with loose audio threads #103

Closed
1 of 5 tasks
nicholasmatthews-dev opened this issue Oct 24, 2021 · 1 comment
Closed
1 of 5 tasks

[UserStory] Fix issue with loose audio threads #103

nicholasmatthews-dev opened this issue Oct 24, 2021 · 1 comment
Assignees
Labels
user story User Story

Comments

@nicholasmatthews-dev
Copy link

nicholasmatthews-dev commented Oct 24, 2021

User Story

Essential components

  • Title describes the story
  • Stakeholder type is identified
  • Outcome is described
  • Rationale is explicit
  • Acceptance criteria are verifiable and from the perspective of the stakeholder

Story

As a developer
I want any thread created to play audio to have an accessible pointer in the code
so that audio threads can be controlled, stopped, or otherwise interacted with. As well as preventing potential issues with memory leaks and bloated thread counts.

Acceptance Criteria

  • Any audio thread created has a method or pointer which is tracked in the code

Supporting Information

Currently, the ImgProvider.play() method creates a new thread with code which will play a song. Then, the ImgProvider.play() method starts the thread. A pointer to this thread exists in ImgProvider.playThread. However, calling ImgProvider.play() a second time will create a new thread, switch the pointer to that thread, and then start the new thread. If the previous thread is still running, it is completely inaccessible from the program as is currently written, as the pointer to that thread has been replaced.

Ideally, any pointers to all active threads should be included in some collective data type, which can then be accessed, so starting a new thread no longer creates a situation in which code is being executed which can no longer be interacted with. This will help for extensibility for any functionality which seeks to control audio threads, as well as providing a way to access and close threads which are (for any reason) behaving badly.

Dependencies

Depends On

Dependents

@jody
Copy link
Contributor

jody commented Oct 25, 2021

This is a bit too vague and therefore somewhat confusing. What are the actual desired outcome and rationale? How is satisfaction measured?

For example, what is preventing a developer from currently achieving the intended goal? (Why can't a developer just write the code you are describing?)

This sounds like it could be a request to change the API or it could be a requested refactoring.

@jody jody closed this as completed Jan 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
user story User Story
Projects
None yet
Development

No branches or pull requests

3 participants