mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
*** empty log message ***
This commit is contained in:
parent
f78419ceed
commit
253a084e7b
@ -32,7 +32,7 @@ class EXPCL_PANDA AudioSound : public ReferenceCount {
|
|||||||
PUBLISHED:
|
PUBLISHED:
|
||||||
virtual ~AudioSound() {}
|
virtual ~AudioSound() {}
|
||||||
|
|
||||||
// For best compatability, set the loop_count, start_time,
|
// For best compatability, set the loop_count,
|
||||||
// volume, and balance, prior to calling play(). You may
|
// volume, and balance, prior to calling play(). You may
|
||||||
// set them while they're playing, but it's implementation
|
// set them while they're playing, but it's implementation
|
||||||
// specific whether you get the results.
|
// specific whether you get the results.
|
||||||
@ -52,7 +52,10 @@ PUBLISHED:
|
|||||||
virtual void set_loop_count(unsigned long loop_count=1) = 0;
|
virtual void set_loop_count(unsigned long loop_count=1) = 0;
|
||||||
virtual unsigned long get_loop_count() const = 0;
|
virtual unsigned long get_loop_count() const = 0;
|
||||||
|
|
||||||
// start_time in seconds: 0 = beginning; length() = end.
|
// Control time position within the sound.
|
||||||
|
// This is similar (in concept) to the seek position within
|
||||||
|
// a file.
|
||||||
|
// time in seconds: 0 = beginning; length() = end.
|
||||||
// inits to 0.0.
|
// inits to 0.0.
|
||||||
// - Unlike the other get_* and set_* calls for a sound, the
|
// - Unlike the other get_* and set_* calls for a sound, the
|
||||||
// current time position will change while the sound is playing.
|
// current time position will change while the sound is playing.
|
||||||
|
@ -167,18 +167,18 @@ get_loop_count() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MilesAudioSound::
|
void MilesAudioSound::
|
||||||
set_time(float start_time) {
|
set_time(float time) {
|
||||||
miles_audio_debug("set_time(start_time="<<start_time<<")");
|
miles_audio_debug("set_time(time="<<time<<")");
|
||||||
S32 milisecond_start_time=S32(1000*start_time);
|
S32 milisecond_time=S32(1000*time);
|
||||||
AIL_quick_set_ms_position(_audio, milisecond_start_time);
|
AIL_quick_set_ms_position(_audio, milisecond_time);
|
||||||
}
|
}
|
||||||
|
|
||||||
float MilesAudioSound::
|
float MilesAudioSound::
|
||||||
get_time() const {
|
get_time() const {
|
||||||
S32 milisecond_start_time=AIL_quick_ms_position(_audio);
|
S32 milisecond_time=AIL_quick_ms_position(_audio);
|
||||||
float start_time=float(milisecond_start_time*.001);
|
float time=float(milisecond_time*.001);
|
||||||
miles_audio_debug("get_time() returning "<<start_time);
|
miles_audio_debug("get_time() returning "<<time);
|
||||||
return start_time;
|
return time;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MilesAudioSound::
|
void MilesAudioSound::
|
||||||
|
@ -31,7 +31,7 @@ class EXPCL_MILES_AUDIO MilesAudioSound : public AudioSound {
|
|||||||
public:
|
public:
|
||||||
~MilesAudioSound();
|
~MilesAudioSound();
|
||||||
|
|
||||||
// For best compatability, set the loop_count, start_time,
|
// For best compatability, set the loop_count,
|
||||||
// volume, and balance, prior to calling play(). You may
|
// volume, and balance, prior to calling play(). You may
|
||||||
// set them while they're playing, but it's implementation
|
// set them while they're playing, but it's implementation
|
||||||
// specific whether you get the results.
|
// specific whether you get the results.
|
||||||
@ -51,7 +51,10 @@ public:
|
|||||||
void set_loop_count(unsigned long loop_count=1);
|
void set_loop_count(unsigned long loop_count=1);
|
||||||
unsigned long get_loop_count() const;
|
unsigned long get_loop_count() const;
|
||||||
|
|
||||||
// start_time in seconds: 0 = beginning; length() = end.
|
// Control time position within the sound.
|
||||||
|
// This is similar (in concept) to the seek position within
|
||||||
|
// a file.
|
||||||
|
// time in seconds: 0 = beginning; length() = end.
|
||||||
// inits to 0.0.
|
// inits to 0.0.
|
||||||
// - Unlike the other get_* and set_* calls for a sound, the
|
// - Unlike the other get_* and set_* calls for a sound, the
|
||||||
// current time position will change while the sound is playing.
|
// current time position will change while the sound is playing.
|
||||||
@ -62,7 +65,7 @@ public:
|
|||||||
// - If a sound is playing, calling get_time() repeatedly will
|
// - If a sound is playing, calling get_time() repeatedly will
|
||||||
// return different results over time. e.g.:
|
// return different results over time. e.g.:
|
||||||
// float percent_complete = s.get_time() / s.length();
|
// float percent_complete = s.get_time() / s.length();
|
||||||
void set_time(float start_time=0.0f);
|
void set_time(float time=0.0f);
|
||||||
float get_time() const;
|
float get_time() const;
|
||||||
|
|
||||||
// 0 = minimum; 1.0 = maximum.
|
// 0 = minimum; 1.0 = maximum.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user