-
-
Notifications
You must be signed in to change notification settings - Fork 435
gui/themes: Add support of BGM and small more things. #3411
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
base: master
Are you sure you want to change the base?
Conversation
4e82265
to
53ec272
Compare
372c7fa
to
b818310
Compare
77dca87
to
e4462f3
Compare
bed693a
to
707dbb1
Compare
I guess sure but then:
|
For disable by default, is not needed, is already disable by default... For other, is complicated..., this is unfortunately not possible, just because of the way it works and the difference in processing compared to the sound of games. Which is why I did that, the sound already starts at the very moment the emulator displays the applications home screen, it can also load inital setup sound if you pd0 partition installed (used by default theme too with home file inside it). The current sound for game, is initialized after launching the game, inside later init and I must necessarily process the entire sound, its reading state and volume completely separately from the sound of the game, also bgm loop, not game sound, so decode and playaback code is totaly diferent Also the audio processing by a game is completely different, it does it frame by frame in streaming, for me the audio file is decoded entirely at once and then read. Here so, i need one stream totaly separed other, for manage volume and state, and for decode at9 file and read it alone isolated of sound game My code inilitialze cubed stream inside pre-init for can possible using it inside initial setup and after in home |
As I said, we have an audio abstraction layer for a reason. If there is something not possible right now in the abstraction layer, implement it there with support for both SDL and Cubeb. |
ok but so as I said, it is currently not possible, and I don't see how to manage the decoding in stream, nor how to manage the pause and the volume separately from the sound of the game? the volume and the pause status are managed for cubeb by the stream, and on the current code there is only one, if I made a code isolated from the rest it is not for nothing. Is same for loop, if you looking code you can see it loop when music finish, current code no can doing that, so exept juste when is finished restart again all decoding and stream |
As I said, the reason we have an abstraction layer for audio output is for it to be used. Everything you want to do can be done with minimal modification to the audio abstraction layer. |
I repeat but therefore, problem, how can you manage the control of the pause and the volumes with also the loop of the bgm in a way totally separate from the sound of the game... both need to have separate and totally isolated and separated control... |
The volume is controlled per stream and pausing can also be controlled per stream, I don't see a problem. Also the hardware itself (meaning the audio device) might not at all like being opened twice. It is specified for SDL2 that opening an audio device twice is not supported on all platforms. |
I know that the volume and pause are controlled by the stream, that's what I said 🤔 that's literally why I say it's not possible, that the bgm code must be completely isolated from the game sound code with another stream used, that's exactly what I did, to have management that is independent For double init, i not know 🤔 i used cubeb and no have problem |
41d32c7
to
e0e93d1
Compare
80b7bd5
to
b9b1a97
Compare
d7f095b
to
78b5263
Compare
data.buffer_position = 0; | ||
data.filled_size = 0; | ||
data.data.clear(); | ||
data.data.reserve(static_cast<size_t>(at9_stream.sample_per_frame * at9_stream.channels * sizeof(uint16_t))); |
Check failure
Code scanning / CodeQL
Multiplication result converted to larger type High
a9696e4
to
c9f2798
Compare
- Some small improvement and comment added. config & gui/settings dialog: Add control of bgm volume. - Change start screen delay min to 30 sec and max to 5 min. codec: Set default value to 0 for send of atrac 9.
About
Some small improvement and comment added.
Change start screen delay max to 5 min.
Result
2025-04-07_18-31-09.mp4