instrumentchannel.java

来自「又是一款j2me 游戏」· Java 代码 · 共 67 行

JAVA
67
字号
// 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 + =
减小字号Ctrl + -
显示快捷键?