gzdoom/src/oplsynth/opl_mus_player.h
Randy Heit 2b721975dd VERY IMPORTANT NOTE FOR ANYBODY BUILDING FROM THE TRUNK: This commit adds support
for FMOD Ex while at the same time removing support for FMOD 3. Be sure to update
your SDKs. GCC users, be sure to do a "make cleandep && make clean" before
building, or you will likely get inexplicable errors.

- Fixed: If you wanted to make cleandep with MinGW, you had to specifically
  specify Makefile.mingw as the makefile to use.
- Added a normalizer to the OPL synth. It helped bring up the volume a little,
  but not nearly as much as I would have liked.
- Removed MIDI Mapper references. It doesn't work with the stream API, and
  it doesn't really exist on NT kernels, either.
- Reworked music volume: Except for MIDI, all music volume is controlled
  through GSnd and not at the individual song level.
- Removed the mididevice global variable.
- Removed snd_midivolume. Now that all music uses a linear volume scale,
  there's no need for two separate music volume controls.
- Increased snd_samplerate default up to 48000.
- Added snd_format, defaulting to "PCM-16".
- Added snd_speakermode, defaulting to "Auto".
- Replaced snd_fpu with snd_resampler, defaulting to "Linear".
- Bumped the snd_channels default up from a pitiful 12 to 32.
- Changed snd_3d default to true. The new cvar snd_hw3d determines if
  hardware 3D support is used and default to false.
- Removed the libFLAC source, since FMOD Ex has native FLAC support.
- Removed the altsound code, since it was terribly gimped in comparison to
  the FMOD code. It's original purpose was to have been as a springboard for
  writing a non-FMOD sound system for Unix-y systems, but that never
  happened.
- Finished preliminary FMOD Ex support.


SVN r789 (trunk)
2008-03-09 03:13:49 +00:00

42 lines
796 B
C++

#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#define USE_WINDOWS_DWORD
#else
#include <SDL.h>
#endif
#include "muslib.h"
#include "files.h"
class OPLmusicBlock : public musicBlock
{
public:
OPLmusicBlock (FILE *file, char * musiccache, int len, int rate, int maxSamples);
~OPLmusicBlock ();
bool IsValid () const;
bool ServiceStream (void *buff, int numbytes);
void Restart ();
void SetLooping (bool loop);
void ResetChips ();
int PlayTick ();
protected:
int SampleRate;
int NextTickIn;
int SamplesPerTick;
bool TwoChips;
bool Looping;
enum { NotRaw, RDosPlay, IMF } RawPlayer;
int ScoreLen;
int *SampleBuff;
int SampleBuffSize;
#ifdef _WIN32
CRITICAL_SECTION ChipAccess;
#else
SDL_mutex *ChipAccess;
#endif
};