The sound processing in the mobile game is detailed

Source: Internet
Author: User
Tags data structures

This article is in the same game to transplant in different models of the sound processing, taking into account the performance requirements, for each type of mobile phone to make certain requirements.

Sound processing in S40:

1)import com.nokia.mid.sound.*;

2)Sound soundPlayer;
void initSound(){
soundPlayer = new Sound(b_main,1);
if(m_playSound == 1)
}

3)byte[] b_main = ;

4)static int m_playSound = 1;

5 control of the sound in the programm_playSound = (byte)(1 - m_playSound);
if(m_playSound == 1) catch(Exception e){}
}
if(m_playSound == 0) catch(Exception e){}
}

Use the Ott file in Nokia 40 or 60.

1) Defining Data structures

public class EMSound
{
public int type;
public byte[] data;
public EMSound(byte[] data, int type)
{
this.type = type;
this.data = data;
}
}

2)import com.nokia.mid.ui.*;
import com.nokia.mid.sound.*;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.