Playback lag/delay issue [Solved]

Started by TheMordent, June 27, 2019, 02:27:11

Previous topic - Next topic

TheMordent

Hello, I've been using OpenMPT for a couple years and have always experienced pretty much instant playback of my song patterns when I press the 'Play' or 'Replay Pattern' buttons. There was almost no delay between pressing those buttons and hearing my song patterns.
However, I recently got a new computer and when I use OpenMPT, there seems to be like a 1 second delay between pressing Play/Replay Pattern buttons and hearing my song patterns (the song pattern freezes and doesn't move for a second too). This delay only occurs when I make edits to the song pattern itself. If I don't make any edits to the song pattern, and just press Play, then Pause, then Play again, there is no delay and the playback is nearly instant.
I know this seems like a minor issue, but this unexpected delay/lag really gets on my nerves after making several edits. Are there any fixes to this issue? My new computer is pretty high-performance compared to my previous one and the OpenMPT settings between both computers are basically set as the same, so I don't think this is a matter of hardware.

Any feedback would be greatly appreciated, thanks!

Saga Musix

Pretty much the only thing about your computer here that matters is the sound device you are using and the drivers. Is it by any chance onboard audio and if so, by which manufacturer?
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

LPChip

Also, check the latency settings. It is likely that because you use a different audio device, the latency settings have been reset. WASAPI with a small buffer/latency should fix the issue.
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs

Saga Musix

No, the latency settings in OpenMPT make no difference in how quick a device starts to respond. It is known that there are some crappy drivers which take ages to initialize, no matter how OpenMPT is set up.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

REDrangeDal

I think that there are some settings in the audio device management that came with the new computer that are causing this delay.
This problem also happened with my small laptop, each time I pressed the play button in OpenMPT there was a big delay before a song/pattern started to play.

I fixed this problem in Windows 7 by navigating to the control panel and searching some audio device managers and I saw a setting that made the audio signal to do some extra processing and I disabled it, and after that the delay was gone.

You should try to see if there are such settings in a audio device manager that came with your new PC that are related with effects like extra processing. Also if those settings might not be avaiable in the audio manager(for example Realtek), then find in the sound settings for your audio device in the device manager or somewhere that has to do with the sound device.
1-REDD-1

TheMordent

Quote from: LPChip on June 27, 2019, 08:27:28
Also, check the latency settings. It is likely that because you use a different audio device, the latency settings have been reset. WASAPI with a small buffer/latency should fix the issue.
I tried fiddling around with latency settings, they have no effect on the delay. I already use WASAPI by default.

Quote from: Saga Musix on June 27, 2019, 06:42:21
Pretty much the only thing about your computer here that matters is the sound device you are using and the drivers. Is it by any chance onboard audio and if so, by which manufacturer?

My new PC uses Realtek Audio.

Quote from: REDrangeDal on June 27, 2019, 11:15:37
I think that there are some settings in the audio device management that came with the new computer that are causing this delay.
This problem also happened with my small laptop, each time I pressed the play button in OpenMPT there was a big delay before a song/pattern started to play.

I fixed this problem in Windows 7 by navigating to the control panel and searching some audio device managers and I saw a setting that made the audio signal to do some extra processing and I disabled it, and after that the delay was gone.

You should try to see if there are such settings in a audio device manager that came with your new PC that are related with effects like extra processing. Also if those settings might not be avaiable in the audio manager(for example Realtek), then find in the sound settings for your audio device in the device manager or somewhere that has to do with the sound device.

Realtek seems to be a real pain, I can't even find the Realtek HD Audio Manager, I guess that doesn't matter anyway if there's nothing on the manager to change the delay I experience. I've also tried uninstalling/reinstalling Realtek Audio through the device manager, but still no effect on the delay.

Are there any other things I can try?

REDrangeDal

For finding the Realtek Audio Manager(or something like HD Audio Manager) you must go first in the settings app(in Windows 10) and on the search box type "Control Panel" and after that you select the Control Panel to open, and you will see some sections, and there is one that is called "Hardware and Sound".
In that section you will see a audio manager and in that manager you will see some settings.
The audio manager settings may vary from each audio device so I think you should try to see if there's a setting that might cause this problem.

If not, then another thing to try is to find a program that uses your sound device, even if the program doesn't make a sound at all.
Such program could be a virtual MIDI synthesizer(a program that uses a soundfont in order to play midi files) or a sound enhancer, and it might use a audio driver that can cause this problem.

If these solutions don't work, then the last thing I think is that your audio driver might be incompatible/wrong for your audio device and you must go to the audio manufacturer's website to see if there is a driver that is compatible with your audio device.
1-REDD-1

TheMordent

Quote from: REDrangeDal on June 28, 2019, 09:20:06
For finding the Realtek Audio Manager(or something like HD Audio Manager) you must go first in the settings app(in Windows 10) and on the search box type "Control Panel" and after that you select the Control Panel to open, and you will see some sections, and there is one that is called "Hardware and Sound".
In that section you will see a audio manager and in that manager you will see some settings.
The audio manager settings may vary from each audio device so I think you should try to see if there's a setting that might cause this problem.

If not, then another thing to try is to find a program that uses your sound device, even if the program doesn't make a sound at all.
Such program could be a virtual MIDI synthesizer(a program that uses a soundfont in order to play midi files) or a sound enhancer, and it might use a audio driver that can cause this problem.

If these solutions don't work, then the last thing I think is that your audio driver might be incompatible/wrong for your audio device and you must go to the audio manufacturer's website to see if there is a driver that is compatible with your audio device.

I use Windows 10 and have exhausted every option to try to get Realtek Audio Manager, but I just can't get it on my PC. I've read every article, watched every video on how to get the manager, but it doesn't work. The only compatible drivers that my PC uses are Realtek Audio, I can't get any others installed through device manager. My previous PC used High Definition Audio Device as its driver and that seemed to work fine, but I just can't seem to get it installed on my new PC using device manager. Guess I'm stuck with the lag.

jmkz

I also had your same experience with Windows 10 after update from 8.1, but switched back. You need to spent some time to tweak Windows 10 to improve playback of OpenMPT. I was kinda upset because Realtek audio panel was not showing. Another option is to use https://sourceforge.net/projects/equalizerapo/ and disable all audio processing and/or other APO filters.
Try Windows native HDAudio drivers then motherboard specific drivers and also Realtek's generic ones with WASAPI, WaveRT and default Windows sound assigner.

TheMordent

Quote from: jmkz on June 30, 2019, 22:36:11
I also had your same experience with Windows 10 after update from 8.1, but switched back. You need to spent some time to tweak Windows 10 to improve playback of OpenMPT. I was kinda upset because Realtek audio panel was not showing. Another option is to use https://sourceforge.net/projects/equalizerapo/ and disable all audio processing and/or other APO filters.
Try Windows native HDAudio drivers then motherboard specific drivers and also Realtek's generic ones with WASAPI, WaveRT and default Windows sound assigner.

I installed the APO Equalizer, but how do I go about getting rid of audio processing features? I think I did so by removing all the features in the 'config' text file when I selected my Realtek Audio Device driver, but I'm not exactly sure. OpenMPT still lags on playback.

I'm also unsure of how to get WASAPI/WaveRT/Windows sound assigner and how to use them to install better drivers, seems pretty complicated.

Saga Musix

I can't give any more specific advice regarding your audio device (my laptop's Realtek audio works as expected), in general my recommendation for any serious OpenMPT user is to get a proper audio interface rather than relying on onboard audio - whether it's an internal extension card (PCI/PCIe) or USB doesn't matter. Typically these kinds of issues won't be present with higher-quality solutions.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

TheMordent

#11
[Solved!]

I uninstalled all Realtek files with Revo Uninstaller on my PC and just used the general Realtek audio driver afterwards. Honestly, I'm not sure if this is necessary anymore.

Now here's the strange fix, I have to navigate to the 'Sound' control panel application in order to get rid of the lag. This can be done by going into Sound Card in OpenMPT settings and clicking on 'Setup device...' and once it opens up that sound window... boom... lag/delay is gone. If I ever exited out of that window, I would experience lag/delay again. It's a strange fix, but pretty simple. I just have to leave the window open anytime I use OpenMPT. Not sure why, but it works. Problem is solved.