VOGONS


First post, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

We recently streamlined Exult's mt32emu with current MUNT again (after a decade or so). Unfortunately the iOS port exhibits frequent distortions. Probably needs some ARM optimizations or there is another problem.
The exult-ios port and the changed mt32emu code https://github.com/litchie/exult-ios/commit/3 … 225f1b11c84833e
Main Exult (same commit) https://github.com/exult/exult/commit/c40439c … b9814106e468b5e

I've also added a bug report to SF https://sourceforge.net/p/munt/bugs/25/

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 1 of 16, by sergm

User metadata
Rank Oldbie
Rank
Oldbie

Hi, Dominus!

I'll take a look at the code yet but from a glance it seems an easier solution would be to make munt render asynchronously.

Reply 3 of 16, by sergm

User metadata
Rank Oldbie
Rank
Oldbie

So, Exult now only plays music through the emulator, right? We don't need to hunt for the minimum latency or does this apply to the iOS port?

Reply 4 of 16, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

It's only a problem when using the iOS port (with latest munt integrated). Xcode debug shows that it's not maxing out the CPU, if that helps.

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 5 of 16, by sergm

User metadata
Rank Oldbie
Rank
Oldbie

I wondered if we can increase the rendering buffer size (the easiest solution but it will impact the latency). Also, please check if the rendering is performed on iOS in the same thread as the other processing.

Reply 6 of 16, by sergm

User metadata
Rank Oldbie
Rank
Oldbie

Well, I don't think that speed can be an issue. After some hours I managed to build mt32emu-qt and tested on iPhone 6 playing the intro from Monkey Island II -> perfect sound.

Reply 7 of 16, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Wow, mt32emu-qt on the iphone? Wow...
Sorry for not responding but weekend was busy... couldn't get to it ;(
So, getting Exult for iOS to run is much easier 😉 you can just grab and compile it with xcode https://github.com/litchie/exult-ios (project file is in /ios). You only need one of the games which can be synced via itunes share
Apart from some include (config.h) Marzo changed Exult to easily accept your upstream changes.

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 8 of 16, by sergm

User metadata
Rank Oldbie
Rank
Oldbie

Don't panic. mt32emu-qt needs a lot of work to become a usable iOS app (and to be fair, android as well). You can look at whatamess it is now 😀
I planned to get hands on Exult itself but first wanted to ensure that CPU is powerful enough to at least do the synthesis.

Reply 10 of 16, by sergm

User metadata
Rank Oldbie
Rank
Oldbie

Yeah... Cmake appeared to be not quite that tool one needs to build mobile Qt apps 🙁
Even one (at least) Qt class is missing (!) when building for iOS.
But at least CoreAudio and CoreMIDI all works fine. Btw, the app creates a MIDI destination as usual. I wonder if that CoreMIDI destination can be used to accept connections from other devices via RTP MIDI.
Though, the most disappointing thing is that the app cannot work in the background, so connecting it to other apps seems to have no sense 🙁

Reply 11 of 16, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Yes, it would be great if you could use it in the background for other apps. I don't know if you can use CoreMidi to receive connections but you can use it to send Midi out. I've done that with my MT32, MIDI-USB adapter, Apple camera connection adapter and my iPhone through Exult 😀

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 12 of 16, by sergm

User metadata
Rank Oldbie
Rank
Oldbie

This is really weird. Even a single CPU core is capable enough to do the synthesis. However, if I open the "Credits" (or "Quotes") scroller, CPU load rises to over 140% but there are no more dropouts of the sound.

Reply 14 of 16, by sergm

User metadata
Rank Oldbie
Rank
Oldbie

BTW, I cannot see the way Exult resample the output of MT32Emu to the sample_rate required by the mixer. Previously, it was configured in the emu properties but now I can't see any reference...

Anyway, I checked the rendering thread to be the audio unit high-priority thread. Perhaps, we should organise yet another thread to pre-render samples and convert to the output rate, so more buffering to add.

Reply 15 of 16, by sergm

User metadata
Rank Oldbie
Rank
Oldbie

Actually, it starts to sound funny when I change audio sample rate 😀