diff options
author | Jacek Antonelli | 2008-08-15 23:45:50 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:50 -0500 |
commit | 2a4dea528f670b9bb1f77ef27a8a1dd16603d114 (patch) | |
tree | 95c68e362703c9099d571ecbdc6142b1cda1e005 /linden/indra/llaudio/audioengine.cpp | |
parent | Second Life viewer sources 1.20.6 (diff) | |
download | meta-impy-2a4dea528f670b9bb1f77ef27a8a1dd16603d114.zip meta-impy-2a4dea528f670b9bb1f77ef27a8a1dd16603d114.tar.gz meta-impy-2a4dea528f670b9bb1f77ef27a8a1dd16603d114.tar.bz2 meta-impy-2a4dea528f670b9bb1f77ef27a8a1dd16603d114.tar.xz |
Second Life viewer sources 1.20.7
Diffstat (limited to 'linden/indra/llaudio/audioengine.cpp')
-rw-r--r-- | linden/indra/llaudio/audioengine.cpp | 41 |
1 files changed, 27 insertions, 14 deletions
diff --git a/linden/indra/llaudio/audioengine.cpp b/linden/indra/llaudio/audioengine.cpp index 3e1fdf8..021c940 100644 --- a/linden/indra/llaudio/audioengine.cpp +++ b/linden/indra/llaudio/audioengine.cpp | |||
@@ -60,6 +60,7 @@ const F32 MAX_CURRENT_TRANSFER_TIME = 60.f; | |||
60 | 60 | ||
61 | LLAudioEngine::LLAudioEngine() | 61 | LLAudioEngine::LLAudioEngine() |
62 | { | 62 | { |
63 | setDefaults(); | ||
63 | } | 64 | } |
64 | 65 | ||
65 | 66 | ||
@@ -68,30 +69,42 @@ LLAudioEngine::~LLAudioEngine() | |||
68 | } | 69 | } |
69 | 70 | ||
70 | 71 | ||
71 | BOOL LLAudioEngine::init(const S32 num_channels, void* userdata) | 72 | void LLAudioEngine::setDefaults() |
72 | { | 73 | { |
73 | mMuted = FALSE; | 74 | mMaxWindGain = 1.f; |
74 | mMasterGain = 1.f; | ||
75 | mInternetStreamGain = 0.125f; | ||
76 | mUserData = userdata; | ||
77 | mLastStatus = 0; | ||
78 | 75 | ||
79 | mNumChannels = num_channels; | 76 | mListenerp = NULL; |
80 | |||
81 | 77 | ||
82 | mMaxWindGain = 1.0; | 78 | mMuted = FALSE; |
79 | mUserData = NULL; | ||
80 | |||
81 | mLastStatus = 0; | ||
83 | 82 | ||
83 | mNumChannels = 0; | ||
84 | mEnableWind = FALSE; | 84 | mEnableWind = FALSE; |
85 | 85 | ||
86 | S32 i; | 86 | S32 i; |
87 | for (i = 0; i < MAX_BUFFERS; i++) | 87 | for (i = 0; i < MAX_CHANNELS; i++) |
88 | { | ||
89 | mBuffers[i] = NULL; | ||
90 | } | ||
91 | for (i = 0; i < num_channels; i++) | ||
92 | { | 88 | { |
93 | mChannels[i] = NULL; | 89 | mChannels[i] = NULL; |
94 | } | 90 | } |
91 | for (i = 0; i < MAX_BUFFERS; i++) | ||
92 | { | ||
93 | mBuffers[i] = NULL; | ||
94 | } | ||
95 | |||
96 | mMasterGain = 1.f; | ||
97 | mInternetStreamGain = 0.125f; | ||
98 | mNextWindUpdate = 0.f; | ||
99 | } | ||
100 | |||
101 | |||
102 | BOOL LLAudioEngine::init(const S32 num_channels, void* userdata) | ||
103 | { | ||
104 | setDefaults(); | ||
105 | |||
106 | mNumChannels = num_channels; | ||
107 | mUserData = userdata; | ||
95 | 108 | ||
96 | allocateListener(); | 109 | allocateListener(); |
97 | 110 | ||