Audio SE performance improvements #1016

Merged
merged 6 commits into from Sep 1, 2016

Projects

None yet

2 participants

@Ghabry
Member
Ghabry commented Aug 28, 2016 edited

Audio SE cache. Sound effects are cached now in a 5 1 MB cache, only the first access does a cache miss. Afterwards it takes the decoded buffer directly. This also gives AudioDecoder for SE the first time. Should fix 24bit Pom Gets Wifi SEs and gives proper playback speed for the Wii that has a broken SDL resampler \o/.

3DS and PSVita don't use the cache yet.

Cache clearing strategy:
When the cache limit is reached all entries not being accessed in the last 10 seconds are removed.

Fixes #895.

Ghabry added some commits Aug 24, 2016
@Ghabry Ghabry Implement audio cache for SE sound effects and active it for SDL f946b14
@Ghabry Ghabry Add Mono->Stereo resampling to AudioSeCache e41308e
@Ghabry Ghabry Audio SeCache: Fix playback speed of pitch-changed Mono sound effects c1f0bcf
@Ghabry Ghabry Clear all caches when returning to Title Scene or GameBrowser 3757144
@Ghabry Ghabry Fix heap corruption when other files include audio_resampler.h withou…
…t setting the preprocessor macros

This is a autoconf build system problem only because it uses config.h
69229e3
@Ghabry
Member
Ghabry commented Aug 29, 2016

That one is also not risky. Will outsource this to the Wii communtiy to test :D. At least in Dolphin helps alot.

@fdelapena fdelapena added this to the 0.5.0 milestone Aug 29, 2016
@Ghabry
Member
Ghabry commented Aug 30, 2016

Got feedback in the forum, they are happy ;). Concerning psvita and 3ds: Woukd prefer another PR for tjis because i need other testers.

@Ghabry Ghabry Set Audio Cache size to 1 MB, this is enough space for a few samples …
…without wasting too much RAM
8c2a519
@Ghabry
Member
Ghabry commented Sep 1, 2016

Jenkins: Test this please ... fu android

@Ghabry
Member
Ghabry commented Sep 1, 2016

otherwise this is ready now ^^

@fdelapena fdelapena merged commit 5f4ad40 into EasyRPG:master Sep 1, 2016

6 checks passed

Android (armeabi-v7a) Build finished.
Details
GNU/Linux Build finished.
Details
OSX Build finished.
Details
Windows (x64) Build finished.
Details
Windows (x86) Build finished.
Details
web Build finished.
Details
@Ghabry Ghabry deleted the Ghabry:cache_audio branch Sep 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment