mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-11-10 15:01:40 +00:00
Actually mlock the right pointer!
This commit is contained in:
parent
5b2e24a762
commit
41f1fc1920
1 changed files with 2 additions and 2 deletions
|
@ -259,7 +259,7 @@ static int fluid_cached_sampledata_load(char *filename, unsigned int samplepos,
|
|||
}
|
||||
|
||||
if (try_mlock && !cached_sampledata->mlock) {
|
||||
if (fluid_mlock(*sampledata, samplesize) != 0)
|
||||
if (fluid_mlock(cached_sampledata->sampledata, samplesize) != 0)
|
||||
FLUID_LOG(FLUID_WARN, "Failed to pin the sample data to RAM; swapping is possible.");
|
||||
else
|
||||
cached_sampledata->mlock = try_mlock;
|
||||
|
@ -306,7 +306,7 @@ static int fluid_cached_sampledata_load(char *filename, unsigned int samplepos,
|
|||
probably means that the user doesn't have to required permission. */
|
||||
cached_sampledata->mlock = 0;
|
||||
if (try_mlock) {
|
||||
if (fluid_mlock(*sampledata, samplesize) != 0)
|
||||
if (fluid_mlock(loaded_sampledata, samplesize) != 0)
|
||||
FLUID_LOG(FLUID_WARN, "Failed to pin the sample data to RAM; swapping is possible.");
|
||||
else
|
||||
cached_sampledata->mlock = try_mlock;
|
||||
|
|
Loading…
Reference in a new issue