diff options
Diffstat (limited to 'src/engine/client/snd.c')
| -rw-r--r-- | src/engine/client/snd.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/engine/client/snd.c b/src/engine/client/snd.c index 79121584..725bc569 100644 --- a/src/engine/client/snd.c +++ b/src/engine/client/snd.c @@ -334,14 +334,23 @@ int snd_load_wv(const char *filename) int sid = -1; char error[100]; WavpackContext *context; + + /* don't waste memory on sound when we are stress testing */ + if(config.stress) + return -1; + + file = fopen(filename, "rb"); /* TODO: use system.h stuff for this */ + if(!file) + { + dbg_msg("sound/wv", "failed to open %s", filename); + return -1; + } sid = snd_alloc_id(); if(sid < 0) return -1; snd = &samples[sid]; - file = fopen(filename, "rb"); /* TODO: use system.h stuff for this */ - context = WavpackOpenFileInput(read_data, error); if (context) { |