PageRenderTime 55ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 0ms

/sample/noise/lib/MpegAudioSPI1.9.4/src/javazoom/spi/mpeg/sampled/file/MpegAudioFileFormat.java

https://github.com/simensan/playn
Java | 106 lines | 15 code | 5 blank | 86 comment | 0 complexity | f01956cf275bd9e2a1bf606adb4d348e MD5 | raw file
  1. /*
  2. * MpegAudioFileFormat.
  3. *
  4. * JavaZOOM : mp3spi@javazoom.net
  5. * http://www.javazoom.net
  6. *
  7. *-----------------------------------------------------------------------
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU Library General Public License as published
  10. * by the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU Library General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU Library General Public
  19. * License along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21. *----------------------------------------------------------------------
  22. */
  23. package javazoom.spi.mpeg.sampled.file;
  24. import java.util.Map;
  25. import javax.sound.sampled.AudioFormat;
  26. import org.tritonus.share.sampled.file.TAudioFileFormat;
  27. /**
  28. * @author JavaZOOM
  29. */
  30. public class MpegAudioFileFormat extends TAudioFileFormat
  31. {
  32. /**
  33. * Contructor.
  34. * @param type
  35. * @param audioFormat
  36. * @param nLengthInFrames
  37. * @param nLengthInBytes
  38. */
  39. public MpegAudioFileFormat(Type type, AudioFormat audioFormat, int nLengthInFrames, int nLengthInBytes, Map properties)
  40. {
  41. super(type, audioFormat, nLengthInFrames, nLengthInBytes, properties);
  42. }
  43. /**
  44. * MP3 audio file format parameters.
  45. * Some parameters might be unavailable. So availability test is required before reading any parameter.
  46. *
  47. * <br>AudioFileFormat parameters.
  48. * <ul>
  49. * <li><b>duration</b> [Long], duration in microseconds.
  50. * <li><b>title</b> [String], Title of the stream.
  51. * <li><b>author</b> [String], Name of the artist of the stream.
  52. * <li><b>album</b> [String], Name of the album of the stream.
  53. * <li><b>date</b> [String], The date (year) of the recording or release of the stream.
  54. * <li><b>copyright</b> [String], Copyright message of the stream.
  55. * <li><b>comment</b> [String], Comment of the stream.
  56. * </ul>
  57. * <br>MP3 parameters.
  58. * <ul>
  59. * <li><b>mp3.version.mpeg</b> [String], mpeg version : 1,2 or 2.5
  60. * <li><b>mp3.version.layer</b> [String], layer version 1, 2 or 3
  61. * <li><b>mp3.version.encoding</b> [String], mpeg encoding : MPEG1, MPEG2-LSF, MPEG2.5-LSF
  62. * <li><b>mp3.channels</b> [Integer], number of channels 1 : mono, 2 : stereo.
  63. * <li><b>mp3.frequency.hz</b> [Integer], sampling rate in hz.
  64. * <li><b>mp3.bitrate.nominal.bps</b> [Integer], nominal bitrate in bps.
  65. * <li><b>mp3.length.bytes</b> [Integer], length in bytes.
  66. * <li><b>mp3.length.frames</b> [Integer], length in frames.
  67. * <li><b>mp3.framesize.bytes</b> [Integer], framesize of the first frame. framesize is not constant for VBR streams.
  68. * <li><b>mp3.framerate.fps</b> [Float], framerate in frames per seconds.
  69. * <li><b>mp3.header.pos</b> [Integer], position of first audio header (or ID3v2 size).
  70. * <li><b>mp3.vbr</b> [Boolean], vbr flag.
  71. * <li><b>mp3.vbr.scale</b> [Integer], vbr scale.
  72. * <li><b>mp3.crc</b> [Boolean], crc flag.
  73. * <li><b>mp3.original</b> [Boolean], original flag.
  74. * <li><b>mp3.copyright</b> [Boolean], copyright flag.
  75. * <li><b>mp3.padding</b> [Boolean], padding flag.
  76. * <li><b>mp3.mode</b> [Integer], mode 0:STEREO 1:JOINT_STEREO 2:DUAL_CHANNEL 3:SINGLE_CHANNEL
  77. * <li><b>mp3.id3tag.genre</b> [String], ID3 tag (v1 or v2) genre.
  78. * <li><b>mp3.id3tag.track</b> [String], ID3 tag (v1 or v2) track info.
  79. * <li><b>mp3.id3tag.encoded</b> [String], ID3 tag v2 encoded by info.
  80. * <li><b>mp3.id3tag.composer</b> [String], ID3 tag v2 composer info.
  81. * <li><b>mp3.id3tag.grouping</b> [String], ID3 tag v2 grouping info.
  82. * <li><b>mp3.id3tag.disc</b> [String], ID3 tag v2 track info.
  83. * <li><b>mp3.id3tag.publisher</b> [String], ID3 tag v2 publisher info.
  84. * <li><b>mp3.id3tag.orchestra</b> [String], ID3 tag v2 orchestra info.
  85. * <li><b>mp3.id3tag.length</b> [String], ID3 tag v2 file length in seconds.
  86. * <li><b>mp3.id3tag.v2</b> [InputStream], ID3v2 frames.
  87. * <li><b>mp3.id3tag.v2.version</b> [String], ID3v2 major version (2=v2.2.0, 3=v2.3.0, 4=v2.4.0).
  88. * <li><b>mp3.shoutcast.metadata.key</b> [String], Shoutcast meta key with matching value.
  89. * <br>For instance :
  90. * <br>mp3.shoutcast.metadata.icy-irc=#shoutcast
  91. * <br>mp3.shoutcast.metadata.icy-metaint=8192
  92. * <br>mp3.shoutcast.metadata.icy-genre=Trance Techno Dance
  93. * <br>mp3.shoutcast.metadata.icy-url=http://www.di.fm
  94. * <br>and so on ...
  95. * </ul>
  96. */
  97. public Map properties()
  98. {
  99. return super.properties();
  100. }
  101. }