主要机型对应的音频格式以及震动功能列表

微信小游戏爆款开发实战:从Cocos引擎选型到广告变现全流程避坑指南 游戏开发是一个融合了创意、技术与工程实践的系统性工程。其核心原理在于通过高效的渲染引擎、合理的资源管理与性能优化,在有限的硬件平台上构建流畅、有趣的交互体验。对于微信小游戏这一特定平台,其技术价值在于利用轻量化、即点即玩的特性,触达海量移动端用户,实现快速的产品验证与商业变现。在应用场景上,消除、合成、io对战等品类因其符合碎片化时间娱乐需求而备受青睐。本文聚焦于使用Cocos Creator引擎进行微信小游戏开发,深入探讨了从引擎选型、资源优化、开放数据域处理到广告系统设计等全流程实战经验,特别是针对** 阅读详情
看到一片不错文章: http://jcodeworks.com/developersfxguide.html


整理了一个表格
 Device Melody Wave Vibra 1 FX at a time
 3650/6600/N-Gage mid0 amr - -
 7650 - wav - -
 Moto V525/V600 mid0 amr Y -
 Sagem myV65/myV75 ? wav - -
 Sharp GX familiy mmf mmf Y Y
 Sony-Ericsson T6xx/Z600 mid0 amr Y -
原文如下:

Developers reference guide on creating audio SFX, melodies and vibration on Nokia, Motorola, Sharp, Sagem and Sony mobile devices.

Introduction

How many times have you thought your software works on a specific mobile device, because it works in the PC-emulator, only to find that once you try it on an actual device it crashes without any explanation why!

This guide will help software developers create 100% working FX on Nokia, Motorola, Sharp, Sagem and Sony mobile devices. This practical guide will include full-code for each device.

The most common FX required whilst developing mobile game software is the ability to:

  • Play melodies
  • Play wave-audio
  • Vibrate

Although it is generally possible to create J2ME software that will work on all devices* it is impossible to create generic code that will activate these FX.

*Apart from Nokia full screen mode, Motorola reverse soft-keys and Nokia 3650 alternative key layout.

If the device you need is not listed below, please email me dan@jcodeworks.com and I will consider adding it.
 

FX Reference Guide

Please note: Although it might be possible to achieve melody, wave-audio and vibrate using different types of file-format I will only list one. The format described will (a) work!!! (b) use the least amount of processor time and (c) use the least amount of resources.

Devices:


Coming soon: (Email me if you need this NOW)

  • Sony Ericsson S700, K700, K500, F500 family
  • Siemens S65, CX66
  • Nokia 6630
  • Motorola E680







Nokia 3650, 6600 and N-Gage

API: javax.microedition.media.*

Restriction: Only play 1 FX at a time.

NOTE: You can add a listener that will inform you of Player events (e.g. Stopped - when Player finishes FX).  To do this use: player.addPlayerListener(*class*).  The specified *class* must implement PlayerListener.

To catch the Listener events, use the following method inside *class*:

  • public void playerUpdate(Player player, String event, Object obj) {
       //player indicates which Player caused the event
       //event informs you of event type
    }

Also: I have not tried PlayerListener on Nokia 6600 and N-Gage and so, cannot confirm that it works properly.

- - -

Melody: Available - plays .mid files (format zero)

The great thing about MIDI files is that you can use your favourite professional audio sequencing package to create them. It's the standard of all standards in the music creation world.

To LOAD a MIDI file:

  • import javax.microedition.media.*;
    . . . .
    Player player;
    try {
       player = Manager.createPlayer(*canvas ref*.getClass().getResourceAsStream("melody.mid"),"audio/midi");
       player.realize();
       player.prefetch();  //Remove this line for Nokia 6600 and N-Gage
    } catch (Exception e0) {}


