You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
2.2 KiB
C

//
// G A M E.O.N.E - LOW LEVEL LIB V1.0
// Copyright (C) 2001 LEVEL ONE ENTERTAINMENT,
// Licensed under the terms of LGPL.
//:---------------------------------------------------------------------------
//:Description
//
// LOW LEVEL SOUND DRIVER INCLUDE FILE
//
#ifndef _LLSOUND_H
#define _LLSOUND_H
#include "lib_base.h"
#define LLSOUND_STOP (0)
#define LLSOUND_ONESHOT (0)
#define LLSOUND_LOOP (0x1)
#define LLSOUND_STREAM (0x2)
#include "llsound_mixer.h"
typedef int llsound_id;
llsound_id llsound_LoadSnd ( const char * szFile, int mode=0); // ladet einen sound, return code >0=OK;
llsound_id llsound_CloneSnd ( llsound_id id); // ladet einen sound, return code >0=OK;
void llsound_ReleaseSnd( llsound_id snd_num); // gibt speicherplatz frei
int llsound_ReleaseSnd( const char * filename ); // release snd nach namen, ALL = gibt alle frei
int llsound_Play ( llsound_id snd_num, int mode=LLSOUND_ONESHOT); // spielt einen sound einmalig ab, oder mode=LOOP
int llsound_IsPlayed ( llsound_id snd_num); // sound fertig abgespielt? 0==ja, -1=Fehler >0=nein
void llsound_Stop ( llsound_id snd_num); // stopt ausgabe eines sounds
void llsound_SetVolume(llsound_id sndnum,float vol); // 0-1.0f, 0=unhörbar, 1.0f = voll
void llsound_SetVolume ( llsound_id sndnum, long db); // 0 = ohne abschwaechung, -10000 unhoerbar
void llsound_SetPan ( llsound_id sndnum, long pan); // -4000=links 0=mitte +4000=rechts
void llsound_SetPan ( llsound_id sndnum, float pan); // -1=links 0=mitte +1=rechts
void llsound_SetFrequency ( llsound_id sndnum, long Hz); // 100Hz bis 100000 Hz, 0Hz=original Hz
float llsound_GetSndPlaytime ( llsound_id snd_num);
float llsound_GetSndLength ( llsound_id snd_num);
int llsound_Resume ( llsound_id snd_num, int mode, float sec);
int llsound_PlayMIDI ( const char *filename, int mode=LLSOUND_ONESHOT);
int llsound_StopMIDI ();
int llsound_PlayCD ( int from, int to);
int llsound_StopCD ();
void llsound_Update (); // Update für Streamsound und Fadeeffekte
void llsound_Quiet (); // Stoppt alle Sounds
const char* llsound_GetName ( llsound_id snd_num);
int llsound_Init( void * window); // window darf 0 sein
void llsound_Exit();
#endif