Informations sur: SDL_smpplay.h

Publié par Fred le 21/06/2007

Description

Le header d' SDL_smpplay

Code source (langage c)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
/*
SDL Simple Player :
V2.0
 
frederic.meslin@laposte.net
Un lecteur / chargeur de sons
simples pour SDL.
 
Mise à jour : 21/06/07
*/
 
#ifndef __SDLSMPPLAYH
#define __SDLSMPPLAYH
 
//Constantes
 
	#define MAXCANAUX   16
	#define TAILLESAMPLE 1024
 
	typedef enum
	{
		SMPPLAYBrut,
		SMPPLAYPause,
		SMPPLAYLecture
	
	} SMPPLAYETATS;
 
//Sructures
 
	typedef struct
	{
	//Données
		uint8 * Tampon;
		uint8   VolumeInit;
		uint8   Volume;
		uint8   Balance;
		uint32  LongueurInit;
		uint32  Longueur;
		uint32  Position;
 
	//Flags
		bool    Echo;
		bool	Phaser;
		bool    Actif;
	
	//Paramêtres des éffets
		uint16   EchoNB;
		uint16   EchoDec;
		uint16   EchoPos; 
		
		double  PhasVit;
		double  PhasAng;
		double  PhasInt;
			
	} SMPPLAYCANAL;
	
	typedef struct
	{
	//Données
		Uint8 * Tampon;
		Uint32  Longueur;
		SDL_AudioSpec AudioSpec;
	
	//Flags
		bool   Charge;
		void * Precedent;
	
	} SMPPLAYSON;
	
	typedef struct
	{
		SMPPLAYCANAL Canaux[MAXCANAUX];
		SDL_AudioSpec AudioSpec;
		
		SMPPLAYETATS Etat;
		uint CanauxOcc;
 
	} SMPPLAYLECTEUR;
	
//Prototypes
 
//Principaux
 
	bool SMPPlay_InitAudio (uint, uint16);
	void SMPPlay_QuitAudio ();
	
	bool SMPPlay_LireSonC (SMPPLAYSON *, uint);
	bool SMPPlay_LireSonP (SMPPLAYSON *, uint, uint);
	
//Fichiers sonores
 
	SMPPLAYSON * SMPPlay_ChargerWAV (char *);
	void         SMPPlay_Decharger (SMPPLAYSON *);
 
//Effets
 
	void SMPPlay_ActEchoCanal (uint, bool);
	void SMPPlay_EchoCanal (uint, uint8, uint8);
 
	void SMPPlay_ActPhaserCanal (uint, bool);
	void SMPPlay_PhaserCanal (uint, uint8, uint8);
 
	void SMPPlay_VolumeCanal (uint, uint8);
	void SMPPlay_BalanceCanal (uint, uint8);
 
//Routines internes
 
	void _InitCanal (uint);
	void _AudioCallBack(void *, Uint8 *, int);
 
	SMPPLAYSON * _CreerSon();
	void         _ViderSons ();
		
#endif 
 
v6 © Computaid SPRL 2005-2008 - Tous droits réservés - Hébergé par eTigris - Page générée en 0,065 s - Crédits - Stats
1 connecté