#include "snd_main.h"
#include "snd_ogg.h"
#include "snd_wav.h"
-#include "snd_modplug.h"
-
-unsigned char resampling_buffer [48000 * 2 * 2];
/*
size_t newsampleframes, memsize;
snd_buffer_t* sb;
- newsampleframes = (size_t) ((double)sampleframes * (double)sb_speed / (double)in_format->speed);
+ newsampleframes = (size_t) ceil((double)sampleframes * (double)sb_speed / (double)in_format->speed);
memsize = newsampleframes * in_format->channels * in_format->width;
memsize += sizeof (*sb) - sizeof (sb->samples);
sb->format.channels = in_format->channels;
sb->format.width = in_format->width;
sb->format.speed = sb_speed;
- sb->maxframes = newsampleframes;
+ sb->maxframes = (unsigned int)newsampleframes;
sb->nbframes = 0;
if (!Snd_AppendToSndBuffer (sb, samples, sampleframes, in_format))
}
}
- sb->nbframes += outcount;
+ sb->nbframes += (unsigned int)outcount;
return true;
}
if (OGG_LoadVorbisFile (namebuffer, sfx))
goto loaded;
}
- else
- {
- if (ModPlug_LoadModPlugFile (namebuffer, sfx))
- goto loaded;
- }
}
// LordHavoc: then try without the added sound/ as wav and ogg
if (OGG_LoadVorbisFile (namebuffer, sfx))
goto loaded;
}
- else
- {
- if (ModPlug_LoadModPlugFile (namebuffer, sfx))
- goto loaded;
- }
// Can't load the sound!
sfx->flags |= SFXFLAG_FILEMISSING;