PS2 OPL SND TEST

Status
Not open for further replies.
IMO, that's probably easier to implement, than most of the other things you are working on .;)

The first needed thing would be a more flexible pathing... (which would be needed for per game-sfx/BGM as well)
I don't really understand how the theme pathing works, it looks a bit complicated..I see pointers to 'themePath' everywhere but I can't find it defined anywhere. Its probably tied into theme configs possibly multiple structs? its like shrek or an onion...many layers
 
Well, I was referring to the path-divide&conquer, from @sp193!

That's the very first 'thing' which needs to be divided into more parts, or extended with a small function, to be able to derive the paths of the SFXs more variable paths... It's still a bit static/inflexible currently.

So this essentially would be needed for various features:
  • the function which derives the path, would need to be able to derive different paths for the sounds (not just SND on every device but between device and SND should be a variable path and if not present, it would link to the default folder/no extra path-variable in-between)
  • to keep it simple, the per-theme-sounds should (currently) solely replace the standard SFX, thus...
  • it should simply 'look up' the SND-Folder within the themes folder, if...
  • the theme's config entry (new entry 'ThemeSFX=0/1' or similar) is set to '1'
  • The 'glue' for the more flexible pathing to the theme's SFX then could simply be a short code which uses the 'theme-path' (path of the currently selected theme) and passes/transmits this 'string' to the part of the 'more flexible pathing-function' which is changed to 'derive'/receive this string and place it into the SFX-path-string (either via a function to 'get/receive it', or via a variable which links to the theme-path [which is already used in the GUI])
Edit: I am not sure, if you rather need a structural idea, or if you need a tip where to look at in the source.


Edit.2: I suppose your current problem is, to find the place in the source where to derive the theme-path from... Is that correct?
 
Last edited:
I suppose your current problem is, to find the place in the source where to derive the theme-path from... Is that correct?
Yea, that's pretty much the only problem. Had a quick look last night all I could see is it seems to be stored in the variable 'themePath' but couldn't figure out how it gets that information..That's why I said it might be linked to the config..Maybe one of the cfg functions retrieves the path idk
 
Looking at the function which sets the new theme (after you choose o.k. in the settings-sub-menu for it) and tracing it from there, might yield the answer. ^^
 
Looking at the function which sets the new theme (after you choose o.k. in the settings-sub-menu for it) and tracing it from there, might yield the answer. ^^
Had a look through themes.c instead, might have found it..Will test it later, no promises but fingers crossed
 
I don't have Max Payne so I couldn't do an exact replica of your situation but I tested several other games, IGR back to browser, boot OPL etc I didn't have any freezes. Hopefully this fixes the problem.

The only thing that was changed in this version (V1.0a?), is that it has SFX sound on by the default?
Or there is something else?

What about extend LOGO displays time?

Anyway, I don't know why, but sometimes this version (V1.0a?) and previous v1.0 just seems to freeze.
It's random. Sometimes after IGR game freezes (Max Payne gives me white screen after few in-game reboots).*
Sometimes after IGR, OPL freezes after changing resolution.

If I'll find some time, I'll try to make more tests.

* - the same situations happens with OPL 1200
 
Last edited:
The only thing that was changed in this version (V1.0a?), is that it has SFX sound on by the default?
Or there is something else?
I also had the audio lib quit when loading a game or quitting OPL, I forgot to do it when I did it for hdl server..I thought because I didn't do that you were getting freezes after IGR and rebooting OPL, didn't realize it does it in r1200 as well I thought it was a bug introduced by the SFX builds.

What about extend LOGO displays time?
I don't really want to do this, just because it would affect everyone...Even people that don't want to use SFX. @Tupakaveli had an idea to add a delay just before the boot sound plays so the sound can sync up with fading in properly (this was an idea just for our console as the sound plays and ends while the logo is still shown) but I guess the delay could be user defined as the length is kinda determined by your number of games, what device you are booting from etc..

I dunno if that's a good idea or not though, not sure if anyone would use the option.

Edit: OK I misunderstood what @Tupakaveli was asking for and he was asking for the same thing, I guess the sound plays at the same point regardless..I can add a condition that if SFX are enabled the logo stays up a lil longer in order to sync better that way people not using SFX are unaffected.
 
Last edited:
I can add a condition that if SFX are enabled the logo stays up a lil longer in order to sync better that way people not using SFX are unaffected.
And using a delay configurable by the user with a new setting ?
By default = 0 (disables the delay), and the other options +1 +2 +3 where the unit represents the delay time before the animation fadeout starts
Or in steps of 500 miliseconds for better precission

The idea is the lenght of the fadeout effect (at the end of the animation) is always the same... but the delay before the fadeout effect starts can be configured

You was mentioning "display time", i dont know the code but i think basically what im saying is to divide the "display time" in 2 segments, and both displaying the logo
First segment is mandatory... and second segment have a configurable lenght... after that comes the "fadeout effect" that is always the same style/lenght/effect (for consistency)

Not sure if the argument about hardcoding the lenght of the fadeout effect "for consistency" is a good idea though, initially is fine, but if at some point you want to add more settings this lenght could be configurable too
 
IMO, it would be better to leave out the boot-sound for now and just make a PR with the SFX... That way, we could have a lot more people getting interested in it and testing it out... AND... We could finally have a good sound-base/support within the main-repo!
 
IMO, it would be better to leave out the boot-sound for now and just make a PR with the SFX... That way, we could have a lot more people getting interested in it and testing it out...
Soon, I wrote an example structure on my phone last night when I couldn't sleep for per-theme SFX..I wanna test it out first, been messing with it the past couple days..In theory it 'looks' like it should work, I'll keep you posted
 
  • Like
Reactions: TnA
Ooooh, interesting!

I hope the proposal for a structure, or the additional informations did help at some place/point!
 
IMO, it would be better to leave out the boot-sound for now and just make a PR with the SFX... That way, we could have a lot more people getting interested in it and testing it out... AND... We could finally have a good sound-base/support within the main-repo!
Well, yes, step by step is a safer approach :)
Im just throwing ideas incase comes handy

I had another idea while reading my previous suggestion and i need to post it because i think it "should" work in a automated way, not sure if can be made though
Is based in the same concept of splitting this "boot logo display sequence" in 3 parts

First part (logo full opaque) is displayed always, and his lenght varies (every user will have a different one)
Second part (logo full opaque) is a delay configured automatically (i will explain this below)
Third part (logo alpha channel decreases with time) is the "fadeout" and always have the same lenght

What im thinking to calculate the delay is to use a timer function to meassure time since the point where OPL boots to the point when is displayed the first image of the interface
This time could be stored as last_booting_time in the config, and based on it you calculate the delay time (located at the middle of the "boot logo display sequence")

And by default (when no config exists) you should use a big delay incase you are enabling SFX by default

This way there is no need to add a setting to configure the delay manually, and i think there is less room for inestabilities
 
I also had the audio lib quit when loading a game or quitting OPL, I forgot to do it when I did it for hdl server..I thought because I didn't do that you were getting freezes after IGR and rebooting OPL, didn't realize it does it in r1200 as well I thought it was a bug introduced by the SFX builds.

I think that there was something wrong with my setup. :(
I formatted MC, tested (V1.0a?) with sounds enabled at start,
without need to enable it in settings + audio lib quit when loading a game or quitting OPL and...
after many IGR's, changing res, etc. everything seems to work fine.
image.gif

Although I haven't tested themes so far.

I don't really want to do this, just because it would affect everyone...Even people that don't want to use SFX. @Tupakaveli had an idea to add a delay just before the boot sound plays so the sound can sync up with fading in properly (this was an idea just for our console as the sound plays and ends while the logo is still shown) but I guess the delay could be user defined as the length is kinda determined by your number of games, what device you are booting from etc..

I dunno if that's a good idea or not though, not sure if anyone would use the option.

Edit: OK I misunderstood what @Tupakaveli was asking for and he was asking for the same thing, I guess the sound plays at the same point regardless..I can add a condition that if SFX are enabled the logo stays up a lil longer in order to sync better that way people not using SFX are unaffected.

I was thinking about enable extend LOGO displays time, when user will enable SFX.
When the SFX will be disabled, there will bo extend LOGO displays time.
Well it doesn't matter now.

Anyway, thanks for improving sound-builds.
 
@jolek
Sorry I didn't mean to sound like I was shooting down your suggestion, I will be looking into the LOGO display times related to SFX soon. I think yourlself, @sandungas & @Tupakaveli made some good suggestions related to that.

Anyway for the mean time there is a new version if people want to test.
Changes since last update:
  • per-theme sfx
  • removed 'audio path' option as all external sounds are linked to themes now

So just put your SND folder in any THM_'NAMEOFTHEME' folder and let OPL do the rest. (please make sure they are STEREO before converting to ADP or you will get a strange experience).

I've included @RivalK93 s sound pack already converted so people can test default sounds and his sounds to see its working. (cancel sound is the same as I'm using his in the default theme).

NOTE: There is unfortunately one minor bug I'm still trying to figure out a way to fix which is that if you have a custom theme with custom sounds loaded and then load HDL SVR; upon exiting and returning to the GUI, the default SFX are reloaded rather than the custom theme SFX, until reloading the theme. :(

Don't wanna tag everyone and annoy them so I'll just type it.
Thanks to:
dekkit, jolek, NewFile, RivalK93, sandungas, svotib, sp193, TnA, Tupkaveli, VeditaBR.
For your support.
 

Attachments

You have just proven me right, lol.
IMO, that's probably easier to implement, than most of the other things you are working on .;)

The first needed thing would be a more flexible pathing... (which would be needed for per game-sfx/BGM as well)
Hate to say 'I told you so...'!

Not going to list every point of the things, which I mentioned to be necessary for this to work. :congratulatory:

I am going to test it later.
Great job/work! :applause:


Edit: So... Essentially this also makes the SND-Folder redundant, because we can use a 'blank theme' (or the base-theme) and just add the SND-Folder in there, tho'. At least I see no real reason to keep it in the root-working-folder of OPL (except maybe, if someone opts to not use the theme's SFXs but rather the basic ones... That's why I suggested a switch-entry ['ThemeSFX=0/1'] in the theme's config! ;) )
 
Last edited:
Edit: So... Essentially this also makes the SND-Folder redundant, because we can use a 'blank theme' (or the base-theme) and just add the SND-Folder in there, tho'. At least I see no real reason to keep it in the root-working-folder of OPL (except maybe, if someone opts to not use the theme's SFXs but rather the basic ones... That's why I suggested a switch-entry ['ThemeSFX=0/1'] in the theme's config! ;) )
Correct, the old pathing is redundant. Keeping a SND folder on the root of any drive will do nothing, the files will not be read.

I don't think a config entry is necessary, If the theme has a SND folder it will use those sounds...If it doesn't it will use default sounds...If the theme only replaces some sounds the missing sounds are filled in by the defaults. if the user doesn't like the sounds in a specific theme, replace or remove them.
 
  • Like
Reactions: TnA
Yes, I suppose it (ThemeSFX-Entry) is not needed, but I am not yet sure if there wasn't another reason rather than just the convenience-factor for me, to suggest it (for example shared SFX, etc.).

But I agree, that it (SND-Folder) is probably redundant now (thus cutting down on the folder-structure... I hope we will have one ISO, folder instead of CD&DVD-Folder anytime in the future as well.)!
 
Last edited:
Anyway for the mean time there is a new version if people want to test.
Changes since last update:
  • per-theme sfx
  • removed 'audio path' option as all external sounds are linked to themes now
So just put your SND folder in any THM_'NAMEOFTHEME' folder and let OPL do the rest. (please make sure they are STEREO before converting to ADP or you will get a strange experience).
If the theme has a SND folder it will use those sounds...If it doesn't it will use default sounds...If the theme only replaces some sounds the missing sounds are filled in by the defaults. if the user doesn't like the sounds in a specific theme, replace or remove them.
Wow, you did it! Nice man! :) I really like that implementation and i am glad @TnA's efforts to go this way paid off.
I was trying to figure out how to list all the themes that have SFX in the Audio settings page the other day. (Did not even get close.) But i guess every theme artist will make his/her SFX match his/her theme. And maybe some of them would not want them to be used alongside different themes. "It would ruin the matching SFX-theme experience" or something. (I am not one of them.)
Anyway, i would really like to see how you did it if/when you share the code on github :)
 
  • Like
Reactions: TnA
It already is on GitHub within the new 'theme-sfx'-branch on Krah's OPL-repo! :)

Regarding a 'special listing' of themes which have SND/SFX implemented...: Well, you would need to scan for the presence of an SND-Folder in every theme-folder.

I am not sure, if that is a wise decision especially if someone has a lot of themes.
 
Status
Not open for further replies.

Similar threads

Back
Top