Playback of MOD (tracker) files

  ... the .MOD Player Extension for AndEngine.

Re: Playback of MOD (tracker) files

Postby alex » Thu Jul 08, 2010 6:51 pm

WoW! that is good news !

copying to the /mnt/sdram/ folder is no problem. I plan to do this whilst showing the splash screen (instead of waiting two seconds and not doing a lot, lets give the computer something to do :-))

developer.andoid.com has some good info on this:
http://developer.android.com/guide/topi ... esExternal

in their Resources sample code, the "API Demos" gives a good example using Android API 8 to copy from resources to sdram
alex
 
Posts: 275
Joined: Thu Jul 01, 2010 8:21 pm

Re: Playback of MOD (tracker) files

Postby Nicolas Gramlich » Thu Jul 08, 2010 10:54 pm

Hi Alex,

check out the new ModPlayerExample. It copies from the assets to the SDCard and plays it from there.

Best Regards,
Nicolas
Nicolas Gramlich
Site Admin
 
Posts: 1734
Joined: Mon Jun 07, 2010 6:20 pm
Location: Schriesheim, Germany

Re: Playback of MOD (tracker) files

Postby alex » Fri Jul 09, 2010 3:17 am

that's very awesome. I'm blown away how fast you've added that to the engine.

I have a question: when running in the emulator, do you see ModPlayer.getInstance() failing ?


EDIT:
I found it! I needed to add the libxmp.so file :-)
alex
 
Posts: 275
Joined: Thu Jul 01, 2010 8:21 pm

Re: Playback of MOD (tracker) files

Postby Nicolas Gramlich » Fri Jul 09, 2010 11:23 am

Actually I didn't have to change a lot :) Their team did most of thw work, all I had to do is get it to compile.

Best Regards,
Nicolas
Nicolas Gramlich
Site Admin
 
Posts: 1734
Joined: Mon Jun 07, 2010 6:20 pm
Location: Schriesheim, Germany

Re: Playback of MOD (tracker) files

Postby Shadaez » Sat Aug 14, 2010 7:15 am

I'm having an error using modplayer code, with the aSync thing.

Description Resource Path Location Type
The method doAsync(int, int, Callable<T>, Callback<T>) in the type BaseActivity is not applicable for the arguments (int, int, new Callable<Void>(){}, new Callback<Void>(){}) Lithosic.java /Lithosic/src/com/designsomething/lithosic line 129 Java Problem

Any help? I'm using the most up to date AndEngine to my knowledge.
Shadaez
 
Posts: 15
Joined: Sat Aug 14, 2010 7:12 am

Re: Playback of MOD (tracker) files

Postby Nicolas Gramlich » Sat Aug 14, 2010 10:25 am

Erm the signature of the method looks correct.

Best Regards,
Nicolas
Nicolas Gramlich
Site Admin
 
Posts: 1734
Joined: Mon Jun 07, 2010 6:20 pm
Location: Schriesheim, Germany

Re: Playback of MOD (tracker) files

Postby Shadaez » Sat Aug 14, 2010 11:00 am

The line's
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. this.doAsync(R.string.dialog_modplayerexample_loading_to_external_title, R.string.dialog_modplayerexample_loading_to_external_message, new Callable<Void>() {
  2.         @Override
  3.         public Void call() throws Exception {
  4.                 FileUtils.ensureDirectoriesExistOnExternalStorage(Lithosic.this, "sfx");
  5.                 FileUtils.copyToExternalStorage(Lithosic.this, SAMPLE_MOD_FILENAME, SAMPLE_MOD_FILENAME);
  6.                 return null;
  7.         }
  8. }, new Callback<Void>() {
  9.         @Override
  10.         public void onCallback(final Void pCallbackValue) {
  11.                 Lithosic.this.startPlayingMod();
  12.         }
  13. });
Parsed in 0.011 seconds, using GeSHi 1.0.8.4

taken almost directly from the example.
Shadaez
 
Posts: 15
Joined: Sat Aug 14, 2010 7:12 am

Re: Playback of MOD (tracker) files

Postby Shadaez » Sat Aug 14, 2010 11:03 am

And yeah, I put the strings in the res/strings folder. Sorry if there's something obviously and stupidly wrong, I'm pretty new to programming still.
Shadaez
 
Posts: 15
Joined: Sat Aug 14, 2010 7:12 am

Re: Playback of MOD (tracker) files

Postby Nicolas Gramlich » Sat Aug 14, 2010 12:20 pm

Hm..

  1. did you import the "Void" class ?
  2. Does it show an error if you do:
    Syntax: [ Download ] [ Hide ]
    Using java Syntax Highlighting
    1. int r = R.string.dialog_modplayerexample_loading_to_external_title;
    Parsed in 0.011 seconds, using GeSHi 1.0.8.4

Best Regards,
Nicolas
Nicolas Gramlich
Site Admin
 
Posts: 1734
Joined: Mon Jun 07, 2010 6:20 pm
Location: Schriesheim, Germany

Re: Playback of MOD (tracker) files

Postby Shadaez » Sat Aug 14, 2010 12:49 pm

NVM, It's still broke, and whats the Void import? and #2 works fine.
Shadaez
 
Posts: 15
Joined: Sat Aug 14, 2010 7:12 am

PreviousNext

Return to .MOD-Player

Who is online

Users browsing this forum: No registered users and 2 guests