Skip to content

Commit

Permalink
It turns out that the nosound mikmod driver works perfectly well for …
Browse files Browse the repository at this point in the history
…our use. :)
  • Loading branch information
slouken committed Aug 21, 2005
1 parent 9701455 commit d2e9d4b
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 94 deletions.
Binary file modified VisualC.zip
Binary file not shown.
1 change: 0 additions & 1 deletion mikmod/Makefile.am
Expand Up @@ -3,7 +3,6 @@ noinst_LTLIBRARIES = libmikmod.la

libmikmod_la_SOURCES = \
drv_nos.c \
drv_sdl.c \
load_it.c \
load_mod.c \
load_s3m.c \
Expand Down
9 changes: 9 additions & 0 deletions mikmod/drv_nos.c
Expand Up @@ -35,6 +35,7 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#define SDL_MIXER_ONLY

#ifdef HAVE_UNISTD_H
#include <unistd.h>
Expand All @@ -44,7 +45,9 @@

#define ZEROLEN 32768

#ifndef SDL_MIXER_ONLY
static SBYTE *zerobuf=NULL;
#endif

static BOOL NS_IsThere(void)
{
Expand All @@ -53,20 +56,26 @@ static BOOL NS_IsThere(void)

static BOOL NS_Init(void)
{
#ifndef SDL_MIXER_ONLY
zerobuf=(SBYTE*)_mm_malloc(ZEROLEN);
#endif
return VC_Init();
}

static void NS_Exit(void)
{
VC_Exit();
#ifndef SDL_MIXER_ONLY
_mm_free(zerobuf);
#endif
}

static void NS_Update(void)
{
#ifndef SDL_MIXER_ONLY
if (zerobuf)
VC_WriteBytes(zerobuf,ZEROLEN);
#endif
}

MIKMODAPI MDRIVER drv_nos={
Expand Down
79 changes: 0 additions & 79 deletions mikmod/drv_sdl.c

This file was deleted.

3 changes: 0 additions & 3 deletions mikmod/mdreg.c
Expand Up @@ -32,11 +32,8 @@

#include "mikmod_internals.h"

MIKMODAPI extern struct MDRIVER drv_sdl; /* Simple Direct Media */

void _mm_registeralldrivers(void)
{
_mm_registerdriver(&drv_sdl);
_mm_registerdriver(&drv_nos);
}

Expand Down
2 changes: 0 additions & 2 deletions mikmod/mikmod.h
Expand Up @@ -650,8 +650,6 @@ MIKMODAPI extern struct MDRIVER drv_raw; /* raw file disk writer [music.raw]
MIKMODAPI extern struct MDRIVER drv_stdout; /* output to stdout */
MIKMODAPI extern struct MDRIVER drv_wav; /* RIFF WAVE file disk writer [music.wav] */

MIKMODAPI extern struct MDRIVER drv_sdl; /* SDL_mixer driver */

MIKMODAPI extern struct MDRIVER drv_ultra; /* Linux Ultrasound driver */

MIKMODAPI extern struct MDRIVER drv_AF; /* Dec Alpha AudioFile */
Expand Down
17 changes: 8 additions & 9 deletions music.c
Expand Up @@ -380,23 +380,22 @@ int open_music(SDL_AudioSpec *mixer)
}
md_mode |= DMODE_STEREO;
}
md_mixfreq = mixer->freq;
md_device = 0;
md_volume = 96;
md_mixfreq = mixer->freq;
md_device = 0;
md_volume = 96;
md_musicvolume = 128;
md_sndfxvolume = 128;
md_pansep = 128;
md_reverb = 0;
#ifdef LIBMIKMOD_MUSIC
md_mode |= DMODE_HQMIXER|DMODE_SOFT_MUSIC|DMODE_SURROUND;
#endif
md_pansep = 128;
md_reverb = 0;
md_mode |= DMODE_HQMIXER|DMODE_SOFT_MUSIC|DMODE_SURROUND;
#ifdef LIBMIKMOD_MUSIC
list = MikMod_InfoDriver();
if ( list )
free(list);
else
#endif
#else
MikMod_RegisterDriver(&drv_nos);
#endif
#ifdef LIBMIKMOD_MUSIC
list = MikMod_InfoLoader();
if ( list )
Expand Down

0 comments on commit d2e9d4b

Please sign in to comment.