View previous topic :: View next topic |
Author |
Message |
flash
Joined: 23 Aug 2009 Posts: 3
|
Posted: Sun Aug 23, 2009 8:43 am Post subject: Using libXM7 with IPC??? |
|
|
Is there a version (older) of libXM7 that uses libnds's original ipc system rather than FIFO?
I don't want to use libnds in a project I am working on as this is coded almost entirerly in ASM, thus IPC would be a great advantage and enable me to use this for all my xm playing needs...
Thanks in advance |
|
Back to top |
|
 |
sverx Site Admin

Joined: 04 Jun 2009 Posts: 108
|
Posted: Mon Aug 24, 2009 8:27 am Post subject: Re: Using libXM7 with IPC??? |
|
|
libXM7 doesn't make use of no IPC neither FIFO, so it's up to you to choose the way the two processors will communicate.
Since you aren't using libnds at all, I think you can build up a simple (one way) ARM9->ARM7 connection using NDS' IPC channel.
So on the ARM9 side you'll load your XM (from memory or even from filesystem) and you'll just communicate to the ARM7 where the XM has been loaded. |
|
Back to top |
|
 |
flash
Joined: 23 Aug 2009 Posts: 3
|
Posted: Tue Aug 25, 2009 7:39 pm Post subject: |
|
|
Thanks for your help.. I should have looked more rather than posting.. sorry.
All works now, except...
When I fire sfx through ipc, using reserved channels 0-7 (the xm is only 6 channels), the music appears to slow down and get a bit messed up?
Any ideas? |
|
Back to top |
|
 |
sverx Site Admin

Joined: 04 Jun 2009 Posts: 108
|
Posted: Wed Aug 26, 2009 7:55 am Post subject: |
|
|
flash wrote: | When I fire sfx through ipc, using reserved channels 0-7 (the xm is only 6 channels), the music appears to slow down and get a bit messed up?
Any ideas? |
If you're using latest libXM7 (that is 1.00, actually) then your 6 channels XM tune is playing on NDS hardware channels 10 thru 15, and if you use channels 0 thru 9 for sound effects there shouldn't be any problem (the mixing among all the hardware channels is performed by the hardware itself)
btw with "slow down" do you mean the tune of the notes is also lowered? and with "messed up" do you mean that there's distortion (clipping)?
(as you see, in short, I haven't got any good idea ) |
|
Back to top |
|
 |
flash
Joined: 23 Aug 2009 Posts: 3
|
Posted: Wed Aug 26, 2009 5:32 pm Post subject: |
|
|
I think I have it sorted out now... Well... LOL
Somehow, I was junking the fx for the jump to channel 15? I have now set them to set channels and left libxm7 to the remaining channels and all seems to be fine..
Well...
If i restart the music several times quickly - I can mess the music up.. Ha ha.. Though this will never happen when the game is done, I am sure a flush will sort it out.
Thanks for your continued help! |
|
Back to top |
|
 |
sverx Site Admin

Joined: 04 Jun 2009 Posts: 108
|
Posted: Thu Aug 27, 2009 8:12 am Post subject: |
|
|
flash wrote: | If i restart the music several times quickly - I can mess the music up... |
mmm... that's strange. Are you restarting music by calling XM7_StopModule () before issuing XM7_PlayModule() again?
I'm going to investigate more on that. |
|
Back to top |
|
 |
|