forked from replit/play
-
Notifications
You must be signed in to change notification settings - Fork 2
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
[enhancement] Hopefully, we can add support for video (.mp4) and music (.mp3/.flac) file playback #13
Labels
enhancement
New feature or request
Comments
This seems like a good idea, although it will cost a huge amount of time to do videos, I'm sure we can implement an elegant solution for sound! |
TJulesL
added a commit
to TJulesL/play
that referenced
this issue
Nov 30, 2024
Created a new sound object for playing songs / sound effects in the game Corderius-College-Amersfoort#13 e.g : ``` sound1 = play.new_sound(file_name="song.mp3", volume=1.0, loops=0) sound1.play() # start sound sound1.pause() # pause sound (.play() to unpause) sound1.stop() # stops song, if .play() is used again it will restart the song sound1.length_song() # returns the length of the song in seconds .set_volume() and .get_volume() do as expected, both use floats sound1.is_playing # checks if current song object is playing ```
TJulesL
added a commit
to TJulesL/play
that referenced
this issue
Nov 30, 2024
Created a new sound object for playing songs / sound effects in the game Corderius-College-Amersfoort#13 e.g : ``` sound1 = play.new_sound(file_name="song.mp3", volume=1.0, loops=0) sound1.play() # start sound sound1.pause() # pause sound (.play() to unpause) sound1.stop() # stops song, if .play() is used again it will restart the song sound1.length_song() # returns the length of the song in seconds .set_volume() and .get_volume() do as expected, both use floats sound1.is_playing # checks if current song object is playing ```
koen1711
pushed a commit
that referenced
this issue
Nov 30, 2024
* Update __init__.py 3 steps is not enough in some cases to simulate falling over correctly, changed it to 10. I tested it and it does not have a significant impact on performance for lower-end system * New sound object Created a new sound object for playing songs / sound effects in the game #13 e.g : ``` sound1 = play.new_sound(file_name="song.mp3", volume=1.0, loops=0) sound1.play() # start sound sound1.pause() # pause sound (.play() to unpause) sound1.stop() # stops song, if .play() is used again it will restart the song sound1.length_song() # returns the length of the song in seconds .set_volume() and .get_volume() do as expected, both use floats sound1.is_playing # checks if current song object is playing ``` * Updated sound.py + remove .idea from gitingore Updated sound.py with pylint and removed ".idea" from the .gitignore file * Update physics.py Setting a size wouldn't work because of passing the "size" variable instead of the correct "radius" variable * fixed fullscreen Fix fullscreen / border loading added new "screeninfo" module for multi platform. added screen dimensions to global.py file * Update __init__.py analysis by "black" * Update physics.py Weird issue in checking it, worked fine however noted like this it should pass the test * Update physics.py * Update .gitignore Signed-off-by: T <[email protected]> --------- Signed-off-by: T <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How can we better our software?
Your feature!
Hopefully, we can add support for video (.mp4) and music (.mp3/.flac) file playback
As a game, sound and video are an essential part of the game.
In the initial stage, only basic functions are required, and the format does not need to be too comprehensive.
希望可以增加对视频(.mp4)和音乐(.mp3/.flac)文件播放支持
做为游戏来说,声音,视频是游戏中必不可少的一部分。
初期只需要基本功能就可以,格式也不需要太全面。
加油!
The text was updated successfully, but these errors were encountered: