PLIB-specific torcs sound.
More...
#include <TorcsSound.h>
|
| slSample * | sample |
| | sample data
|
| slEnvelope * | volume_env |
| | volume envelope
|
| slEnvelope * | pitch_env |
| | pitch envelope
|
| slEnvelope * | lowpass_env |
| | low pass filter envelope
|
| slScheduler * | sched |
| | plib sl scheduler (see sl.h)
|
| bool | playing |
| | Sound is playing.
|
| bool | paused |
| | sound is paused
|
| class SoundInterface * | iface |
| | Handler to the interface.
|
| int | flags |
| | Flags relating to what effects are to be used.
|
| float | MAX_VOL |
| | Maximum volume.
|
| float | volume |
| | Current volume.
|
| float | pitch |
| | Current pitch.
|
| float | lowpass |
| | Current low pass filter.
|
| bool | loop |
| | Whether it's a looping sound.
|
PLIB-specific torcs sound.
Definition at line 94 of file TorcsSound.h.
◆ PlibTorcsSound()
| PlibTorcsSound::PlibTorcsSound |
( |
slScheduler * | sched, |
|
|
const char * | filename, |
|
|
int | flags = (ACTIVE_VOLUME|ACTIVE_PITCH), |
|
|
bool | loop = false ) |
Create a new PLib sound.
It requires a scheduler to be set up and a filename to read data from.
Definition at line 42 of file TorcsSound.cpp.
◆ ~PlibTorcsSound()
| PlibTorcsSound::~PlibTorcsSound |
( |
| ) |
|
|
virtual |
◆ isPaused()
| virtual bool PlibTorcsSound::isPaused |
( |
| ) |
|
|
inlinevirtual |
◆ isPlaying()
| virtual bool PlibTorcsSound::isPlaying |
( |
| ) |
|
|
inlinevirtual |
◆ pause()
| void PlibTorcsSound::pause |
( |
| ) |
|
|
virtual |
◆ play()
| void PlibTorcsSound::play |
( |
| ) |
|
|
virtual |
◆ resume()
| void PlibTorcsSound::resume |
( |
| ) |
|
|
virtual |
◆ setVolume()
| void PlibTorcsSound::setVolume |
( |
float | vol | ) |
|
|
virtual |
Set the volume.
Since plib does not support envelopes for one-shot samples, we pre-adjust their volume
Reimplemented from TorcsSound.
Definition at line 117 of file TorcsSound.cpp.
◆ start()
| void PlibTorcsSound::start |
( |
| ) |
|
|
virtual |
◆ stop()
| void PlibTorcsSound::stop |
( |
| ) |
|
|
virtual |
◆ update()
| void PlibTorcsSound::update |
( |
| ) |
|
|
virtual |
Update the plib sounds.
This should be called as often as possible from the main sound code, probably by looping through all the sounds used.
Implements TorcsSound.
Definition at line 174 of file TorcsSound.cpp.
◆ lowpass_env
| slEnvelope* PlibTorcsSound::lowpass_env |
|
protected |
◆ paused
| bool PlibTorcsSound::paused |
|
protected |
◆ pitch_env
| slEnvelope* PlibTorcsSound::pitch_env |
|
protected |
◆ playing
| bool PlibTorcsSound::playing |
|
protected |
◆ sample
| slSample* PlibTorcsSound::sample |
|
protected |
◆ sched
| slScheduler* PlibTorcsSound::sched |
|
protected |
◆ volume_env
| slEnvelope* PlibTorcsSound::volume_env |
|
protected |
The documentation for this class was generated from the following files:
- C:/Users/berni/Development/torcs_git/torcs-code/torcs/torcs/src/modules/graphic/ssggraph/TorcsSound.h
- C:/Users/berni/Development/torcs_git/torcs-code/torcs/torcs/src/modules/graphic/ssggraph/TorcsSound.cpp