⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 instrumentchannel.java

📁 又是一款j2me 游戏
💻 JAVA
字号:
// Decompiled by DJ v3.7.7.81 Copyright 2004 Atanas Neshkov  Date: 2005-4-9 12:51:47
// Home Page : http://members.fortunecity.com/neshkov/dj.html  - Check often for new version!
// Decompiler options: packimports(3)
// Source File Name:   InstrumentChannel.java

package girl60;

import com.nokia.mid.sound.Sound;

public class InstrumentChannel
{

    public InstrumentChannel(byte music[], int soundFormat)
    {
        soundCH = null;
        musicCH = null;
        this.soundFormat = 1;
        musicCH = music;
        soundCH = new Sound(musicCH, soundFormat);
        this.soundFormat = soundFormat;
    }

    public void Initial(byte music[], int soundFormat)
    {
        musicCH = music;
        soundCH.init(musicCH, soundFormat);
        this.soundFormat = soundFormat;
    }

    public void Play(int loop)
    {
        soundCH.play(loop);
    }

    public void Stop()
    {
        soundCH.stop();
        soundCH.init(musicCH, soundFormat);
    }

    public void Pause()
    {
        if(soundCH != null)
            soundCH.stop();
    }

    public void Resume()
    {
        if(soundCH != null)
            soundCH.resume();
    }

    public void SetVolume(int level)
    {
        soundCH.setGain(level);
    }

    public int GetVolume()
    {
        return soundCH.getGain();
    }

    private Sound soundCH;
    private byte musicCH[];
    private int soundFormat;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -