mirror of
https://github.com/overte-org/overte.git
synced 2025-04-15 00:10:00 +02:00
add constants for volume byte values
This commit is contained in:
parent
f6cc40362c
commit
a37b451993
3 changed files with 9 additions and 4 deletions
|
@ -35,6 +35,7 @@ const int HAND_TIMER_SLEEP_ITERATIONS = 50;
|
||||||
const float EVE_PELVIS_HEIGHT = 0.565925f;
|
const float EVE_PELVIS_HEIGHT = 0.565925f;
|
||||||
|
|
||||||
const float AUDIO_INJECT_PROXIMITY = 0.4f;
|
const float AUDIO_INJECT_PROXIMITY = 0.4f;
|
||||||
|
const int EVE_VOLUME_BYTE = 190;
|
||||||
|
|
||||||
bool stopReceiveAgentDataThread;
|
bool stopReceiveAgentDataThread;
|
||||||
|
|
||||||
|
@ -116,7 +117,7 @@ int main(int argc, const char* argv[]) {
|
||||||
AudioInjector eveAudioInjector("/etc/highfidelity/eve/resources/eve.raw");
|
AudioInjector eveAudioInjector("/etc/highfidelity/eve/resources/eve.raw");
|
||||||
|
|
||||||
// lower Eve's volume by setting the attentuation modifier (this is a value out of 255)
|
// lower Eve's volume by setting the attentuation modifier (this is a value out of 255)
|
||||||
eveAudioInjector.setVolume(190);
|
eveAudioInjector.setVolume(EVE_VOLUME_BYTE);
|
||||||
|
|
||||||
// set the position of the audio injector
|
// set the position of the audio injector
|
||||||
eveAudioInjector.setPosition(eve.getPosition());
|
eveAudioInjector.setPosition(eve.getPosition());
|
||||||
|
|
|
@ -23,6 +23,8 @@
|
||||||
char EC2_WEST_AUDIO_SERVER[] = "54.241.92.53";
|
char EC2_WEST_AUDIO_SERVER[] = "54.241.92.53";
|
||||||
const int AUDIO_UDP_LISTEN_PORT = 55443;
|
const int AUDIO_UDP_LISTEN_PORT = 55443;
|
||||||
|
|
||||||
|
const int DEFAULT_INJECTOR_VOLUME = 0xFF;
|
||||||
|
|
||||||
// Command line parameter defaults
|
// Command line parameter defaults
|
||||||
bool loopAudio = true;
|
bool loopAudio = true;
|
||||||
float sleepIntervalMin = 1.00;
|
float sleepIntervalMin = 1.00;
|
||||||
|
@ -30,7 +32,7 @@ float sleepIntervalMax = 2.00;
|
||||||
char *sourceAudioFile = NULL;
|
char *sourceAudioFile = NULL;
|
||||||
const char *allowedParameters = ":rb::t::c::a::f:";
|
const char *allowedParameters = ":rb::t::c::a::f:";
|
||||||
float floatArguments[4] = {0.0f, 0.0f, 0.0f, 0.0f};
|
float floatArguments[4] = {0.0f, 0.0f, 0.0f, 0.0f};
|
||||||
unsigned char volume = 255;
|
unsigned char volume = DEFAULT_INJECTOR_VOLUME;
|
||||||
|
|
||||||
void usage(void)
|
void usage(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -15,10 +15,12 @@
|
||||||
|
|
||||||
#include "AudioInjector.h"
|
#include "AudioInjector.h"
|
||||||
|
|
||||||
|
const int MAX_INJECTOR_VOLUME = 255;
|
||||||
|
|
||||||
AudioInjector::AudioInjector(const char* filename) :
|
AudioInjector::AudioInjector(const char* filename) :
|
||||||
_position(),
|
_position(),
|
||||||
_bearing(0),
|
_bearing(0),
|
||||||
_volume(0xFF),
|
_volume(MAX_INJECTOR_VOLUME),
|
||||||
_indexOfNextSlot(0),
|
_indexOfNextSlot(0),
|
||||||
_isInjectingAudio(false)
|
_isInjectingAudio(false)
|
||||||
{
|
{
|
||||||
|
@ -45,7 +47,7 @@ AudioInjector::AudioInjector(int maxNumSamples) :
|
||||||
_numTotalSamples(maxNumSamples),
|
_numTotalSamples(maxNumSamples),
|
||||||
_position(),
|
_position(),
|
||||||
_bearing(0),
|
_bearing(0),
|
||||||
_volume(0xFF),
|
_volume(MAX_INJECTOR_VOLUME),
|
||||||
_indexOfNextSlot(0),
|
_indexOfNextSlot(0),
|
||||||
_isInjectingAudio(false)
|
_isInjectingAudio(false)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue