95 lines
3.5 KiB
C
95 lines
3.5 KiB
C
/**********************************************************************************************************************************************************
|
|
* MikMod sound library
|
|
* (c) 1998, 1999 Miodrag Vallat and others - see file AUTHORS for
|
|
* complete list.
|
|
*
|
|
* This library is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU Library General Public License as
|
|
* published by the Free Software Foundation; either version 2 of
|
|
* the License, or (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU Library General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Library General Public
|
|
* License along with this library; if not, write to the Free Software
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|
* 02111-1307, USA.
|
|
*
|
|
* Windows DirectSound-Raw Driver
|
|
* (Wrapper for use as a static library or DLL)
|
|
*
|
|
***********************************************************************************************************************************************************
|
|
*
|
|
* Last Revision : Rev 1.2 23/08/2001
|
|
*
|
|
* Rev 1.2 23/08/2001
|
|
* Modified DirectSound buffer management from double buffering to a 50Hz playing system.
|
|
* This change prevent some rastertime overheads during the MikMod_update()..
|
|
* Replay calls are now much more stable in this way! :)
|
|
* Ozzy <ozzy@orkysquad.org> -> http://www.orkysquad.org
|
|
*
|
|
* Rev 1.1 15/02/1999
|
|
* Original code design and first & nice DirectSound Double-buffered implementation.
|
|
* Jörg Mensmann <joerg.mensmann@gmx.net>
|
|
*
|
|
*
|
|
**TABULATION 4*******RESOLUTION : 1280*1024 ***************************************************************************************************************/
|
|
#ifndef _MIKWIN_H_
|
|
#define _MIKWIN_H_
|
|
|
|
|
|
#ifdef WIN32
|
|
|
|
#define DEFAULT_MIXFREQ 22500
|
|
|
|
/* functions for exporting variables through a DLL */
|
|
extern void set_MikMod_errno(int errno);
|
|
extern int get_MikMod_errno(void);
|
|
extern void set_md_volume(unsigned char vol);
|
|
extern unsigned char get_md_volume(void);
|
|
extern void set_md_musicvolume(unsigned char vol);
|
|
extern unsigned char get_md_musicvolume(void);
|
|
extern void set_md_sndfxvolume(unsigned char vol);
|
|
extern unsigned char get_md_sndfxvolume(void);
|
|
extern void set_md_reverb(unsigned char rev);
|
|
extern unsigned char get_md_reverb(void);
|
|
extern void set_md_pansep(unsigned char pan);
|
|
extern unsigned char get_md_pansep(void);
|
|
extern void set_md_device(unsigned short dev);
|
|
extern unsigned short get_md_device(void);
|
|
extern void set_md_mixfreq(unsigned short freq);
|
|
extern unsigned short get_md_mixfreq(void);
|
|
extern void set_md_mode(unsigned short mode);
|
|
extern unsigned short get_md_mode(void);
|
|
extern MDRIVER get_drv_nos(void);
|
|
extern MDRIVER get_drv_ds_raw(void);
|
|
|
|
#include <windows.h>
|
|
#include <mmsystem.h>
|
|
#include <dsound.h>
|
|
extern void set_ds(LPDIRECTSOUND ds);
|
|
extern void set_dsbprimary(LPDIRECTSOUNDBUFFER b);
|
|
extern void set_ds_hwnd(HWND wnd);
|
|
extern void set_ds_buffersize(int size);
|
|
extern LPDIRECTSOUNDBUFFER get_ds_dsbstream(void);
|
|
|
|
int MikWin_Init(unsigned short mixfreq, int stereo, int bits16, int interpolation,
|
|
HWND wnd, int buffersize);
|
|
void MikWin_Free();
|
|
|
|
#ifdef _DEBUG
|
|
extern DWORD DSgetReplayPos(void);
|
|
extern DWORD DSgetPlayPos(void);
|
|
#endif
|
|
|
|
#endif /* WIN32 */
|
|
|
|
|
|
|
|
|
|
#endif /* _MIKWIN_H */
|
|
|