Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
3e0ad6d8
authored
Sep 14, 2022
by
samrobinson
Committed by
Marc Baechinger
Oct 19, 2022
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Clarify the replaceOutputBuffer parameter because count is unclear.
PiperOrigin-RevId: 474279220
parent
7c435621
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
library/core/src/main/java/com/google/android/exoplayer2/audio/BaseAudioProcessor.java
library/core/src/main/java/com/google/android/exoplayer2/audio/BaseAudioProcessor.java
View file @
3e0ad6d8
...
@@ -101,13 +101,13 @@ public abstract class BaseAudioProcessor implements AudioProcessor {
...
@@ -101,13 +101,13 @@ public abstract class BaseAudioProcessor implements AudioProcessor {
}
}
/**
/**
* Replaces the current output buffer with a buffer of at least {@code
count} bytes and returns
* Replaces the current output buffer with a buffer of at least {@code
size} bytes and returns it.
*
it. Callers should write to the returned buffer then {@link ByteBuffer#flip()} it so it can be
*
Callers should write to the returned buffer then {@link ByteBuffer#flip()} it so it can be read
*
read
via {@link #getOutput()}.
* via {@link #getOutput()}.
*/
*/
protected
final
ByteBuffer
replaceOutputBuffer
(
int
count
)
{
protected
final
ByteBuffer
replaceOutputBuffer
(
int
size
)
{
if
(
buffer
.
capacity
()
<
count
)
{
if
(
buffer
.
capacity
()
<
size
)
{
buffer
=
ByteBuffer
.
allocateDirect
(
count
).
order
(
ByteOrder
.
nativeOrder
());
buffer
=
ByteBuffer
.
allocateDirect
(
size
).
order
(
ByteOrder
.
nativeOrder
());
}
else
{
}
else
{
buffer
.
clear
();
buffer
.
clear
();
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment