Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Stop the execution #25

Open
jjsquady opened this issue Sep 24, 2023 · 7 comments
Open

Stop the execution #25

jjsquady opened this issue Sep 24, 2023 · 7 comments

Comments

@jjsquady
Copy link

HI!

How I can stop the execution of play?

Thank you

@zergon321
Copy link
Owner

Hi. What do you mean specifically? The Play function of beep/speaker? That's a 3rd party library, its documentation and wiki should have something. Or are you talking about the player example? You can just close the window. Or is there an issue that doesn't allow you to do this?

@jjsquady
Copy link
Author

jjsquady commented Sep 24, 2023

Oh sorry for my english, and for not explain more.

You respond few days ago about Rewind, I use this method to loop the video. But I want to cycle videos in Ebiten, like a menu. I start playing some video, and after change an option, the video changes... but I dont known how to stop the current video to play another.

Thank you for your awnser.

@jjsquady
Copy link
Author

jjsquady commented Sep 24, 2023

Im currently working on Pinball Front-End in Go.
In background its running the video. And at right its the menu to change game.

Inspired by PinballX, Pinup Popper and many others. But writed in Go ❤️

Im waiting the 2.6 release of Ebiten, that adds monitor support.

image

@jjsquady
Copy link
Author

Sorry, I was making a mistake here. I ended up being able to reload the video and exchange it for another one. Now I have another problem, I have a high memory consumption every time I reload a video.

Can help me?

@zergon321
Copy link
Owner

Do you use the (media *Media) Close() method (yeah, I missed it in the example, sorry)?

@jjsquady
Copy link
Author

Dont worry, I used the Close() method, thank you.

About the high memory consumption, any ideas?

When I change the video, I use (media *Media) Close() to stop the current and load the next video... but seems that memory cant cleanup previous video in the memory... and a each change the memory its incresed.

:(

@zergon321
Copy link
Owner

Could you please profile your application with pprof and see what functions allocate memory?

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

No branches or pull requests

2 participants