Skip to content

Conversation

@prko
Copy link

@prko prko commented Mar 8, 2024

There is no way to know if the spectrogram is active or not. Thus, I added the method isRunning.
It works!

s.boot;
w = Window.new("testing spectrogram", Rect(10,10, 600, 300)).front;
a = Spectrogram.new(w, Rect(10, 10, 580, 280));
a.start;
a.isRunning // true
a.stop
a.isRunning // false

prko added 2 commits March 8, 2024 19:49
isRunning is added
documentation update for added method isRunning
Copy link

@JordanHendersonMusic JordanHendersonMusic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just add the read accessor '<' to the variable running in line 11? This could probably be renamed to isRunning for clarity.

(Just a comment, not a proper review)

prko added 2 commits March 8, 2024 22:36
isRunning and stop are added to the first example
corrected the method implementation for simplicity
@prko
Copy link
Author

prko commented Mar 8, 2024

Why not just add the read accessor '<' to the variable running in line 11? This could probably be renamed to isRunning for clarity.

(Just a comment, not a proper review)

running is used several times throughout the code. I thought isRunning was a common way to do it, so I did it. However, your suggestion is the simplest implementation!

`this.stopruntask;`
->
`if(this.isRunning) { this.stopruntask };`

to avoid an error when closing the spectrogram window after stopping it
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.

2 participants