vpinball / pinmame

PinMAME - Pinball Multiple Arcade Machine Emulator
https://www.vpforums.org
Other
181 stars 50 forks source link

newer pinmame, gives stutter in rom sound #266

Closed sverrewl closed 5 months ago

sverrewl commented 5 months ago

For the first time, couple of months back, I noticed that my cab, for quite a lot of table got some odd rom sound stutter. It could be almost any kind of sample being played, but, maybe most noticeable on pr. example Road Show, with Red's call-outs. She sounded like she got a stutter. I shrugged that off and though that it would be fixed in upcoming releases, but, it is still there.

I now wanted to investigate it further, is this a final blow for me, still running Win7 in the cab ?? Tried it on my Win10 desktop upstairs and had no issues. Until i checked the sound_mode set. Default upstairs is was on 0 and on cab 1. Changing it to 1 on Win10, I could reproduce this. Maybe not as easy to hear on the more beefier machine, but, I didn't have to play rs_l6 for long before samples seems to be played more than once in a row, so to speak. Not ending the first iteration.

The night we first noticed this, was with some beers, so I didn't really take a note on which machines - but, we played many different ones from late 80 and early 90. Maybe WPC issue ?

toxieainc commented 5 months ago

Hmmm.. You mean alt. sound mode = 1, right? If yes, this would be something for @droscoe

sverrewl commented 5 months ago

Yes. Alt Sound Mode in the gui - sound_mode in registry. 1 used to be improved over 0, but, the "new" alt code kind of hi-jacked something that was working. I don't understand the reasoning for not making a new number for the new feature. Oh, well, I'm sure it gets fixed.

toxieainc commented 5 months ago

In theory, existing sets should work more or less the same with the newer code. The code for these is not THAT different. But it was also necessary to rewrite like this, my old/initial implementation was a complete mess.

So i guess its 'just' a bug.

droscoe commented 5 months ago

For the first time, couple of months back, I noticed that my cab, for quite a lot of table got some odd rom sound stutter. It could be almost any kind of sample being played, but, maybe most noticeable on pr. example Road Show, with Red's call-outs. She sounded like she got a stutter. I shrugged that off and though that it would be fixed in upcoming releases, but, it is still there.

I now wanted to investigate it further, is this a final blow for me, still running Win7 in the cab ?? Tried it on my Win10 desktop upstairs and had no issues. Until i checked the sound_mode set. Default upstairs is was on 0 and on cab 1. Changing it to 1 on Win10, I could reproduce this. Maybe not as easy to hear on the more beefier machine, but, I didn't have to play rs_l6 for long before samples seems to be played more than once in a row, so to speak. Not ending the first iteration.

The night we first noticed this, was with some beers, so I didn't really take a note on which machines - but, we played many different ones from late 80 and early 90. Maybe WPC issue ?

You said that the machine you first noticed the problem on had the sound_mode set to 1, but it was zero on the Win10 machine and didn't have the problem. You then said setting it to 1 on the Win10 machine reproduced the problem. I need to confirm you are actually running an altsound for the tables in question. If you are not, then sound mode should not be set to 1. Sound mode 1 is not an "improved" version of of mode 0. I'm trying to understand why you set the "working" machine from 0 to 1, or why the cab was set to 1 in the first place. Please confirm you are actually using an altsound package for the tables in question.

I have played dozens of tables using the new altsound code, and have not run into any problems like you describe, nor has anyone else reported this behavior. That doesn't mean there isn't a bug in the code, but it's a bug that's somehow triggered by your particular setup. It would be helpful if we could work together to resolve it. Are you on Discord? Debugging will be much easier if you are able to work with me directly. I am "MrGrynch" on Discord.

If not, then I need more information before I can look into this (since I don't have the problem and can't reproduce it).

Thanks!

sverrewl commented 5 months ago

Hi !

There is obviously some confusion going on here. I very seldom do run altsound, unless the replaced sounds is improved and 100% true to the original. Won't be insulted being called a purist ;)

From your reply, it kind of sounds like, either run with altsound sidecar files, or ... expect stutter. This is ok by me. I've exported quite a lot of registry settings, put the sound_mode to 1 a long long time ago, since this used to gave me an improvement over the default ( set to 0 ). Very easy to fix on my end. However,

I will need to investigate this closer I guess. I was not given the memo that told me that you should expect stutter now if you kept having this set to 1, with or without sidecar altsound samples.

droscoe commented 5 months ago

Hi !

There is obviously some confusion going on here. I very seldom do run altsound, unless the replaced sounds is improved and 100% true to the original. Won't be insulted being called a purist ;)

From your reply, it kind of sounds like, either run with altsound sidecar files, or ... expect stutter. This is ok by me. I've exported quite a lot of registry settings, put the sound_mode to 1 a long long time ago, since this used to gave me an improvement over the default ( set to 0 ). Very easy to fix on my end. However,

Sound Mode 1 is for altsound. That has always been the case. There is no benefit to using that mode if you don't have an altsound package. Any perceived improvement in performance is false. Regardless of which code you run (old/new), at best it is a pass-through. In any case, it's undefined behavior which can manifest in many ways. I've done this unintentionally in the past, and sometimes I get no sound at all other than table sounds.

I will need to investigate this closer I guess. I was not given the memo that told me that you should expect stutter now if you kept having this set to 1, with or without sidecar altsound samples.

Maybe the documentation for PinMAME needs to be improved. You are/were using the software incorrectly, obviously for quite some time. I'm glad you reported this problem, as it revealed this, which ultimately solves your problem.

sverrewl commented 5 months ago

Haven't really had the time to test this until now, and quite limited yet. Played 5-6 games of RS. I wasn't really able to get Red to stutter much. But, it often happned pr. example between balls, and sometime the next sample played is partly getting distored after a looped sample.

It isn't happening very frequent but, there is definately happening. Maybe some people don't notice, not playing as much as I have ? Or, it could of course be happing for me only.

I've made sure, correct sound mode is set, 0. I have some older pinmame archived away on the cab. So, I will try to jump some back in time to make sure that this is "newer" pinmame related only.

sverrewl commented 5 months ago

@toxieainc

Ok, I've done somre more testhing now. Using v10.8.0 rev 1948 OpenGL 64bit and different pinmame version where I ONLY extracted Bass.dll and VPinmamedll from my archives. Same table and rom - RoadShow - rs_l6 vpw released table.

The last OK version I had : VPinMAME-sc-3.6-888-963dfb1 First with the issue for me: VPinMAME-sc-3.6.0-901-bfa2cca

Hope this makes sense some way or another for you guys. And thanks again for all your amazing work. Love you guys !

sverrewl commented 5 months ago

Saw this being discussed, and, yes, it is kind of the same "stutter" I'm talking about. Very surprised though to hear that this is happening before 888. I played long games of Roadshow, some games up to 1.000.000.000 scores without noticing any issues for that particular rom. What sounds to be a common factor. Solenoids is triggered, but, well, that can be a fluke. Often samples changes are related to those firing in the first place. So, don't put TOO much into me mentioning it.

https://github.com/vpinball/pinmame/issues/268#issuecomment-2075292352

sverrewl commented 5 months ago

Oh. Maybe best to mention. My roadshow has altcolor enabled for that rom. Freezy 2.2.1 on a pindmd3 vni/pal format.

Mancneil commented 5 months ago

I've experienced stuttering on Scared Stiff since updating vpinmame the last couple of occasions. I'm on 929 and stutter persists at certain specific occasions in the game: - when achieving the skill shot / when collecting a deadhead / when locking a ball / during the two digit match sequence for a free game.

toxieainc commented 5 months ago

@vbousquet I guess this is related to the PWM changes. But how can this happen if the existing tables do not trigger the new code path?

vbousquet commented 5 months ago

I had a look and did not find anything obvious. I'm able to reproduce this easily (for example on White Water). It seems to be WPC only and also happens when the new PWM codepath is not activated, so weird. I will dig deeper on this but this is a surprising bug. Maybe something changed on the WPC sound emulation in the same timeframe ?

sverrewl commented 5 months ago

Did download @vbousquet special build and tested that,

I was not able to reproduce the stuttering issue. I can't guarantee that it solved 100%, but, from the games I played at least. I was not able to detect the problem any more.

Very nice, and a huge thanks !

lminimart commented 5 months ago

@sverrewl try loading BoP and listen to the post-game music. I still hear slight hiccups in the audio there with the special build, really only one or two tiny ones, and it's a big improvement, but just curious if you hear it there at all.

lminimart commented 5 months ago

here's what I hear when running VPinMAME-3.6.0-947-44c1fed-win-x64, note the "cd skip" at around 21 seconds:

https://github.com/vpinball/pinmame/assets/128234486/2b117653-7a76-4084-85b0-e9807165e025

sverrewl commented 5 months ago

I agree. You have stutter in the ending. I just tried BOP with bop_l7 on my Win10, beefy computer upstairs (win10 / 3080 - 12gen i7 12700F) and I'm not able to reproduce with 3.6.0.932. That is an older version that should have this issue !

I don't have time right now, but, will try it on my cab which is now "a bit aged", Might very well be that the devs can't reproduce running beefier systems ?

lminimart commented 5 months ago

well, i did ask that the other day and didn't receive any confirmation... tho a friend with a ridiculous 4090 system definitely has the stutter issue on BoP too (with current public beta). seems like something that might not always be there, or at least not in the same places?

sverrewl commented 5 months ago

