Sound buffer(size)- and Latency - Value not adjusted?

Ask questions about DraStic or discuss compatibility issues here.
Post Reply
TnA.Plastic
Posts:29
Joined:Mon Jan 20, 2014 5:57 am
Sound buffer(size)- and Latency - Value not adjusted?

Post by TnA.Plastic » Mon Jan 20, 2014 7:50 am

One question: Is the Soundbuffer-size and the latency - values adjusted to the fast forward function?
I get these "knitters"/Knicks in sound (for example in Pokemon, which already needs high latency here to not cause sound-issues), like when I use low latency sound on normal speed, so I guess it is not!

Exophase
Posts:1715
Joined:Mon Aug 05, 2013 9:08 pm

Re: Sound buffer(size)- and Latency - Value not adjusted?

Post by Exophase » Mon Jan 20, 2014 3:25 pm

This value isn't changed with fast forward, but it wouldn't make a difference if it were, the sound would always sound bugged when fast forwarded because it's not resampled. Since the fast forward speed isn't stable anyway (unless you have a cap that it can reach) it'd be hard to reliably resample it anyway, and it'd add overhead.

TnA.Plastic
Posts:29
Joined:Mon Jan 20, 2014 5:57 am

Re: Sound buffer(size)- and Latency - Value not adjusted?

Post by TnA.Plastic » Tue Jan 21, 2014 3:31 am

Exophase wrote:This value isn't changed with fast forward, but it wouldn't make a difference if it were, the sound would always sound bugged when fast forwarded because it's not resampled.
Arrrr,... I'm feeling stupid, that I didn't thought of that...
Since the fast forward speed isn't stable anyway (unless you have a cap that it can reach) it'd be hard to reliably resample it anyway, and it'd add overhead.
Well, I guess syncing the sound to an unstable framerate/system-speed would add a lot CPU-load, which in turn dives the frames down, which again makes it harder for syncing to properly work.

"Ein Teufelskreis!" :)

Any idea, if this part of the emulator can be a bit "polished"?

Maybe a little "circle-slider" (sorry, forgot how it's called... 8. 30AM here) which sets the speed, can be added to the in-emulation-menu (where game is shown in the background), or is something like that already there?
Something which sets in game-speed from let's say 1 (or even half speed) to 4times with little steps between (0.1 for example), or like the percentage shown in the "sub-ingame-menu" (the white one, where the game is not shown in the background).

Thus people can test which can they can reach with a stable rate and sound/sample-rate could be properly adjusted to it. :-)
..and we could change speed quite comfortable then.

Exophase
Posts:1715
Joined:Mon Aug 05, 2013 9:08 pm

Re: Sound buffer(size)- and Latency - Value not adjusted?

Post by Exophase » Tue Jan 21, 2014 3:38 am

There is an option to set the speed to a fixed percentage multiple of realtime speed (like 1.5x, 2x, etc). In theory, the emulator could resample the audio using that fixed ratio when a fixed limit is specified. However, if the emulator can't actually run the game at that speed (which is probably something that happens commonly) you'll end up with even worse audio. It'll sound like it does when it can't maintain realtime speed normally - it'll skip when it falls behind.

I have used some emulators that more or less resample dynamically, like Mednafen. Personally, I actually prefer the way DraStic does it, and I've never been bothered by what the sound is like under fast forward (note that the smaller the audio latency value is, the closer it'll sound like actual resampling). Now, I don't mean to say that I'm going to go with my own preferences over what the users prefer; since this is a paid app Lordus and I do tend to prioritize what the users want first. But since this is the first I've heard on this matter I'd like to hear some more feedback before I attempt to implement anything, especially since I've got a long list of things to work on already.

TnA.Plastic
Posts:29
Joined:Mon Jan 20, 2014 5:57 am

Re: Sound buffer(size)- and Latency - Value not adjusted?

Post by TnA.Plastic » Tue Jan 21, 2014 4:31 am

Exophase wrote:There is an option to set the speed to a fixed percentage multiple of realtime speed (like 1.5x, 2x, etc).
Yepp, but you must either bind fast forward to an in-game-menu-"action-button" or enter ingame-menu to turn it simply on and off and to change the value you have to enter ingame-menu (where actual ROM is shown in the background), then you have to enter it's submenu (the white one) and then you have to enter the Options and then again Video... and then back to the game! 8steps,right
This itself could be easier and if we could have a needle (like in a car) or a regulator (like this where you can change treble or bass on your sound-system :-D at home), showing the "set speed" which is also used to change speed, that sincerely would add some comfort, letting the sound-"issues" aside.
Guess that's something Lordus might have to look into. It's not necessary, but would be kind of better than the normal ingame-menu-fastforward-button. :-) Not sure if "sliding" is even technically supported in the in-game-menu, or only "taping".
In theory, the emulator could resample the audio using that fixed ratio when a fixed limit is specified. However, if the emulator can't actually run the game at that speed (which is probably something that happens commonly) you'll end up with even worse audio. It'll sound like it does when it can't maintain realtime speed normally - it'll skip when it falls behind.
It's also possible the other way around, to sync the frames to the sound, as long as it is fast enough... :-D
It's all just a matter of implementation...
I have used some emulators that more or less resample dynamically, like Mednafen. Personally, I actually prefer the way DraStic does it, and I've never been bothered by what the sound is like under fast forward (note that the smaller the audio latency value is, the closer it'll sound like actual resampling). Now, I don't mean to say that I'm going to go with my own preferences over what the users prefer; since this is a paid app Lordus and I do tend to prioritize what the users want first. But since this is the first I've heard on this matter I'd like to hear some more feedback before I attempt to implement anything, especially since I've got a long list of things to work on already.
No need to really implement something because of the sound, I can live with it. Would be cool anyway, if you find a way without lowering drastic performance, preferable by something simple to implement double-buffering, or whatever...
Try out Pokemon Editions and play it on normal speed with low and high sound-latency-value then on fast forward and you'll notice, what I mean.

Post Reply