位置: 编程技术 - 正文

Android游戏之音频类设计(安卓音游吃音)

编辑:rootadmin
Android游戏之音频类设计

推荐整理分享Android游戏之音频类设计(安卓音游吃音),希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:安卓游戏音效,安卓音游手机,安卓游戏音效,安卓音乐类游戏,安卓游戏yy,安卓音乐类游戏,安卓音乐游戏,安卓系统音游,内容如对您有帮助,希望把文章链接给更多的朋友!

1、基础知识:

A. setVolumeControlStream(AudioManager.STREAM_MUSIC); final void setVolumeControlStream (int streamType) Added in API level 1

Suggests an audio stream whose volume should be changed by the hardware volume controls. The suggested audio stream will be tied to the window of this Activity. Volume requests which are received while the Activity is in the

foreground will affect this stream. It is not guaranteed that the hardware volume controls will always change this stream's volume (for example, if a call is in progress, its

stream's volume may be changed instead). To reset back to the default, use USE_DEFAULT_STREAM_TYPE.

Parameters

streamType The type of the audio stream whose volume should be changed by the hardware volume controls.

AudioManager的值: STREAM_MUSIC The audio stream for music playback

Android游戏之音频类设计(安卓音游吃音)

B.getAssets () final AssetManager getAssets () Added in API level 1

Retrieve underlying AssetManager storage for these resources. C. SoundPool class manages and plays audio resources for applications. A SoundPool is a collection of samples that can be loaded into memory from a resource inside the APK or from a file in the file system. The

SoundPool library uses the MediaPlayer service to decode the audio into a raw -bit PCM mono or stereo stream. This allows applications to

ship with compressed streams without having to suffer the CPU load and latency of decompressing during playback. int, int)Parameters

maxStreams the maximum number of simultaneous streams for this SoundPool object streamType the audio stream type as described in AudioManager For example, game applications will normally use STREAM_MUSIC. srcQuality the sample-rate converter quality. Currently has no effect. Use 0 for the default.

Returnsa SoundPool object, or null if creation failedF.

本文浅述了“beginning-android-games”书本的相关基础知识和相关类的设计分析,书本和源码:

cocos2dx中地图拖拽(任意方向拖拽+固定方向拖拽) 在游戏开发中,经常会碰见需要使用地图拖拽,例如通关关卡地图,可以允许用户拖拽选择进入哪个关卡,那么在cocos2dx中如何来实现呢?请见如下方案

Android游戏之输入类设计(传感器,键盘,触摸点) Android游戏之输入类设计(传感器,键盘,触摸点)1、基础知识:A.SensorEventListener传感器事件监听

Android游戏之文件读写类和绘图类设计 Android游戏之文件读写类和绘图类设计1、基础知识:A.

本文链接地址:https://www.jiuchutong.com/biancheng/371300.html 转载请保留说明!

上一篇:[置顶] 《CrazyBird》Android休闲射击类游戏1.0版发布啦([置顶] 《借.住.情.缘》)

下一篇:cocos2dx中地图拖拽(任意方向拖拽+固定方向拖拽)(cocos2d schedule)

免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

鄂ICP备2023003026号

网站地图: 企业信息 工商信息 财税知识 网络常识 编程技术

友情链接: 武汉网站建设 电脑维修 湖南楚通运网络