]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - prvm_cmds.c
Improved sound resampling. It can handle sounds up to 96KHz stereo at a constant...
[xonotic/darkplaces.git] / prvm_cmds.c
index bfc904d3a99600d9384035bf4a6382ba6992926a..2271956339e39ab0b72fbdd46bb5811ba301eaf5 100644 (file)
@@ -629,14 +629,14 @@ void VM_localsound(void)
 
        s = PRVM_G_STRING(OFS_PARM0);
 
-       if(!S_GetCached(s))
+       if(!S_GetCached(s, true))
        {
                Con_Printf("VM_localsound: %s : %s not cached !\n", PRVM_NAME, s);
                PRVM_G_FLOAT(OFS_RETURN) = -4;
                return;
        }               
 
-       S_LocalSound(s);
+       S_LocalSound(s, true);
        PRVM_G_FLOAT(OFS_RETURN) = 1;
 }
 
@@ -860,7 +860,7 @@ void VM_spawn (void)
 =========
 VM_remove
 
-entity remove()
+remove(entity e)
 =========
 */
 
@@ -1109,14 +1109,14 @@ void VM_precache_sound (void)
        PRVM_G_INT(OFS_RETURN) = PRVM_G_INT(OFS_PARM0);
        VM_CheckEmptyString (s);
        
-       if(S_GetCached(s))
+       if(S_GetCached(s, true))
        {
                Con_Printf("VM_precache_sound: %s already cached (%s)\n", s, PRVM_NAME);
                return;
        }
        
-       if(!S_PrecacheSound(s,true))
-               Con_Printf("VM_prache_sound: Failed to load %s for %s\n", s, PRVM_NAME);
+       if(!S_PrecacheSound(s,true, true))
+               Con_Printf("VM_precache_sound: Failed to load %s for %s\n", s, PRVM_NAME);
 }
 
 /*
@@ -2266,7 +2266,7 @@ void VM_loadfromfile(void)
        }
 
        // not conform with VM_fopen
-       data = FS_LoadFile(filename, false);
+       data = FS_LoadFile(filename, tempmempool, false);
        if (data == NULL)
                PRVM_G_FLOAT(OFS_RETURN) = -1;