使用MediaPlayer做的简单音乐播放器,更多内容请到百度经验查看http://jingyan.baidu.com/article/60ccbceb63452364cab197f1.html package com.basil...
分类:
移动开发 时间:
2015-02-03 10:56:37
阅读次数:
189
主MainActivity的布局配置文件? ? 这是activity_main.xml。主要出现两个按钮,按钮一通过mediaplayer播放,按钮二通过videoview播放 <LinearLayout?xmlns:android="http://schemas.android.com/apk/res/andro...
分类:
移动开发 时间:
2015-02-02 21:39:14
阅读次数:
164
简单介绍: 播放声音有两种、一种是SoundPool,一种是MediaPlayer。 SundPool用于播放短小的音乐,比如游戏里面的特效音,按键音等等。 MediaPlayer可以播放视频和音频。 1、使用SoundPool package?com.shao;
...
分类:
移动开发 时间:
2015-02-02 01:59:54
阅读次数:
281
//扫描本地音乐文件,返回艺术家列表 需要库MediaPlayer.framework -(NSArray*) findArtistList { NSMutableArray *artistList = [[NSMutableArray alloc]init]; MPMedia...
分类:
其他好文 时间:
2015-01-30 22:23:04
阅读次数:
174
在听筒模式下 am.setSpeakerphoneOn(false); ? ? setVolumeControlStream(AudioManager.STREAM_VOICE_CALL); ? ? am.setMode(AudioManager.MODE_IN_CALL); ? 我用Mediaplayer AudioTrack调节音量总是失败? ...
分类:
移动开发 时间:
2015-01-27 15:11:09
阅读次数:
240
在iOS开发中,播放视频通常有两种方式,一种是使用MPMoviePlayerController(需要导入MediaPlayer.Framework),还有一种是使用AVPlayer。关于这两个类的区别可以参考http://stackoverflow.com/questions/8146942/av...
分类:
其他好文 时间:
2015-01-27 10:57:14
阅读次数:
259
Main.xml程序如下:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertica...
分类:
移动开发 时间:
2015-01-26 22:56:41
阅读次数:
385
AudioRecord和AudioTrack类是Android获取和播放音频流的重要类,放置在android.media包中。与该包中 的MediaRecorder和MediaPlayer类不同,AudioRecord和AudioTrack类在获取和播放音频数据流时无需通过文件保 存和文件读取,可以...
分类:
移动开发 时间:
2015-01-26 22:35:48
阅读次数:
214
学习service的典型例子
package com.example.mp3player;
import android.app.Service;
import android.content.Intent;
import android.media.MediaPlayer;
import android.os.IBinder;
public class MusicService exten...
分类:
其他好文 时间:
2015-01-23 23:04:50
阅读次数:
166
#import "ViewController.h"@import MediaPlayer;@interface ViewController (){ MPMoviePlayerController *_mov;}@property (weak, nonatomic) IBOutlet UIImag...
分类:
移动开发 时间:
2015-01-15 12:46:32
阅读次数:
190