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
03156bf9
Commit
03156bf9
authored
15 years ago
by
Tofu Linden
Browse files
Options
Downloads
Patches
Plain Diff
lots of debuggy annotation to trace into the audio playback failure.
it seems to be a VFS callback issue.
parent
41eb231e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
indra/llaudio/llaudiodecodemgr.cpp
+13
-5
13 additions, 5 deletions
indra/llaudio/llaudiodecodemgr.cpp
with
13 additions
and
5 deletions
indra/llaudio/llaudiodecodemgr.cpp
+
13
−
5
View file @
03156bf9
...
@@ -68,6 +68,7 @@ class LLVorbisDecodeState : public LLRefCount
...
@@ -68,6 +68,7 @@ class LLVorbisDecodeState : public LLRefCount
~
WriteResponder
()
{}
~
WriteResponder
()
{}
void
completed
(
S32
bytes
)
void
completed
(
S32
bytes
)
{
{
llinfos
<<
"vorbis decoder COMPLETED callback with "
<<
bytes
<<
llendl
;
mDecoder
->
ioComplete
(
bytes
);
mDecoder
->
ioComplete
(
bytes
);
}
}
LLPointer
<
LLVorbisDecodeState
>
mDecoder
;
LLPointer
<
LLVorbisDecodeState
>
mDecoder
;
...
@@ -202,7 +203,7 @@ BOOL LLVorbisDecodeState::initDecode()
...
@@ -202,7 +203,7 @@ BOOL LLVorbisDecodeState::initDecode()
vfs_callbacks
.
close_func
=
vfs_close
;
vfs_callbacks
.
close_func
=
vfs_close
;
vfs_callbacks
.
tell_func
=
vfs_tell
;
vfs_callbacks
.
tell_func
=
vfs_tell
;
//
llinfos << "Initing decode from vfile: " << mUUID << llendl;
llinfos
<<
"Initing decode from vfile: "
<<
mUUID
<<
llendl
;
mInFilep
=
new
LLVFile
(
gVFS
,
mUUID
,
LLAssetType
::
AT_SOUND
);
mInFilep
=
new
LLVFile
(
gVFS
,
mUUID
,
LLAssetType
::
AT_SOUND
);
if
(
!
mInFilep
||
!
mInFilep
->
getSize
())
if
(
!
mInFilep
||
!
mInFilep
->
getSize
())
...
@@ -355,13 +356,14 @@ BOOL LLVorbisDecodeState::decodeSection()
...
@@ -355,13 +356,14 @@ BOOL LLVorbisDecodeState::decodeSection()
}
}
if
(
mDone
)
if
(
mDone
)
{
{
//
llwarns <<
"
Already done with decode, aborting!" << llendl;
llwarns
<<
mOutFilename
<<
"
Already done with
vorbis
decode, aborting!"
<<
llendl
;
return
TRUE
;
return
TRUE
;
}
}
char
pcmout
[
4096
];
/*Flawfinder: ignore*/
char
pcmout
[
4096
];
/*Flawfinder: ignore*/
BOOL
eof
=
FALSE
;
BOOL
eof
=
FALSE
;
long
ret
=
ov_read
(
&
mVF
,
pcmout
,
sizeof
(
pcmout
),
0
,
2
,
1
,
&
mCurrentSection
);
long
ret
=
ov_read
(
&
mVF
,
pcmout
,
sizeof
(
pcmout
),
0
,
2
,
1
,
&
mCurrentSection
);
llinfos
<<
mOutFilename
<<
" vorbis decode returned "
<<
ret
<<
llendl
;
if
(
ret
==
0
)
if
(
ret
==
0
)
{
{
/* EOF */
/* EOF */
...
@@ -401,9 +403,10 @@ BOOL LLVorbisDecodeState::finishDecode()
...
@@ -401,9 +403,10 @@ BOOL LLVorbisDecodeState::finishDecode()
}
}
#if !defined(USE_WAV_VFILE)
#if !defined(USE_WAV_VFILE)
if
(
mFileHandle
==
LLLFSThread
::
nullHandle
())
if
(
mFileHandle
==
LLLFSThread
::
nullHandle
())
// haven't started to write to disk yet...
#endif
#endif
{
{
llwarns
<<
"mFileHandle is still null in vorbis decode for "
<<
getUUID
()
<<
llendl
;
ov_clear
(
&
mVF
);
ov_clear
(
&
mVF
);
// write "data" chunk length, in little-endian format
// write "data" chunk length, in little-endian format
...
@@ -475,7 +478,10 @@ BOOL LLVorbisDecodeState::finishDecode()
...
@@ -475,7 +478,10 @@ BOOL LLVorbisDecodeState::finishDecode()
mValid
=
FALSE
;
mValid
=
FALSE
;
return
TRUE
;
// we've finished
return
TRUE
;
// we've finished
}
}
#if !defined(USE_WAV_VFILE)
#if !defined(USE_WAV_VFILE)
// start the write of the wav file to disk.
llwarns
<<
"starting wav write to disk from vorbis decode "
<<
mOutFilename
<<
llendl
;
mBytesRead
=
-
1
;
mBytesRead
=
-
1
;
mFileHandle
=
LLLFSThread
::
sLocal
->
write
(
mOutFilename
,
&
mWAVBuffer
[
0
],
0
,
mWAVBuffer
.
size
(),
mFileHandle
=
LLLFSThread
::
sLocal
->
write
(
mOutFilename
,
&
mWAVBuffer
[
0
],
0
,
mWAVBuffer
.
size
(),
new
WriteResponder
(
this
));
new
WriteResponder
(
this
));
...
@@ -495,6 +501,7 @@ BOOL LLVorbisDecodeState::finishDecode()
...
@@ -495,6 +501,7 @@ BOOL LLVorbisDecodeState::finishDecode()
}
}
else
else
{
{
llwarns
<<
"claiming to not be done in finishDecode"
<<
llendl
;
return
FALSE
;
// not done
return
FALSE
;
// not done
}
}
}
}
...
@@ -502,11 +509,11 @@ BOOL LLVorbisDecodeState::finishDecode()
...
@@ -502,11 +509,11 @@ BOOL LLVorbisDecodeState::finishDecode()
mDone
=
TRUE
;
mDone
=
TRUE
;
#if defined(USE_WAV_VFILE)
#if defined(USE_WAV_VFILE)
// write the data.
// write the data
into the VFS
.
LLVFile
output
(
gVFS
,
mUUID
,
LLAssetType
::
AT_SOUND_WAV
);
LLVFile
output
(
gVFS
,
mUUID
,
LLAssetType
::
AT_SOUND_WAV
);
output
.
write
(
&
mWAVBuffer
[
0
],
mWAVBuffer
.
size
());
output
.
write
(
&
mWAVBuffer
[
0
],
mWAVBuffer
.
size
());
#endif
#endif
//
llinfos << "Finished decode for " << getUUID() << llendl;
llinfos
<<
"Finished decode for "
<<
getUUID
()
<<
llendl
;
return
TRUE
;
return
TRUE
;
}
}
...
@@ -553,6 +560,7 @@ void LLAudioDecodeMgr::Impl::processQueue(const F32 num_secs)
...
@@ -553,6 +560,7 @@ void LLAudioDecodeMgr::Impl::processQueue(const F32 num_secs)
// Decode in a loop until we're done or have run out of time.
// Decode in a loop until we're done or have run out of time.
while
(
!
(
res
=
mCurrentDecodep
->
decodeSection
())
&&
(
decode_timer
.
getElapsedTimeF32
()
<
num_secs
))
while
(
!
(
res
=
mCurrentDecodep
->
decodeSection
())
&&
(
decode_timer
.
getElapsedTimeF32
()
<
num_secs
))
{
{
llinfos
<<
"vorbis/audio decode timer has "
<<
decode_timer
.
getElapsedTimeF32
()
<<
"s elapsed, from an alottment of "
<<
num_secs
<<
"s"
<<
llendl
;
// decodeSection does all of the work above
// decodeSection does all of the work above
}
}
...
...
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