15 #ifndef MILESAUDIOSAMPLE_H 16 #define MILESAUDIOSAMPLE_H 19 #ifdef HAVE_RAD_MSS //[ 30 class EXPCL_MILES_AUDIO MilesAudioSample :
public MilesAudioSound {
32 MilesAudioSample(MilesAudioManager *manager,
33 MilesAudioManager::SoundData *sd,
34 const std::string &file_name);
37 virtual ~MilesAudioSample();
42 virtual PN_stdfloat get_time()
const;
44 virtual void set_volume(PN_stdfloat volume=1.0f);
45 virtual void set_balance(PN_stdfloat balance_right=0.0f);
46 virtual void set_play_rate(PN_stdfloat play_rate=1.0f);
48 virtual PN_stdfloat length()
const;
50 virtual AudioSound::SoundStatus status()
const;
52 virtual void cleanup();
53 virtual void output(std::ostream &out)
const;
58 void set_3d_attributes(PN_stdfloat px, PN_stdfloat py, PN_stdfloat pz, PN_stdfloat vx, PN_stdfloat vy, PN_stdfloat vz);
59 void get_3d_attributes(PN_stdfloat *px, PN_stdfloat *py, PN_stdfloat *pz, PN_stdfloat *vx, PN_stdfloat *vy, PN_stdfloat *vz);
60 void set_3d_min_distance(PN_stdfloat dist);
61 PN_stdfloat get_3d_min_distance()
const;
62 void set_3d_max_distance(PN_stdfloat dist);
63 PN_stdfloat get_3d_max_distance()
const;
65 virtual PN_stdfloat get_speaker_level(
int index);
66 virtual void set_speaker_levels(PN_stdfloat level1, PN_stdfloat level2=-1.0f, PN_stdfloat level3=-1.0f, PN_stdfloat level4=-1.0f, PN_stdfloat level5=-1.0f, PN_stdfloat level6=-1.0f, PN_stdfloat level7=-1.0f, PN_stdfloat level8=-1.0f, PN_stdfloat level9=-1.0f);
70 static void AILCALLBACK finish_callback(HSAMPLE sample);
71 void do_set_time(PN_stdfloat time);
73 PT(MilesAudioManager::SoundData) _sd;
76 S32 _original_playback_rate;
82 static void init_type() {
83 MilesAudioSound::init_type();
85 MilesAudioSound::get_class_type());
88 return get_class_type();
90 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
95 friend class GlobalMilesManager;
96 friend class MilesAudioManager;
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
TypeHandle is the identifier used to differentiate C++ class types.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.