java编写mp3播放器.docx
还剩
155页未读,
继续阅读
下载文档到电脑,马上远离加班熬夜!
亲,很抱歉,此页已超出免费预览范围啦!
如果喜欢就下载吧,价低环保!
内容要点:
文件下载 在 jmp123 主页 http://jmp123.sourceforge.net/ (或 ttp://jmp123.sf.net )下载最新的程序和源 码。源码和程序的 API 文档已经放上去了~ 45. +"This program is free software: you can redistribute it and/or modify\n" 46. +"it under the terms of the GNU General Public License as published by\n" 47. +"the Free Sof1. /* 2. * Player.java -- JAVA MPEG 1.0/2.0/2.5 Layer I/II/III mini Player 3. * 简称: jmp123 4. * Copyright (C) 2010 5. * 6. * This program is free software: you can redistribute it 52. } MP3 解码引擎(engine)的编写过程就讲解完了,作为一个完整的程序,应该把播放器代码也出来,我只 写了一个简单的命令行播放器意思意思。MP3解码的关键技术方面的资料不太容易查阅到,其中泛泛而谈的比较 多,网上盛行互相抄袭。开放源代码的程序是我们获得这些细节的一种途径。 mpg123 的 README 文件 写道mpg123 is fast. Any faster softwar8. import jmp123.instream.BuffRandAcceFile; 9. import jmp123.instream.BuffRandAcceURL; 10. import jmp123.output.Audio; 11. 12. public final class PlayingThread implements Runnable { 13. 62. 63. /* 64. * intWhichChannel - 输出的声道 : CH_LEFT/CH_RIGHT/CH_BOTH 65. */ 66. public static void setOutputChannel(int intWhichChannel) { 67. intOutputChannel = intWhich18. switch(objHeader.getLayer()) { 19. case 1: 20. layer123 = new Layer1(objBS, objHeader); 21. break; 22. case 2: 23. layer123 = 1.定义解码一帧的接口 ILayer123 Layer1、Layer2 和 Layer3 这三个类都实现了 ILayer123 的 decodeFrame方法。 Java 代码 1. // ILayer123.java 2. package jmp123.decoder; 3. 4. public interface ILayer123 { 5. public voi76. allocation[0][sb] = (byte)((nb != 0) ? (nb + 1) : 0
发表评论
暂无评论,赶快抢占沙发吧。