]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - snd_main.c
use *64.dll instead of *.dll on win64, this way we can include both 32bit and 64bit...
[xonotic/darkplaces.git] / snd_main.c
index 365ebf85cc0affeb4fbd6da0c254bec8a73180af..fe590b1234d7e63ea81a5ef93f25854b653efc21 100644 (file)
@@ -257,7 +257,10 @@ sfx_t *S_FindName (const char *name)
                return NULL;
 
        if (strlen (name) >= sizeof (sfx->name))
-               Host_Error ("S_FindName: sound name too long (%s)", name);
+       {
+               Con_Printf ("S_FindName: sound name too long (%s)", name);
+               return NULL;
+       }
 
        // Look for this sound in the list of known sfx
        for (sfx = known_sfx; sfx != NULL; sfx = sfx->next)
@@ -566,7 +569,7 @@ int S_StartSound (int entnum, int entchannel, sfx_t *sfx, vec3_t origin, float f
 {
        channel_t *target_chan, *check;
        int             ch_idx;
-       size_t  skip;
+       int             skip;
 
        if (!sound_started || !sfx || nosound.integer)
                return -1;
@@ -600,8 +603,8 @@ int S_StartSound (int entnum, int entchannel, sfx_t *sfx, vec3_t origin, float f
                if (check->sfx == sfx && !check->pos)
                {
                        skip = 0.1 * sfx->format.speed;
-                       if (skip > sfx->total_length)
-                               skip = sfx->total_length;
+                       if (skip > (int)sfx->total_length)
+                               skip = (int)sfx->total_length;
                        if (skip > 0)
                                skip = rand() % skip;
                        target_chan->pos += skip;
@@ -1020,7 +1023,7 @@ void S_SoundList(void)
        {
                if (sfx->fetcher != NULL)
                {
-                       size = sfx->mempool->totalsize;
+                       size = (int)sfx->mempool->totalsize;
                        total += size;
                        Con_Printf ("%c%c%c%c(%2db, %6s) %8i : %s\n",
                                                (sfx->loopstart >= 0) ? 'L' : ' ',