Too early to tell I guess. But, my first report goes towards different sample having stutter in different parts of the game. As I said in the start. We played a lot of games one night. Mostly WPC, I'm sure. Had this issue, but, we kind of ended up with concluding that Red had got a stutter on her old days.

But, testing it later, I wasn't able to get her to do that. But, there were still stutter in the general playback.

That seems to be fixed (not extensively tested by me though, but, 3 full - longer games of RS). It used to be 100% guarantee that I would get issues. So, yes, this seems to be a go/no-go for one install to the next. Hope they can figure it out.

sverrewl commented 5 months ago

Ok, now I've tested BOP in different variations. During game play, I was not able to notice any issues with samples. But, I want to make it clear. I'm not an expert on this particular machine. It would probably be best if someone who owns one verified.

On the newest pinmame. I'm able to reproduce the same stutter as @lminimart , even tried a different rom. If I ran it on 888, I'm not able to hear it.

BUT, I'm not sure how to describe this. My stutter is kind of not as "big", and if you don't know what you're looking for, can easily be overlooked.

@toxieainc / @vbousquet : Personally, without having played many other WPC's yet - the fix seems to have solved at least the major issue. Oh, forgot, updated the faster machine with everything newest, and there I'm not able to detect stutter in the end music.

lminimart commented 5 months ago

Agree re: during gameplay: that was very rough with the public beta, and much better with the experimental build. Also agreed that most people probably wouldn't even notice it in music, maybe only on vocal callouts. The BIG issues with stutter are resolved for certain. I will eventually put the experimental vpinmame on my best machine and if i do, i anticipate similar results as @sverrewl.

toxieainc commented 5 months ago

Closing then. Otherwise please complain again with what is still wrong with certain table(s). Thanks all!

TigerOfOld commented 5 months ago

Just want to add that with build #955 (32 bit SC) the stutter on BOP is improved but not eliminated for me. It is most prevalent when turning on the full dmd scoring in the back glass settings. I'm using ROM bop_l8.

Thanks for all that you guys do! You are legends!

roadrunnermakmak commented 4 months ago

I discovered "echoing" of many many ROMS lately after updating VPinMame. E.g. Demolition Man dm_h6, or older tables e.g. deadly weapon and so on, at least every second table i started the last days. sounds like the ROM is started twice or three times and callouts are repeated quickly after another. Not all but many callouts.put red&ted on the list as well. its quite annoying, sry to say that.

sverrewl commented 4 months ago

@roadrunnermakmak : You are sure you are running the latest ? During this weekend, I had once again friends over and we played quite a lot of games. We didn't react to any WPC issues anymore, but, GnR, Sega v3, had surprisingly issues. The machine started out playing only the instrumental sounds and it took quite a long time before Axel came on stage and we actually got the full sound experience. I was then on a very close to the current newest pinmame. @toxieainc / @vbousquet

roadrunnermakmak commented 4 months ago

Pretty sure the latest. Ive installed the one of february (i guess, im not at the machine right now) a few hours ago and this one made no problems or sound stutter. I'll stay there for now. Most likely the fault is on my side as always anyways ;+)

Thalamus @.***> schrieb am Di., 14. Mai 2024, 20:37:

@roadrunnermakmak https://github.com/roadrunnermakmak : You are sure you are running the latest ? During this weekend, I had once again friends over and we played quite a lot of games. We didn't react to any WPC issues anymore, but, GnR, Sega v3, had surprisingly issues. The machine started out playing only the instrumental sounds and it took quite a long time before Axel came on stage and we actually got the full sound experience. I was then on a very close to the current newest pinmame. @toxieainc https://github.com/toxieainc / @vbousquet https://github.com/vbousquet

— Reply to this email directly, view it on GitHub https://github.com/vpinball/pinmame/issues/266#issuecomment-2110872444, or unsubscribe https://github.com/notifications/unsubscribe-auth/BCCOUUPBTHUPDJMVJRSSNT3ZCJKXNAVCNFSM6AAAAABGL4ATH6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJQHA3TENBUGQ . You are receiving this because you were mentioned.Message ID: @.***>

Ice73 commented 4 months ago

hi guys, im hooking in on this thread. The sound stutter is really getting annoying. I have it on muliple tables. The no fear table i play now sounds good, untill i wait too long playing the next ball that comes out of the plungerlane. it's like waiting too long gives the sound a stutter. a mate of me has the same issue. so im asking for both. i play vpx on 10.8 rev 1947, dmdext 2.2.2 and vpinmame on 3.6.0. 945 Greetings Manolo

Ice73 commented 4 months ago

a litlle stutter on no fear when i waited too long with the plunger

https://github.com/vpinball/pinmame/assets/94793710/0f0b5313-0462-4880-9a37-dbe2581509d4