Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
04bee016
Commit
04bee016
authored
13 years ago
by
Xiaohong Bao
Browse files
Options
Downloads
Plain Diff
Automated merge with
https://bitbucket.org/VirLinden/viewer-development-shining-fixes
parents
22e46e4b
1a18184f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
indra/llaudio/llaudioengine.cpp
+19
-4
19 additions, 4 deletions
indra/llaudio/llaudioengine.cpp
indra/llaudio/llaudioengine.h
+1
-0
1 addition, 0 deletions
indra/llaudio/llaudioengine.h
with
20 additions
and
4 deletions
indra/llaudio/llaudioengine.cpp
+
19
−
4
View file @
04bee016
...
@@ -1264,6 +1264,7 @@ LLAudioSource::LLAudioSource(const LLUUID& id, const LLUUID& owner_id, const F32
...
@@ -1264,6 +1264,7 @@ LLAudioSource::LLAudioSource(const LLUUID& id, const LLUUID& owner_id, const F32
mSyncSlave
(
false
),
mSyncSlave
(
false
),
mQueueSounds
(
false
),
mQueueSounds
(
false
),
mPlayedOnce
(
false
),
mPlayedOnce
(
false
),
mCorrupted
(
false
),
mType
(
type
),
mType
(
type
),
mChannelp
(
NULL
),
mChannelp
(
NULL
),
mCurrentDatap
(
NULL
),
mCurrentDatap
(
NULL
),
...
@@ -1296,16 +1297,25 @@ void LLAudioSource::setChannel(LLAudioChannel *channelp)
...
@@ -1296,16 +1297,25 @@ void LLAudioSource::setChannel(LLAudioChannel *channelp)
void
LLAudioSource
::
update
()
void
LLAudioSource
::
update
()
{
{
if
(
mCorrupted
)
{
return
;
//no need to update
}
if
(
!
getCurrentBuffer
())
if
(
!
getCurrentBuffer
())
{
{
if
(
getCurrentData
())
if
(
getCurrentData
())
{
{
// Hack - try and load the sound. Will do this as a callback
// Hack - try and load the sound. Will do this as a callback
// on decode later.
// on decode later.
if
(
getCurrentData
()
->
load
())
if
(
getCurrentData
()
->
load
()
&&
getCurrentData
()
->
getBuffer
()
)
{
{
play
(
getCurrentData
()
->
getID
());
play
(
getCurrentData
()
->
getID
());
}
}
else
{
mCorrupted
=
true
;
}
}
}
}
}
}
}
...
@@ -1421,6 +1431,11 @@ bool LLAudioSource::play(const LLUUID &audio_uuid)
...
@@ -1421,6 +1431,11 @@ bool LLAudioSource::play(const LLUUID &audio_uuid)
bool
LLAudioSource
::
isDone
()
const
bool
LLAudioSource
::
isDone
()
const
{
{
if
(
mCorrupted
)
{
return
true
;
}
const
F32
MAX_AGE
=
60.
f
;
const
F32
MAX_AGE
=
60.
f
;
const
F32
MAX_UNPLAYED_AGE
=
15.
f
;
const
F32
MAX_UNPLAYED_AGE
=
15.
f
;
const
F32
MAX_MUTED_AGE
=
11.
f
;
const
F32
MAX_MUTED_AGE
=
11.
f
;
...
@@ -1736,7 +1751,7 @@ LLAudioData::LLAudioData(const LLUUID &uuid) :
...
@@ -1736,7 +1751,7 @@ LLAudioData::LLAudioData(const LLUUID &uuid) :
}
}
}
}
//return false when the audio file is corrupted.
bool
LLAudioData
::
load
()
bool
LLAudioData
::
load
()
{
{
// For now, just assume we're going to use one buffer per audiodata.
// For now, just assume we're going to use one buffer per audiodata.
...
@@ -1752,7 +1767,7 @@ bool LLAudioData::load()
...
@@ -1752,7 +1767,7 @@ bool LLAudioData::load()
{
{
// No free buffers, abort.
// No free buffers, abort.
llinfos
<<
"Not able to allocate a new audio buffer, aborting."
<<
llendl
;
llinfos
<<
"Not able to allocate a new audio buffer, aborting."
<<
llendl
;
return
fals
e
;
return
tru
e
;
}
}
std
::
string
uuid_str
;
std
::
string
uuid_str
;
...
...
This diff is collapsed.
Click to expand it.
indra/llaudio/llaudioengine.h
+
1
−
0
View file @
04bee016
...
@@ -334,6 +334,7 @@ class LLAudioSource
...
@@ -334,6 +334,7 @@ class LLAudioSource
bool
mSyncSlave
;
bool
mSyncSlave
;
bool
mQueueSounds
;
bool
mQueueSounds
;
bool
mPlayedOnce
;
bool
mPlayedOnce
;
bool
mCorrupted
;
S32
mType
;
S32
mType
;
LLVector3d
mPositionGlobal
;
LLVector3d
mPositionGlobal
;
LLVector3
mVelocity
;
LLVector3
mVelocity
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment