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
c9585d01
authored
Oct 26, 2022
by
samrobinson
Committed by
microkatz
Oct 31, 2022
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Add AudioProcessor.AudioFormat equals method.
PiperOrigin-RevId: 483983486
parent
8181b3c6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
library/common/src/main/java/androidx/media3/common/audio/AudioProcessor.java
library/common/src/main/java/androidx/media3/common/audio/AudioProcessor.java
View file @
c9585d01
...
@@ -15,9 +15,11 @@
...
@@ -15,9 +15,11 @@
*/
*/
package
androidx
.
media3
.
common
.
audio
;
package
androidx
.
media3
.
common
.
audio
;
import
androidx.annotation.Nullable
;
import
com.google.android.exoplayer2.C
;
import
com.google.android.exoplayer2.C
;
import
com.google.android.exoplayer2.Format
;
import
com.google.android.exoplayer2.Format
;
import
com.google.android.exoplayer2.util.Util
;
import
com.google.android.exoplayer2.util.Util
;
import
com.google.common.base.Objects
;
import
com.google.errorprone.annotations.CanIgnoreReturnValue
;
import
com.google.errorprone.annotations.CanIgnoreReturnValue
;
import
java.nio.ByteBuffer
;
import
java.nio.ByteBuffer
;
import
java.nio.ByteOrder
;
import
java.nio.ByteOrder
;
...
@@ -69,6 +71,25 @@ public interface AudioProcessor {
...
@@ -69,6 +71,25 @@ public interface AudioProcessor {
+
encoding
+
encoding
+
']'
;
+
']'
;
}
}
@Override
public
boolean
equals
(
@Nullable
Object
o
)
{
if
(
this
==
o
)
{
return
true
;
}
if
(!(
o
instanceof
AudioFormat
))
{
return
false
;
}
AudioFormat
that
=
(
AudioFormat
)
o
;
return
sampleRate
==
that
.
sampleRate
&&
channelCount
==
that
.
channelCount
&&
encoding
==
that
.
encoding
;
}
@Override
public
int
hashCode
()
{
return
Objects
.
hashCode
(
sampleRate
,
channelCount
,
encoding
);
}
}
}
/** Exception thrown when a processor can't be configured for a given input audio format. */
/** Exception thrown when a processor can't be configured for a given input audio format. */
...
...
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