@@ -0,0 +1,2174 @@
+/*%0A * To change this template, choose Tools %7C Templates%0A * and open the template in the editor.%0A */%0Apackage org.game.runner.manager;%0A%0Aimport java.io.IOException;%0Aimport java.util.logging.Level;%0Aimport java.util.logging.Logger;%0Aimport org.andengine.engine.Engine;%0Aimport org.andengine.util.FileUtils;%0Aimport org.game.runner.GameActivity;%0Aimport org.helllabs.android.xmp.ModPlayer;%0A%0A/**%0A *%0A * @author Karl%0A */%0Apublic class AudioManager %7B%0A    private static final AudioManager INSTANCE = new AudioManager();%0A    %0A    private Engine engine = ResourcesManager.getInstance().engine;%0A    private GameActivity activity = ResourcesManager.getInstance().activity;%0A    %0A    private final ModPlayer mModPlayer = ModPlayer.getInstance();%0A    private boolean looping = true;%0A    %0A    public void prepareModFile(final String dir, final String file)%7B%0A        if(FileUtils.isExternalStorageReadable() && FileUtils.isExternalStorageWriteable() && !FileUtils.isFileExistingOnExternalStorage(this.activity, dir + file)) %7B%0A            AudioManager.this.activity.runOnUiThread(new Runnable() %7B%0A                @Override%0A                public void run() %7B%0A                    try %7B%0A                        FileUtils.ensureDirectoriesExistOnExternalStorage(AudioManager.this.activity, dir);%0A                        FileUtils.copyToExternalStorage(AudioManager.this.activity, dir + file, dir + file);%0A                    %7D catch (IOException ex) %7B%0A                        Logger.getLogger(GameActivity.class.getName()).log(Level.SEVERE, null, ex);%0A                    %7D%0A                %7D%0A            %7D);%0A        %7D%0A    %7D%0A    %0A    public void playModFile(final String dir, final String file)%7B%0A        if(FileUtils.isExternalStorageReadable())%7B%0A            if(!FileUtils.isFileExistingOnExternalStorage(this.activity, dir + file))%7B%0A                this.prepareModFile(dir, file);%0A            %7D%0A            this.mModPlayer.play(FileUtils.getAbsolutePathOnExternalStorage(this.activity, dir + file), this.looping);%0A        %7D%0A    %7D%0A    %0A    public void setLooping(boolean looping)%7B%0A        this.looping = looping;%0A    %7D%0A    %0A    public static AudioManager getInstance()%7B%0A        return INSTANCE;%0A    %7D%0A%7D%0A

Add bases of Audio manager