mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-09 01:01:07 +00:00
snd_mikmod.c: compile-time sanity checks for libmikmod version.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@883 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
0fb8a46647
commit
380099484f
1 changed files with 10 additions and 2 deletions
|
@ -1,6 +1,5 @@
|
|||
/*
|
||||
* tracker music (module file) decoding support using libmikmod
|
||||
*
|
||||
* Copyright (C) 2013 O.Sezer <sezero@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
@ -27,6 +26,15 @@
|
|||
#include "snd_mikmod.h"
|
||||
#include <mikmod.h>
|
||||
|
||||
#if ((LIBMIKMOD_VERSION+0) < 0x030105)
|
||||
#error libmikmod version is way too old and unusable.
|
||||
#endif
|
||||
#if (LIBMIKMOD_VERSION < 0x030107) /* ancient libmikmod */
|
||||
#define S_MIKMOD_initlib(c) MikMod_Init()
|
||||
#else
|
||||
#define S_MIKMOD_initlib(c) MikMod_Init(c)
|
||||
#endif
|
||||
|
||||
#ifndef DMODE_NOISEREDUCTION
|
||||
#define DMODE_NOISEREDUCTION 0x1000 /* Low pass filtering */
|
||||
#endif
|
||||
|
@ -97,7 +105,7 @@ static qboolean S_MIKMOD_CodecInitialize (void)
|
|||
|
||||
MikMod_RegisterDriver(&drv_nos); /* only need the "nosound" driver, none else */
|
||||
MikMod_RegisterAllLoaders();
|
||||
if (MikMod_Init(NULL))
|
||||
if (S_MIKMOD_initlib(NULL))
|
||||
{
|
||||
Con_DPrintf("Could not initialize MikMod: %s\n", MikMod_strerror(MikMod_errno));
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue