152 lines
3.9 KiB
C
152 lines
3.9 KiB
C
#ifndef _SNDEVENT_H_
|
|
#define _SNDEVENT_H_
|
|
|
|
/*-------------------------------------------------------------------------*/
|
|
/*definitions specifiques à la target*/
|
|
|
|
#ifdef SND_SCRIPT_VERSION /*Mode Script pur*/
|
|
#if defined(SNDLST2_StaticIsOptimised) || defined(LST2_StaticIsOptimised)
|
|
#error Macros not coherent
|
|
#endif
|
|
#endif
|
|
|
|
#ifdef SND_HYBRID_VERSION /*Mode Hybride*/
|
|
#define LST2_StaticIsOptimised
|
|
#define SNDLST2_StaticIsOptimised
|
|
#endif
|
|
|
|
#ifdef SND_BINARY_VERSION /*Mode Binaire pur*/
|
|
#define LST2_StaticIsOptimised
|
|
#define SNDLST2_StaticIsOptimised
|
|
#endif
|
|
|
|
#if ((!defined(SND_SCRIPT_VERSION))&&((!defined(SND_HYBRID_VERSION))&&(!defined(SND_BINARY_VERSION))))
|
|
#error neither SCRIPT,HYBRID, or BINARY defined
|
|
#endif
|
|
|
|
|
|
#include "sndlst2.h"
|
|
|
|
#include "sndhard.h"
|
|
|
|
|
|
#ifdef M_SET_ALIGNMENT
|
|
#pragma pack(push)
|
|
#pragma pack(M_SET_ALIGNMENT)
|
|
#endif
|
|
|
|
typedef enum {
|
|
EVT_INVALID,
|
|
EVT_SON_PLAY ,
|
|
EVT_SON_STOP ,
|
|
EVT_SON_STOP_ALL ,
|
|
EVT_SON_STOP_N_GO,
|
|
EVT_SON_STOP_N_GO_CROSSFADE ,
|
|
EVT_SON_PITCH ,
|
|
EVT_SON_VOLUME ,
|
|
EVT_SON_PAN ,
|
|
EVT_SON_EFFET,
|
|
EVT_SON_EXTRA,
|
|
EVT_SON_CHANGE_VOLUME,
|
|
FOR_ALIGNEMENT=SND_ENUM_ALIGNEMENT
|
|
} tdeTypeEvent ;
|
|
|
|
#define NB_TYPES_EVT 12
|
|
|
|
/*parametre de DeTuning*/
|
|
typedef struct {
|
|
SndReal rDelta;
|
|
} tdstDeTune;
|
|
/*valeur pour laquelle il n'y a pas de tuning*/
|
|
#define NO_DETUNING C_SNDREAL_0
|
|
|
|
/*parametres de l'evt de type¨Play*/
|
|
typedef struct {
|
|
tduRefRes uResource; /*ressource associee*/
|
|
tdstDeTune stDeTune;
|
|
} tdstEvtPlay;
|
|
|
|
/*parametres de l'evt de type Stop*/
|
|
typedef struct {
|
|
SND_tduRefEvt uEvt; /*evt à stopper*/
|
|
} tdstEvtStop;
|
|
|
|
/*parametres de l'evt de type Stop'N'Go*/
|
|
typedef struct {
|
|
SND_tduRefEvt uEvtStop; /*evt à stopper*/
|
|
SND_tduRefEvt uEvtGo; /*evt à lancer*/
|
|
} tdstEvtStopNGo;
|
|
|
|
/*parametres de l'evt de type Stop'N'Go avec Crossfade*/
|
|
typedef struct {
|
|
SND_tduRefEvt uEvtStop; /*evt à stopper*/
|
|
SND_tduRefEvt uEvtGo; /*evt à lancer*/
|
|
int iTime; /*duree du fade*/
|
|
} tdstEvtStopNGoFade;
|
|
|
|
/*parametres de l'evt de type ExtraParam(pitch,vol ou pan)*/
|
|
typedef struct {
|
|
tduRefRes uResource; /*ressource associee*/
|
|
SndReal CoefA; /*coef a dans s=a*e+b*/
|
|
SndReal CoefB; /*coef b dans s=a*e+b*/
|
|
tdstDeTune stDeTune;
|
|
} tdstEvtExtraParam;
|
|
|
|
/*parametres de l'evt de type ExtraALL(pitch,vol et pan)*/
|
|
typedef struct {
|
|
tduRefRes uResource; /*ressource associee*/
|
|
SndRealTwin rtCoefPitch; /*coef a et b pour Pitch*/
|
|
SndRealTwin rtCoefVol; /*coef a et b pour Volume*/
|
|
SndRealTwin rtCoefPan; /*coef a et b pour Pan*/
|
|
} tdstEvtExtraAll;
|
|
|
|
/*parametres de l'evt de type effet*/
|
|
typedef struct {
|
|
int iIdEffect; /*id de l'effet*/
|
|
} tdstEvtEffect;
|
|
|
|
/*parameters for event "Change Volume"*/
|
|
typedef struct {
|
|
SndBool bConcernWithObjectType;/*if TRUE, all object from the same type are concerned;if FALSE, only one object is concerned*/
|
|
long lNewVolume;
|
|
} tdstEvtchangeVolume;
|
|
|
|
/*union des parametres des differents types d'evt*/
|
|
typedef union {
|
|
tdstEvtPlay stPlay;
|
|
tdstEvtStop stStop;
|
|
tdstEvtStopNGo stStopNGo;
|
|
tdstEvtStopNGoFade stStopNGoFade;
|
|
tdstEvtExtraParam stExtraParam;
|
|
tdstEvtExtraAll stExtraAll;
|
|
tdstEvtEffect stEffect;
|
|
tdstEvtchangeVolume stChangeVolume;
|
|
} tduEvtParams;
|
|
|
|
/*description d'un evt*/
|
|
struct _SND_tdstBlockEvent {
|
|
tdxId Id; /*id de l'evt*/
|
|
tdeTypeEvent eType; /*type*/
|
|
tduEvtParams uParams; /*parametres propres au type de l'evt*/
|
|
SndBool_field_decl(bStopable); /*TRUE si evt stopable à la mort de l'objet*/
|
|
SndBool_field_decl(bDynamic); /*TRUE si Synchrosonore modifie les param de l'objet en temps reel*/
|
|
/*M_LstChildDeclaration(SND_tdstBlockEvent,tdstSndPolyEvent); //inclusion dans la liste ACP*/
|
|
SNDLST2_M_StaticChildDeclaration(SND_tdstBlockEvent*,tdstSndPolyEvent*) /*inclusion dans la liste ACP*/
|
|
};
|
|
|
|
|
|
/*liste des evts*/
|
|
struct _tdstSndPolyEvent {
|
|
/* M_LstParentDeclaration(SND_tdstBlockEvent);*/
|
|
SNDLST2_M_StaticParentDeclaration(SND_tdstBlockEvent*)
|
|
};
|
|
|
|
|
|
#ifdef M_SET_ALIGNMENT
|
|
#pragma pack(pop)
|
|
#endif
|
|
|
|
|
|
#endif /*_SNDEVENT_H_*/
|
|
|