forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Mikmod make file?

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
Art



Joined: 09 Nov 2005
Posts: 647

PostPosted: Sat Apr 22, 2006 3:43 pm    Post subject: Mikmod make file? Reply with quote

Hi guys,
Does anyone have an example of a mikmod make file where they have
actually used it in a program?
I have the six include files in my project directory, and include "mikmod.h"
in my source code, but the example code to get a wav to play makes errors.
Thanx.
Art.
Back to top
View user's profile Send private message
Art



Joined: 09 Nov 2005
Posts: 647

PostPosted: Sat Apr 22, 2006 3:48 pm    Post subject: Reply with quote

I have a feeling that if I use this:
Code:

# MikMod Library Makefile for DJGPP Linux
# Divine Entertainment Game Programming Pack


####################
### User Options ###
####################

# Use the C or C++ compiler
CC                = gcc
CFLAGS  = -O2 -I. -I../include -g -DOSS

Lib_file          = ../lib/libmikmod.a

LoaderObjs        = mloader.o mlreg.o npertab.o sloader.o load_uni.o \
    load_mod.o load_m15.o load_mtm.o load_s3m.o load_stm.o load_669.o \
    load_far.o load_dsm.o load_med.o load_xm.o load_ult.o load_it.o \
    s3m_it.o

DriverObjs        = mdriver.o mdreg.o drv_nos.o drv_raw.o drv_wav.o \
   unix_drv/drv_oss.o
# unix_drv/drv_AF.o unix_drv/drv_aix.o unix_drv/drv_hp.o
# unix_drv/drv_sun.o unix_drv/drv_sgi.o

PlayerObjs        = mplayer.o

####################
## Makefile rules ##
####################

all: $(Lib_file)

$(Lib_file): stream.o virtch.o munitrk.o \
   $(LoaderObjs) $(DriverObjs) $(PlayerObjs)
   ar r $(Lib_file) stream.o virtch.o munitrk.o \
        $(LoaderObjs) $(PlayerObjs) $(DriverObjs)

clean:
   rm -f *.o
   rm -f unix_drv/*.o
   rm -f $(Lib_file)

my program will stop working.
Back to top
View user's profile Send private message
Samstag



Joined: 24 Nov 2005
Posts: 5

PostPosted: Sat Apr 22, 2006 9:59 pm    Post subject: Reply with quote

What specific problem are you having with the example program? If it's a runtime "can't open" error it's most likely because sound.wav is expected to be in the root of the memory stick. Either put it there or change "ms0:/sound.wav" to just "sound.wav" and put the file in the libmikmodtest folder.

When adding support to your own programs all you need to do is make sure you've got -lmikmod and -lpspaudio in the "LIBS=" section of your makefile and add #include "mikmod.h" to your C code.
Back to top
View user's profile Send private message
Art



Joined: 09 Nov 2005
Posts: 647

PostPosted: Sun Apr 23, 2006 1:47 am    Post subject: Reply with quote

Ok, thanx, I'll have another go with it tomorrow starting fresh :)
Back to top
View user's profile Send private message
Art



Joined: 09 Nov 2005
Posts: 647

PostPosted: Sun Apr 30, 2006 3:54 pm    Post subject: Reply with quote

I wonder if anyone could help with a new Mikmod problem?
The modules I play are much louder than the samples I'm using.
Code:

vol = 35;
Voice_SetVolume(voice, vol);

There's no problem adjusting the volume of samples with the above,
but how do I lower the volume of the music?
Cheers, Art.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group