about summary refs log tree commit diff
path: root/src/engine/e_if_snd.h
blob: 48376badffed6e242065b9babe0f6a4585d20ba2 (plain)
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
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#ifndef ENGINE_IF_SND_H
#define ENGINE_IF_SND_H

/*
	Section: Sound
*/

/*
	Function: snd_set_channel
		Sets the parameters for a sound channel.
	
	Arguments:
		cid - Channel ID
		vol - Volume for the channel. 0.0 to 1.0.
		pan - Panning for the channel. -1.0 is all left. 0.0 is equal distribution. 1.0 is all right.
*/
void snd_set_channel(int cid, float vol, float pan);

/*
	Function: snd_load_wv
		Loads a wavpack compressed sound.
	
	Arguments:
		filename - Filename of the file to load
	
	Returns:
		The id of the loaded sound. -1 on failure.
*/
int snd_load_wv(const char *filename);

/*
	Function: snd_play_at
		Plays a sound at a specified postition.
	
	Arguments:
		cid - Channel id of the channel to use.
		sid - Sound id of the sound to play.
		flags - TODO
		x - TODO
		y - TODO
	
	Returns:
		An id to the voice. -1 on failure.

	See Also:
		<snd_play, snd_stop>
*/
int snd_play_at(int cid, int sid, int flags, float x, float y);

/*
	Function: snd_play
		Plays a sound.
	
	Arguments:
	Arguments:
		cid - Channel id of the channel to use.
		sid - Sound id of the sound to play.
		flags - TODO
	
	Returns:
		An id to the voice. -1 on failure.

	See Also:
		<snd_play_at, snd_stop>
*/
int snd_play(int cid, int sid, int flags);

/*
	Function: snd_stop
		Stops a currenly playing sound.
	
	Arguments:
		id - The ID of the voice to stop.
	
	See Also:
		<snd_play, snd_play_at>
*/
void snd_stop(int id);

/*
	Function: snd_set_listener_pos
		Sets the listener posititon.
	
	Arguments:
		x - TODO
		y - TODO
*/
void snd_set_listener_pos(float x, float y);

#endif