-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
eea328c
commit 45d43df
Showing
36 changed files
with
691 additions
and
457 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+996 Bytes
(110%)
out/production/OrangePlayer/org/orangeplayer/audio/Player.class
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+700 Bytes
(110%)
out/production/OrangePlayer/org/orangeplayer/audio/Track.class
Binary file not shown.
Binary file modified
BIN
+84 Bytes
(100%)
out/production/OrangePlayer/org/orangeplayer/audio/codec/FlacDecoder.class
Binary file not shown.
Binary file modified
BIN
-888 Bytes
(79%)
out/production/OrangePlayer/org/orangeplayer/audio/formats/FlacTrack.class
Binary file not shown.
Binary file added
BIN
+5.47 KB
out/production/OrangePlayer/org/orangeplayer/audio/formats/M4ATrack.class
Binary file not shown.
Binary file modified
BIN
-703 Bytes
(84%)
out/production/OrangePlayer/org/orangeplayer/audio/formats/MP3Track.class
Binary file not shown.
Binary file removed
BIN
-6.87 KB
out/production/OrangePlayer/org/orangeplayer/audio/formats/MP4Track.class
Binary file not shown.
Binary file modified
BIN
-619 Bytes
(85%)
out/production/OrangePlayer/org/orangeplayer/audio/formats/OGGTrack.class
Binary file not shown.
Binary file modified
BIN
-995 Bytes
(77%)
out/production/OrangePlayer/org/orangeplayer/audio/formats/PCMTrack.class
Binary file not shown.
Binary file modified
BIN
+35 Bytes
(110%)
out/production/OrangePlayer/org/orangeplayer/audio/interfaces/PlayerControls.class
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-3.82 KB
out/production/OrangePlayer/org/orangeplayer/main2/TestPlayer.class
Binary file not shown.
Binary file added
BIN
+1.66 KB
out/production/OrangePlayer/org/orangeplayer/ontesting/AudioTaggerTest.class
Binary file not shown.
Binary file added
BIN
+5.27 KB
out/production/OrangePlayer/org/orangeplayer/ontesting/TestAAC2.class
Binary file not shown.
Binary file added
BIN
+4.14 KB
out/production/OrangePlayer/org/orangeplayer/ontesting/TestPlayer.class
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package org.orangeplayer.audio; | ||
|
||
import org.jaudiotagger.audio.AudioFile; | ||
import org.jaudiotagger.audio.AudioFileIO; | ||
import org.jaudiotagger.audio.AudioHeader; | ||
import org.jaudiotagger.audio.exceptions.CannotReadException; | ||
import org.jaudiotagger.audio.exceptions.InvalidAudioFrameException; | ||
import org.jaudiotagger.audio.exceptions.ReadOnlyFileException; | ||
import org.jaudiotagger.tag.FieldKey; | ||
import org.jaudiotagger.tag.Tag; | ||
import org.jaudiotagger.tag.TagException; | ||
import org.jaudiotagger.tag.images.Artwork; | ||
|
||
import java.io.File; | ||
import java.io.IOException; | ||
|
||
public class AudioInfo { | ||
private AudioFile audioFile; | ||
private Tag fileTag; | ||
private AudioHeader header; | ||
|
||
public AudioInfo(File sound) | ||
throws TagException, ReadOnlyFileException, | ||
CannotReadException, InvalidAudioFrameException, IOException { | ||
this.audioFile = AudioFileIO.read(sound); | ||
fileTag = audioFile.getTag(); | ||
header = audioFile.getAudioHeader(); | ||
} | ||
|
||
public String getTag(FieldKey tag) { | ||
return fileTag.getFirst(tag); | ||
} | ||
|
||
public String getTag(String tagName) { | ||
return getTag(FieldKey.valueOf(tagName.toUpperCase())); | ||
} | ||
|
||
public int getDuration() { | ||
return header.getTrackLength(); | ||
} | ||
|
||
public Artwork getCover() { | ||
return fileTag.getFirstArtwork(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.