File: objsound.h

package info (click to toggle)
searchandrescue 0.8.2-10
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 4,656 kB
  • ctags: 6,111
  • sloc: ansic: 89,072; cpp: 7,691; sh: 90; makefile: 80
file content (78 lines) | stat: -rw-r--r-- 2,219 bytes parent folder | download | duplicates (6)
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
/*
	Object sound source utilities and updating of object sounds.
 */

#ifndef OBJSOUND_H
#define OBJSOUND_H

#include "sound.h"
#include "obj.h"

/* Object sound source */
extern sar_sound_source_struct *SARSoundSourceNew(
	const char *name,
	const char *filename,
	const char *filename_far,
	float range,			/* In meters */
	float range_far,                /* In meters */
	const sar_position_struct *pos,
	float cutoff,			/* In radians */
	const sar_direction_struct *dir,
	int sample_rate_limit		/* In Hz */
);
extern void SARSoundSourceDelete(sar_sound_source_struct *sndsrc);
extern int SARSoundSourceMatchFromList(
	sar_sound_source_struct **list, int total,
	const char *name
);
extern void SARSoundSourcePlayFromList(
	snd_recorder_struct *recorder,
	sar_sound_source_struct **list, int total,
	const char *name,
	const sar_position_struct *pos,		/* Object position */
	const sar_direction_struct *dir,	/* Object direction */
	const sar_position_struct *ear_pos
);
extern snd_play_struct *SARSoundSourcePlayFromListRepeating(
	snd_recorder_struct *recorder,
	sar_sound_source_struct **list, int total,
	const char *name, int *sndsrc_num
);

/* Sound updating */
extern void SARSoundEngineMute(
	snd_recorder_struct *recorder,
	snd_play_struct *inside_snd_play,
	snd_play_struct *outside_snd_play
);
extern void SARSoundEngineUpdate(
	snd_recorder_struct *recorder,
	sar_sound_source_struct **list, int total,
	snd_play_struct *inside_snd_play,
	int inside_sndsrc_num,
	snd_play_struct *outside_snd_play,
	int outside_sndsrc_num,
	char ear_in_cockpit,
	sar_engine_state engine_state,	/* One of SAR_ENGINE_STATE_* */
	float throttle,			/* Throttle 0.0 to 1.0 */
	float distance_to_camera	/* In meters */
);
extern int SARSoundStallUpdate(
	snd_recorder_struct *recorder,
	sar_sound_source_struct **list, int total,
	void **stall_snd_play,
	int stall_sndsrc_num,
	char ear_in_cockpit,
	sar_flight_model_type flight_model_type,
	char is_landed,
	float speed, float speed_stall
);
extern void SARSoundOverSpeedUpdate(
	snd_recorder_struct *recorder,
	sar_sound_source_struct **list, int total,
	void **overspeed_snd_play,
	int overspeed_sndsrc_num,
	char ear_in_cockpit, char is_overspeed
);

#endif	/* OBJSOUND_H */