To PLAY the melody, ensure that you STOP all other players:

  • try {
       player.stop();
    catch (Exception e1) {}

… and then play your required melody with:

  • try {
       player.prefetch(); //Remove this line for Nokia 3650
       player.setMediaTime(0); //Remove this for Nokia 6600 and N-Gage
       player.setLoopCount(n); //n=number of times. -1=forever.
       player.start();
    catch (Exception e2) {}


Note: Playing a melody does NOT seem to cause any serious delays.  So you will NOT need to place it in a separate thread to the main game code.

To clean-up a melody resource:

  • if (player != null) {
       try {
         player.close();
       } catch (Exception e3) {}
       player = null;
    }

- - -

Wave Audio: Available - plays .amr files (8 bit, rate can vary depending on quality required)

AMR files are a lot smaller than .WAV files. To create AMR files use the MIKSOFT Mobile AMR converter. Check it out at
www.miksoft.8m.com

To LOAD a wave-audio:

  • import javax.microedition.media.*;
    . . . .
    Player player;
    try {
       player = Manager.createPlayer(*canvas ref*.getClass().getResourceAsStream("beep.amr"),"audio/amr");
       player.realize();
       player.prefetch();
    } catch (Exception e0) {}


To PLAY the audio, ensure that you STOP all other players:

  • try {
       player.stop();
    catch (Exception e1) {}
     

… and then play your required wave-audio with:

  • try {
       player.setMediaTime(0);
       player.start();
    catch (Exception e2) {}


Note: Calling the start() method does seem to take some time before calling back.  So you will need to place it in a separate thread to the main game code.

To clean-up a wave-audio resource:

  • if (player != null) {
       try {
         player.close();
       } catch (Exception e3) {}
       player = null;
    }

- - -

Vibrate: Not available.







Nokia 7650

API: com.nokia.mid.sound.*

Restriction: Only play 1 FX at a time.

NOTE: There does NOT seem to be any Sound listeners implemented on this device, so you will need to create your own means of determining if the Sound has finished using an elapsed time clock counter.

- - -

Melody: Not Available.

- - -

Wave Audio: Available – plays .WAV files (8bit, 8khz)

WARNING: I have found that short wave-audio (e.g. under .7 of a second) do not play properly e.g. produce clicking noises or don't play at all.

To LOAD a wave-audio:

  • import com.Nokia.sound.*;
    . . . .
    byte[] bytes = readDataFromJar("beep.wav");
    Sound sound;
    if (bytes != null)
       sound = new Sound(bytes, Sound.FORMAT_WAV);

    . . . .
    //utility method used by code above…
    public byte[] readDataFromJar(String name) {
       //get data from JAR resource
       ByteArrayOutputStream bout;
       InputStream in;
       byte[] res = null;
       try {
         in = *canvas ref*.getClass().getResourceAsStream(name);
         bout = new ByteArrayOutputStream();
         for (int ret = in.read(); ret >= 0; ret = in.read())
             bout.write(ret);
         res = bout.toByteArray();
       } catch (Exception e) {}
       return res;
    }


To PLAY the audio, ensure that you STOP all other wave-audio:

  • if (sound != null)
       sound.stop();

… and then play your required wave-audio with:

  • if (sound != null)
       sound.play(n); //n = number of repeats, e.g. 1

Note: Calling the play() method does NOT seem to cause any serious delays. So you will NOT need to place it in a separate thread to the main game code.

To clean-up a wave-audio resource:

  • if (sound != null) {
       sound.stop();
       sound = null;
    }

BUG NOTIFICATION: Some older 7650 firmware versions (version number unknown) crashes the application if you use the command 'setGain'.  Once the application terminates, the device will display an error notification: jes-8e-javax.microedition.lcdui0@ 1...CMdaAudioPlayerU 2 (or similar - depending on firmware version).  The application will crash even if you enclose the command with a try/catch exception handler.

- - -

Vibrate: Not available.







Motorola V525 and V600

API: Use javax.microedition.media.* for melody and wave-audio.
Use the MIDP2 display.vibrate command for vibration.

Restriction: Only play 1 FX at a time.

NOTE: You can add a listener that will inform you of Player events (e.g. Stopped - when Player finishes FX).  To do this use: player.addPlayerListener(*class*).  The specified *class* must implement PlayerListener.

To catch the Listener events, use the following method inside *class*:

  • public void playerUpdate(Player player, String event, Object obj) {
       //player indicates which Player caused the event
       //event informs you of event type
    }

- - -

Melody: Available - plays .mid files (format zero)

The great thing about MIDI files is that you can use your favourite professional audio sequencing package to create them. It's the standard of all standards in the music creation world.

To LOAD a MIDI file:

  • import javax.microedition.media.*;
    . . . .
    Player player;
    try {
       player = Manager.createPlayer(*canvas ref*.getClass().getResourceAsStream("melody.mid"),"audio/midi");
       player.realize();
    } catch (Exception e0) {}


To PLAY the melody, ensure that you STOP and DEALLOCATE all other players:

  • try {
       player.stop();
    catch (Exception e1) {}

    try {
       player.deallocate();
    catch (Exception e2) {}
     

… and then play your required melody with:

  • try {
       player.prefetch();
    catch (Exception e3) {}

    try {
       player.setMediaTime(0);
    catch (Exception e4) {}

    player.setLoopCount(n); //n=number of times. -1=forever.

    try {
       player.start();
    catch (Exception e5) {}


Note: Calling the start() method does NOT seem to cause any serious delays.  So you will NOT need to place it in a separate thread to the main game code.

To clean-up a melody resource:

  • if (player != null) {
       try {
         player.close();
       } catch (Exception e6) {}
       player = null;
    }

- - -

Wave Audio: Available - plays .amr files (8 bit, rate can vary depending on quality required)

AMR files are a lot smaller than .WAV files. To create AMR files use the MIKSOFT Mobile AMR converter. Check it out at
www.miksoft.8m.com

To LOAD a wave-audio:

  • import javax.microedition.media.*;
    . . . .
    Player player;
    try {
       player = Manager.createPlayer(*canvas ref*.getClass().getResourceAsStream("beep.amr"),"audio/amr");
       player.realize();
       player.prefetch();
    } catch (Exception e0) {}


To PLAY the wave-audio, ensure that you STOP and DEALLOCATE all other players:

  • try {
       player.stop();
    catch (Exception e1) {}

    try {
       player.deallocate();
    catch (Exception e2) {}
     

… and then play your required wave-audio with:

  • try {
       player.prefetch();
    catch (Exception e3) {}

    try {
       player.setMediaTime(0);
    catch (Exception e4) {}

    try {
       player.start();
    catch (Exception e5) {}


Note: Calling the start() method does NOT seem to cause any serious delays.  So you will NOT need to place it in a separate thread to the main game code.

To clean-up a wave-audio resource:

  • if (player != null) {
       try {
         player.close();
       } catch (Exception e6) {}
       player = null;
    }

- - -

Vibrate: Available.

Use the MIDP2 built-in display class command:

  • *display*.vibrate(duration); //duration is in milliseconds








Sagem myV65 and myV75

API: javax.microedition.media.*

Restriction: Only play 1 FX at a time.

NOTE: There does NOT seem to be any Player listeners implemented on this device, so you will need to create your own means of determining if the Player has finished using an elapsed time clock counter.

- - -

Melody: ***To be fully investigated***
Although it is possible to play MIDI files it is NOT 100% compatible.  For example: I have not been able to play drum tracks. I need to  investigate this in more depth and I will then write up my discoveries.

- - -

Wave Audio: Available – plays .WAV files (8bit, 8khz)

WARNING: The Sagem is extremely fussy about wave-audio.  You must only have 1 Player pre-fetched at any one time.

To LOAD a wave-audio:

  • import javax.microedition.media.*;
    . . . .
    Player player;
    try {
       player = Manager.createPlayer(*canvas ref*.getClass().getResourceAsStream("beep.wav"),"audio/x-wav");
       player.realize();
    } catch (Exception e0) {}


To PLAY the audio, ensure that you STOP and DEALLOCATE all other players:

  • try {
       player.stop();
    catch (Exception e1) {}

    try {
       player.deallocate();
    catch (Exception e2) {}

… and then play your required wave-audio with:

  • try {
       player.prefetch();
    catch (Exception e3) {}

    try {
       player.setMediaTime(0);
    catch (Exception e4) {}

    try {
       player.start();
    catch (Exception e5) {}


Note: Calling the stop(), deallocate(), prefetch() and start() methods does NOT seem to cause any serious delays.  So you will NOT need to place it in a separate thread to the main game code.

To clean-up a wave-audio resource:

  • if (player != null) {
       try {
         player.close();
       } catch (Exception e5) {}
       player = null;
    }

As I mentioned earlier, the Sagem device is extremely fussy about wave-audio, and so I have tried to catch every possible problem with an exception. Remove the try/catches if you dare, but don't be too surprised if you start getting unexpected crashes!

- - -

Vibrate: Not available.



Sharp GX family

Melody: Available - plays .mmf files

To play a melody, create a MIDI tune (format ZERO - max 4 channels) then use the Yamaha tool ATS-MA2-SMAF to convert it to .MMF format (get this from
http://smaf-yamaha.com/)
Also: download the .PDF documentation files, as they are very useful.

To LOAD melody:

  • static public void loadMelody() {
      try {
       byte[] data=readDataFromJar("/resources/tune.mmf"));
       if (data!=null) {
         mediaPlayer_tune=new MediaPlayer((byte[])null);
         mediaPlayer_tune.setMediaData(data);
       }
      } catch (Exception ex) {}
    }


To PLAY the melody, ensure that you STOP all other players:

  • static public void playMelody(int idx) {
      try {
       loadMelody();
       if (mediaPlayer_tune!=null)
         //boolean states if melody repeats forever
         mediaPlayer_tune.play(true);
      } catch (Exception ex) {}
    }

- - -

Wave Audio: Available - plays .mmf files

I use .WAV files and convert them to .mmf files which I create using the Yamaha tool called "WAV-SMAF" (download this from
http://smaf-yamaha.com/) 
Also: download the .PDF documentation files, as they are very useful.

To LOAD audio:

  • MediaPlayer[] mediaPlayer;
    String[] sounds={"sfx1.mmf","sfx2.mmf"};
    int numberOfSounds=sounds.length;
    …
    static public void loadAudio() {
         mediaPlayer=new MediaPlayer[numberOfSounds];
         Media media=new Media();
         byte[] data;
         for (int i = 0; i < numberOfSounds; i++) {
           try {
             data=readDataFromJar("/resources/" + sounds[i]);
             if (data!=null) {
               mediaPlayer[i]=new MediaPlayer((byte[])null);
               mediaPlayer[i].setMediaData(data);
               mediaPlayer[i].setMediaPlayerListener(media);
               Utility.hasSound = true;
             }
           } catch (Exception ex) {}
       }

    static public byte[] readDataFromJar(String name) {
       //get data from JAR resource
       ByteArrayOutputStream bout;
       InputStream in;
       byte[] res = null;
       try {
         in = *canvas ref*.getClass().getResourceAsStream(name);
         bout = new ByteArrayOutputStream();
         for (int ret = in.read(); ret >= 0; ret = in.read())
           bout.write(ret);
         res = bout.toByteArray();
       } catch (Exception e) {}
       return res;
      }
    }
     

To PLAY the audio:

  • //idx is the sound FX that you want to play
    mediaPlayer[idx].play();

- - -

Vibrate:

To initialise:

  • DeviceControl dc;
    …
    try {
       dc = DeviceControl.getDefaultDeviceControl();
    } catch (Exception ex) {}

To START vibrate:

  • if (dc!=null)
         dc.setDeviceActive(DeviceControl.VIBRATION, true);

To STOP vibrate:

  • if (dc!=null)
         dc.setDeviceActive(DeviceControl.VIBRATION, false);

I use a timer thread to delay switching OFF the vibrate.







Sony-Ericsson T6nn and Z600

API: javax.microedition.media.*

Restriction: Only play 1 FX at a time.

NOTE: You can add a listener that will inform you of Player events (e.g. Stopped - when Player finishes FX).  To do this use: player.addPlayerListener(*class*).  The specified *class* must implement PlayerListener.

To catch the Listener events, use the following method inside *class*:

  • public void playerUpdate(Player player, String event, Object obj) {
       //player indicates which Player caused the event
       //event informs you of event type
    }

- - -

Melody: Available - plays .mid files (format zero)

The great thing about MIDI files is that you can use your favourite professional audio sequencing package to create them. It's the standard of all standards in the music creation world.

To LOAD a MIDI file:

  • import javax.microedition.media.*;
    . . . .
    Player player;
    try {
       player = Manager.createPlayer(*canvas ref*.getClass().getResourceAsStream("melody.mid"),"audio/midi");
       player.realize();
    } catch (Exception e0) {}


To PLAY the melody, ensure that you STOP all other players:

  • try {
       if (player.getState() != Player.CLOSED)
         player.stop();
    catch (Exception e1) {}
     

… and then play your required melody with:

  • try {
       player.prefetch();
       player.setLoopCount(n); //n=number of times. -1=forever.
       player.start();
    catch (Exception e2) {}


Note: Calling the prefetch() method does NOT seem to cause any serious delays. So you will NOT need to place it in a separate thread to the main game code.

To clean-up a melody resource:

  • if (player != null) {
       try {
         player.close();
       } catch (Exception e3) {}
       player = null;
    }

- - -

Wave Audio: Available - plays .amr files (8 bit, rate can vary depending on quality required)

AMR files are a lot smaller than .WAV files. To create AMR files use the MIKSOFT Mobile AMR converter. Check it out at
www.miksoft.8m.com

Note: Many thanks to David Harries for revising the wave audio code.


To LOAD a wave-audio:

  • import javax.microedition.media.*;
    . . . .
    Player player;
    try {
       player = Manager.createPlayer(*canvas ref*.getClass().getResourceAsStream("beep.amr"),"audio/amr");
       player.realize();
    } catch (Exception e0) {}

    player.prefetch();


To PLAY the audio, ensure that you STOP all other players:

  • try {
       if (player.getState() != Player.PREFETCHED)
         player.stop();
    catch (Exception e1) {}
     

… and then play your required wave-audio with:

  • try {
       player.setLoopCount(1);
       player.start();
    catch (Exception e2) {}


Note: The prefetch() method does seem to take some time before calling back. So if you need to prefetch on the fly in a tight game loop you will need to place it in a separate thread to the main game code.

To clean-up a wave-audio resource:

  • if (player != null) {
       try {
         player.close();
       } catch (Exception e3) {}
       player = null;
    }

- - -

Vibrate: Available - using .imy file

To LOAD a Vibrate player:

  • import javax.microedition.media.*;
    . . . .
    Player player;
    try {
       player = Manager.createPlayer( *canvas ref*.getClass().getResourceAsStream("vibrate.imy"),"audio/iMelody");
       player.realize();
       player.prefetch();
    } catch (Exception e0) {}
     

The VIBRATE.IMY is a text file with the following lines of code (to change the vibration delay alter the settings in the MELODY line):

  • BEGIN:IMELODY
    VERSION:1.2
    FORMAT:CLASS1.0
    BEAT:200
    STYLE:S1
    MELODY:vibeonr5vibeoff
    END:IMELODY

To START the vibration, ensure that you STOP all other players:

  • try {
       if (player.getState() != Player.CLOSED)
         player.stop();
    catch (Exception e1) {}
     

… and then START the vibration with:

  • try {
       player.start();
    catch (Exception e2) {}


Note: Calling the start() method does NOT seem to cause any serious delays.  So you will NOT need to place it in a separate thread to the main game code.

To clean-up a vibration resource:

  • if (player != null) {
       try {
         player.close();
       } catch (Exception e3) {}
       player = null;
    }



高校技术转移办公室人员如何提升技术成果的推介效果和市场转化率?.docx 科易网基于AI模型+行业大数据,在技术转移、成果转化、技术经纪、知识产权、产业创新、科技招商等垂直领域的多样化应用场景,推出科技创新领域的AI+工具与数智化解决方案,推动科技创新与产业创新智能化发展。 立即下载

相关推荐

两相交错并联BuckBoost变换器仿真模型(Simulink仿真实现)

内容概要:本文档系统整合了电力电子与新能源领域的Simulink仿真资源,聚焦于两相交错并联Buck-Boost变换器的双闭环PWM控制建模与仿真,同时涵盖多种典型拓扑结构,包括交错并联Boost、PFC功率因数校正、LLC谐振变换器、双向CLLC、DAB变换器、VIENNA整流器等。资源体系完整,包含仿真模型、设计报告、计算书、PPT说明文档及Matlab/Python代码,覆盖从基础建模到高级控制策略(如软开关技术、谐波抑制、状态估计、双闭环控制)的全流程。此外,还拓展至状态估计(卡尔曼滤波、粒子滤波)、智能优化算法、机器学习、信号处理、路径规划等多个交叉学科方向,构建了一个面向科研与工程应用的综合性技术平台。; 适合人群:电气工程、自动化、电力电子、新能源科学与工程等专业的硕士博士研究生、高校科研人员,以及从事新能源发电、智能电网、电动汽车、电力传动等领域技术研发的工程师。; 使用场景及目标:①开展电力电子变换器(如Buck-Boost、LLC、DAB、PFC等)的建模、控制与仿真研究;②支撑课程设计、学位论文、科研项目中的系统仿真与算法验证;③学习并复现高水平期刊(如EI)提出的先进控制策略,如基于KKT条件的最优控制、扩展移相调制、恒压恒流双环竞争控制等;④结合智能算法(如粒子群、秃鹰算法)进行微电网调度、储能配置、路径规划等多目标优化问题的研究与快速原型开发。; 阅读建议:建议依据提供的资源目录循序渐进地查阅资料,优先选取与自身研究方向高度契合的内容进行深入学习;应结合仿真模型与配套文档动手实践,调试参数并分析结果,充分利用百度网盘与公众号渠道获取完整资源,提升科研工作的系统性、规范性与创新性。

Developers reference guide on creating audio

Developers reference guide on creating audio SFX, melodies and vibration on Nokia, Motorola, Sharp, Sagem and Sony mobile devices.IntroductionHow many times have you thought your software works on a

crazymens的专栏 1919

【基于Zernike矩的良性和恶性肿块的分类】应用于乳腺癌诊断中的快速相反权重学习规则(Matlab代码实现)

内容概要:本文详细介绍了基于Plecs软件构建的全桥LLC谐振变换器仿真模型,重点阐述了其在软开关技术条件下的建模方法与仿真分析过程。该模型能够精确模拟LLC谐振变换器在不同运行工况下的动态响应特性,涵盖开环与闭环控制策略的设计与实现,适用于研究变换器的效率优化、谐振参数匹配、系统稳定性及软开关性能等问题。相较于Simulink等传统仿真工具,Plecs在高频电力电子系统仿真中展现出更高的仿真速度与数值精度,尤其适合用于复杂电力电子拓扑的快速原型验证与优化设计。; 适合人群:具备扎实电力电子技术基础和仿真经验,从事高频功率变换器设计、新能源电源开发、电力电子系统研究的研发工程师及高校研究生。; 使用场景及目标:①深入理解全桥LLC谐振变换器的工作原理与软开关实现机制;②掌握在Plecs环境中搭建高精度、高效率电力电子系统仿真模型的方法;③开展变换器控制策略(如变频控制、闭环稳压)的仿真验证与参数优化;④为科研课题、学位论文或工业项目提供可靠的仿真平台与技术支持。; 阅读建议:建议结合相关电力电子教材与LLC变换器设计指南,深入掌握谐振参数计算与系统稳定性分析方法,并通过反复调试仿真模型,观察关键波形(如原边电流零点切换、副边整流波形),以全面理解软开关过程的物理本质与控制实现细节。

Android 手机录制wav格式音频文件实现

上一篇文章已经实现了在Android手机上使用MediaRecorder录音,但是后期在处理这些音频文件的时候发现3gp格式的音频不大方便处理,使用wav格式的音频处理起来更方便一些! 这里需要用到AudioRecord 类,通过 int android.media.AudioRecord.read(byte[] audioData, int offsetInBytes, int sizeInByt

Ricky 1万+

国产化办公新选择:在银河麒麟V10上部署ToDesk远程桌面

本文详细介绍了在国产操作系统银河麒麟V10上部署ToDesk远程桌面的完整指南。作为国产远程控制工具,ToDesk在连接速度、系统适配性和用户体验方面表现优异,特别适合国产化办公场景。文章包含X86和ARM架构的安装步骤、常见问题排查及性能优化技巧,帮助用户高效实现远程办公。

weixin_33742618的博客 232

实战指南:UOS专业版命令行高效下载离线安装包及依赖

本文提供了一份UOS专业版离线安装包的实战下载指南。针对无外网环境下的软件部署难题,详细介绍了如何通过命令行精准获取软件包名,并利用`apt download`命令高效下载主程序及其所有依赖。文章重点解析了使用`apt install --dry-run`模拟安装来完整获取依赖包的方法,并给出了离线安装、问题排查及自动化脚本编写等高级技巧,帮助管理员和运维人员实现可靠的批量离线部署。

honey的博客 1109

微信小程序拼图游戏性能优化实战:图片加载、拖拽交互与性能监控

在移动应用开发中,性能优化是提升用户体验的关键环节,其核心原理在于高效管理资源与流畅响应用户交互。对于依赖视觉和即时反馈的小程序游戏而言,优化技术价值尤为突出,直接关系到用户留存与满意度。通过实施图片资源的智慧加载策略,如结合预加载与懒加载的平衡术,并采用CSS3变换替代Canvas渲染以简化交互处理,开发者能有效解决首屏白屏与滑动卡顿等常见性能瓶颈。这些优化手段广泛应用于对实时性要求高的交互场景,例如拼图游戏中的碎片拖拽与智能吸附功能。本文聚焦微信小程序生态,深入探讨如何利用requestAnimatio

aoe41606的博客 517

保姆级教程:用AdGuard DNS代理实现全设备广告过滤(含Win/Mac/安卓/iOS配置)

本文提供了一份详尽的AdGuard DNS代理配置指南,帮助用户在全设备(Win/Mac/安卓/iOS)上实现广告过滤。通过系统级DNS设置,AdGuard能有效拦截广告、跟踪器和恶意网站,提升隐私保护和浏览效率。教程涵盖原理说明、各平台配置步骤及高级优化技巧,适合不同技术水平的用户。

weixin_42656416的博客 819

WindowsPhone8常见问题及使用技巧

很多初次使用WP8手机的机友们想必和小编当初一样,初次上手会刚到非常不适应,这么多的大方块排列到一起感觉实在不习惯,但经过一段时间的使用后会发现WP8的很多不同之处,今天新锋网小编就要与大家分享WP8的日常使用技巧,助您玩机更轻松!   支持的音频格式:   播放: .aac, .amr, .ogg, .m4a, .mid, .mp3, .wav, .wma Lossless 录音: .am

编程岁月 1174

手势控制 Python !Leap Motion Python 开发教程 (二)

手势控制 Python !Leap Motion Python 开发教程 (二) 现在进入正题,我来给大家总结一下我在使用 Leap Motion 开发过程中的经验以及学到的东西,其中我会概括以及翻译官方给出的注释,为了让这些注释更加通俗易懂,让大家更好理解。 回顾 在上一篇文章中我们讲了如何配置 Leap Motion 的 Python 2.7 的开发环境,如果您还没有配置好您的开发环境,可以参...

成畅的博客 3192

6、探索音乐结构中的统一性:贝多芬《英雄交响曲》第一乐章的深度剖析

本文深入剖析了贝多芬《英雄交响曲》第一乐章的音乐结构,探讨其统一性的来源及表现形式。通过主题与动机、和声与调性、旋律与节奏、织体与动态等多方面的分析,揭示了这部作品在技术层面和情感表达上的卓越成就。

b9c0d的博客 518

Cocos基础概念知识

【架构透视与数据流向图解】Cocos Creator 3.x 引入了高度可定制的现代渲染管线(Render Pipeline),支持跨平台的高性能图形渲染。其工作原理可以抽象为一个从“逻辑数据”到“屏幕像素”的数据流转换过程。【工作原理数据流图】场景图 (Scene Graph)➔渲染收集 (RenderFlow)➔渲染队列 (RenderQueue)➔渲染管线 (RenderPipeline)➔图形 API (WebGL/Vulkan)1. 场景漫游与数据收集(RenderFlow)

qq_52269550的博客 562

AutoSAR配置与实践(基础篇)3.2 BSW中的I/O架构和模块详解

车门位置传感器(Sensor SWC)输出的电流信号经过了一系列处理,如先被转化为电压信号,后又经ADC转换为数字信号,但是IoHwAb模块对上层隐藏了这一系列处理过程,并将数据直接抽象为它的输出接口,即车门开关状态接口。Sensor SWC 使用RTE接口直接从IoHwAb模块封装的车门开关状态,SWC它并不关心ECU硬件是如何实现的传感器电流采集,也不关心MCU ADC采样精度(如10/12位)IoHwAb把采集的电压抽象为开关状态,使得Sensor SWC不依赖具体的ECU硬件。

nihaoljq2010的博客 1300

getPixel()和getRGB()的问题

用DirectGraphics.getPixels(int[] ..., TYPE_INT_xxxx_xxxx) 得到的颜色值不准确。因为nokia的手机内部使用的是TYPE_USHORT_565_RGB的格式,在getPixels(int[])时需要进行映射。更严重的是,不同位置的同种颜色的点,get出来的颜色值也可能不一样(遇到过了这种情况,但还没发现规律。如果你知道,请告诉我:)。比如白色(

Mobile Game 2501

手把手教你学 AI芯片 SOC软件开发专栏简介

在AI芯片(如NPU、GPU加速器)爆发式增长的今天,软件栈开发已成为AI应用落地的核心瓶颈。无论是模型推理加速、低延迟部署,还是能效优化,都依赖于对芯片底层软件的深度掌握。然而,许多开发者困于“只会调用API,不懂驱动实现”的困境,导致性能瓶颈难以突破。本专栏《手把手教你学 AI芯片 SOC软件开发》专为AI工程师、嵌入式开发者及系统架构师打造,从零基础切入,系统拆解AI芯片SOC(System on Chip)的完整软件栈,覆盖Runtime(运行时)

MHD0815的博客 169

12. Web安全—渗透测试用例—敏感信息泄漏

12. Web安全—渗透测试用例—敏感信息泄漏

weixin_43567873的博客 412

Nokia资源文件路径的问题

如果jar包里有一个资源文件,路径为 "/test/abc.ext"那么可以用以下方式中都可以把这个文件读进来:getClass().getResourceAsStream("/test/abc.ext");getClass().getResourceAsStream("st/abc.ext");getClass().getResourceAsStream("abc.ext");getClass(

Mobile Game 2123

老版QQ原生表情gif动态

这是老版的QQ表情,不过全是动态的的,Windows照片查看器是不会动的,可以右击用浏览器打开查看,再说一遍是老版的,只是分享给宁愿用老版也要动态的人。

UTF-8 Decoder & Encoder

有的手机不支持utf8. 需要时直接copy。 UTF-8 Decoder:String decode(byte[] b,int start,int len) {    StringBuffer s = new StringBuffer();    int end = start + len;    for (int i = start; i         byte b = b[i++];   

Mobile Game 1742

ET2012新版免狗免安装绿色软件

ET2012新版免狗免安祖昂绿色软件。,新界面,新视觉,

win10 跳过U8环境检测的IE WebControls.rar

win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。

GameCanvas全屏尺寸的问题

很多人都问过我这个问题,解释了很多遍,干脆写出来。Q: 为什么我在setFullScreenMode(true)后,调用getWidth(),getHeight()得到的屏幕尺寸比实际尺寸小?A: 因为当Canvas没有被显示时,调用setFullScreenMode(true)后,并不会立即生效。在生效过后,系统会回调sizeChanged(int w, int h) 来通知屏幕大小已经改变。p

Mobile Game 1686

android 蓝牙通讯demo

android 下蓝牙通讯demo,实现了发现蓝牙,使能蓝牙,通过蓝牙发送消息。

byte的值也能是-255??

游戏中有个奇怪的bug,通过输出无数信息,终于定位到了问题所在。发现是输出的一个byte变量的值是-255...static byte actionId;static String msg;static void method1(){    msg = "actionId1:"+actionId;    method2();}static void method2(){   msg += " ac

Mobile Game 1606

PNG图像压缩

有的图片,旋转90度过后再压缩会小很多,这个方法是根据filter想到的,因为filter是按行的。用bad的png压缩, 银月那把剑,横着压出来3016B, 竖着只有2625B。

Mobile Game 1288

translate() 和 DirectGraphics 的问题

忘了什么问题了。发现再写。

Mobile Game 1180

利用GameCanvas的offscreen_buffer

MIDP2.0增加了GameCanvas类,其中包含了一个offscreen_buffer,可以随时调用flushGraphics()来把它画到屏幕上,游戏的结构也可以变得简单一些。但是,为了移植方便,大多数时候还是用的MIDP1.0的结构。GameCanvas中是这样定义的:private Image offscreen_buffer;我们无法得到这个Image的reference,但是可以通过

Mobile Game 1174

用Proguard混淆后出现Preverify Error的解决办法

在proguard的参数中加上:-dontusemixedcaseclassnames因为windows文件名是大小写无关的. 如果还是不行,可以试试 -dontoptimize另外还有其他可选参数:-overloadaggressively-allowaccessmodification

Mobile Game 1161

当我们把一个Image画到它本身上面...

当我们把一个Image画到它本身上面,会出现什么情况呢?如下例子:Image img = Image.createImage(100,50);Graphics g = img.getGraphics();g.setColor(0xff0000);g.fillrect(0,0,10,10);g.drawImage(img,dx=10,dy=10,0);也许,结果和你预想的有所不同。原因很简单,由于源

Mobile Game 1078
上一篇: UTF-8 Decoder & Encoder
下一篇: 当我们把一个Image画到它本身上面...
Timium
博客等级 码龄22年 0粉丝 16原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值