terinjokes / mixere

A modern fork of mixere, a Windows audio mixer for live productions.
GNU General Public License v2.0
12 stars 1 forks source link

Delayed Playback due to Audiere WinMM-only compilation #4

Open BPzeBanshee opened 2 years ago

BPzeBanshee commented 2 years ago

Absolutely legendary work btw getting Mixere and Audiere to actually compile on Windows in 2022! I've tried several times to get the poikilos fork of Audiere running but always ran into problems outside my knowledge to fix. With this as a base, I've been able bounce off the VS2022 project file you've provided here to get a modern-compiled Audiere working for my GMALP wrapper project and get 64-bit support going for use under Game Maker Studio 2's x64 runtime.

In the process I discovered an issue which Mixere also suffers from: delayed playback. Takes about a second to start playing, about a second to stop. As long as the build environment only has HAS_WINMM enabled, Audiere only ever finds the poor WinMM audio device and picks that to initialise with, which performs about as well as molasses. Getting it to compile with HAS_DSOUND leads to a few other minor issues upstream but is easily fixable and will get you a DirectSound-supporting Audiere with instant playback. If you're interested in getting that going, I can provide a diff in a few days with my changes to the project file as well as the very few bugfixes I did upstream.

Sidenote: Unfortunately having the DirectSound device available to Audiere doesn't seem to solve Mixere's inconsistent looping, that may be a buffer issue or something possibly relying on some of Audiere's broken LoopPointSourcePtr functions. My workaround for the broken getPosition function in GMALP was to manually calculate the amount of samples being processed based on a given time multiplier provided by the program that loads the DLL in the first place, which is probably a very crude means to an end.

terinjokes commented 2 years ago

Oh hey, there's another user, and I'm not just throwing code into the black void of space. 😄 I am curious to know how you found this fork.

Getting it to compile with HAS_DSOUND leads to a few other minor issues upstream but is easily fixable and will get you a DirectSound-supporting Audiere with instant playback. If you're interested in getting that going, I can provide a diff in a few days with my changes to the project file as well as the very few bugfixes I did upstream.

Yes please! I was streaming the hacking on Twitch at the time, and I believe I ran into those DirectSound issues, but found WinMM worked, and chose it just to keep the momentum moving forward. I've been meaning to circle back around to figuring it out. I've been focused on improving the dependency management and build systems lately, so haven't gotten back to it.

doesn't seem to solve Mixere's inconsistent looping, that may be a buffer issue or something possibly relying on some of Audiere's broken LoopPointSourcePtr functions.

I've definitely spent at least a few hours trying to understand Mixere's handling of time. It would not be surprising to me that there's a bug in Mixere. 😞

Fill free to create a separate issue with reproduction steps.

BPzeBanshee commented 2 years ago

I am curious to know how you found this fork.

Honestly, as far as I can remember, I think I just googled "modern Audiere" and did some sleuthing around the poikilos branch and saw your question to him on this project that way.

Anyway, I've been using Git for years but exclusively using Git for Windows and my own projects so forgive my noobishness for not being able to work out how to do pull requests yet. I just spent 30 minutes trying to work out why diff was being so asinine about picking specific files when the GUI was dynamically finding them, only to realise that git diff is completely different from diff. Here's the git diff output: https://pastebin.com/JQXe1mfA

I'll also add what I changed in the Audiere directory itself, but I'm not actually sure anymore this was necessary for me to get the project to compile as much as it was just to reduce warnings: https://pastebin.com/tztwtcva Bit confused as to how anything I changed there would actually stop it from compiling.

I've definitely spent at least a few hours trying to understand Mixere's handling of time. It would not be surprising to me that there's a bug in Mixere. 😞

Fill free to create a separate issue with reproduction steps.

Cheers, I'll file a separate issue with my investigations on it so far later today.