Playing Sounds June 08, 2009 12:30PM | Registered: 16 years ago Posts: 384 |
Re: Playing Sounds June 08, 2009 02:50PM | Registered: 16 years ago Posts: 265 |
Re: Playing Sounds June 08, 2009 06:06PM | Admin Registered: 16 years ago Posts: 5,132 |
Re: Playing Sounds June 08, 2009 08:27PM | Registered: 16 years ago Posts: 384 |
Re: Playing Sounds June 09, 2009 07:04AM | Registered: 16 years ago Posts: 441 |
Re: Playing Sounds June 09, 2009 09:34PM | Registered: 16 years ago Posts: 703 |
Re: Playing Sounds June 09, 2009 11:35PM | Registered: 16 years ago Posts: 265 |
Re: Playing Sounds June 11, 2009 03:02PM | Registered: 16 years ago Posts: 384 |
Re: Playing Sounds June 12, 2009 11:06AM | Registered: 15 years ago Posts: 83 |
Quote
profetylen
Do I have to modify the makefile?
#--------------------------------------------------------------------------------- # This rule links in binary data with the .ogg extension #--------------------------------------------------------------------------------- %.ogg.o : %.ogg #--------------------------------------------------------------------------------- @echo $(notdir $<) $(bin2o) -include $(DEPENDS)
Re: Playing Sounds June 12, 2009 11:42AM | Registered: 16 years ago Posts: 265 |
Re: Playing Sounds June 12, 2009 07:44PM | Registered: 16 years ago Posts: 384 |
Re: Playing Sounds June 13, 2009 09:16AM | Registered: 15 years ago Posts: 83 |
Quote
profetylen
@RazorChrist Ok! Where can I find the information about what lib should be added?
LIBS := -lasnd -lmadI think....can't remember. That's just the two sound libs that are in my project. Then again, I'm using .mp3. Try adding those, and if anyone else has more info, or if I come across more detailed info, I'll post it.
Re: Playing Sounds June 13, 2009 09:34AM | Registered: 16 years ago Posts: 441 |
Re: Playing Sounds June 14, 2009 01:39PM | Registered: 16 years ago Posts: 384 |
#--------------------------------------------------------------------------------- # This rule links in binary data with the .ogg extension #--------------------------------------------------------------------------------- %.ogg.o : %.ogg #--------------------------------------------------------------------------------- @echo $(notdir $<) $(bin2o) -include $(DEPENDS)But, as I mentioned, I don't know how to get access to the sound buffer (or what it is...).
Re: Playing Sounds June 14, 2009 07:59PM | Registered: 16 years ago Posts: 441 |
Re: Playing Sounds June 14, 2009 08:33PM | Registered: 16 years ago Posts: 384 |
#--------------------------------------------------------------------------------- # Clear the implicit built in rules #--------------------------------------------------------------------------------- .SUFFIXES: #--------------------------------------------------------------------------------- ifeq ($(strip $(DEVKITPPC)),) $(error "Please set DEVKITPPC in your environment. export DEVKITPPC=devkitPPC) endif include $(DEVKITPPC)/wii_rules #--------------------------------------------------------------------------------- # TARGET is the name of the output # BUILD is the directory where object files & intermediate files will be placed # SOURCES is a list of directories containing source code # INCLUDES is a list of directories containing extra header files #--------------------------------------------------------------------------------- GRRLIB := source/GRRLIB TARGET := $(notdir $(CURDIR)) BUILD := build SOURCES := source source/gfx $(GRRLIB)/GRRLIB $(GRRLIB)/lib/libpng/pngu DATA := data INCLUDES := #--------------------------------------------------------------------------------- # options for code generation #--------------------------------------------------------------------------------- CFLAGS = -g -O2 -mrvl -Wall $(MACHDEP) $(INCLUDE) CXXFLAGS = $(CFLAGS) LDFLAGS = -g $(MACHDEP) -mrvl -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- LIBS := -lpng -ljpeg -lz -lfat -lwiiuse -lbte -lfat -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing # include and lib #--------------------------------------------------------------------------------- LIBDIRS := $(CURDIR)/$(GRRLIB) #--------------------------------------------------------------------------------- # no real need to edit anything past this point unless you need to add additional # rules for different file extensions #--------------------------------------------------------------------------------- ifneq ($(BUILD),$(notdir $(CURDIR))) #--------------------------------------------------------------------------------- export OUTPUT := $(CURDIR)/$(TARGET) export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \ $(foreach dir,$(DATA),$(CURDIR)/$(dir)) export DEPSDIR := $(CURDIR)/$(BUILD) #--------------------------------------------------------------------------------- # automatically build a list of object files for our project #--------------------------------------------------------------------------------- CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c))) CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp))) sFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s))) SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.S))) BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*))) #--------------------------------------------------------------------------------- # use CXX for linking C++ projects, CC for standard C #--------------------------------------------------------------------------------- ifeq ($(strip $(CPPFILES)),) export LD := $(CC) else export LD := $(CXX) endif export OFILES := $(addsuffix .o,$(BINFILES)) \ $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) \ $(sFILES:.s=.o) $(SFILES:.S=.o) #--------------------------------------------------------------------------------- # build a list of include paths #--------------------------------------------------------------------------------- export INCLUDE := $(foreach dir,$(INCLUDES), -iquote $(CURDIR)/$(dir)) \ $(foreach dir,$(LIBDIRS),-I$(dir)/include) \ -I$(CURDIR)/$(BUILD) \ -I$(LIBOGC_INC) #--------------------------------------------------------------------------------- # build a list of library paths #--------------------------------------------------------------------------------- export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) \ -L$(LIBOGC_LIB) export OUTPUT := $(CURDIR)/$(TARGET) .PHONY: $(BUILD) clean #--------------------------------------------------------------------------------- $(BUILD): @[ -d $@ ] || mkdir -p $@ @make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile #--------------------------------------------------------------------------------- clean: @echo clean ... @rm -fr $(BUILD) $(OUTPUT).elf $(OUTPUT).dol #--------------------------------------------------------------------------------- run: wiiload $(TARGET).dol #--------------------------------------------------------------------------------- reload: psoload -r $(TARGET).dol #--------------------------------------------------------------------------------- else DEPENDS := $(OFILES:.o=.d) #--------------------------------------------------------------------------------- # main targets #--------------------------------------------------------------------------------- $(OUTPUT).dol: $(OUTPUT).elf $(OUTPUT).elf: $(OFILES) #--------------------------------------------------------------------------------- # This rule links in binary data with the .jpg extension #--------------------------------------------------------------------------------- %.jpg.o : %.jpg #--------------------------------------------------------------------------------- @echo $(notdir $<) $(bin2o) #-include $(DEPENDS) #--------------------------------------------------------------------------------- # This rule links in binary data with the .ogg extension #--------------------------------------------------------------------------------- %.ogg.o : %.ogg #--------------------------------------------------------------------------------- @echo $(notdir $<) $(bin2o) -include $(DEPENDS) #--------------------------------------------------------------------------------- endif #---------------------------------------------------------------------------------
Re: Playing Sounds June 14, 2009 11:17PM | Registered: 16 years ago Posts: 265 |
Re: Playing Sounds June 15, 2009 01:20AM | Registered: 16 years ago Posts: 384 |
PlayOgg(mem_open((char *)bg_music_ogg,bg_music_ogg.length), 0, OGG_INFINITE_TIME);
Re: Playing Sounds June 15, 2009 11:53AM | Registered: 16 years ago Posts: 276 |
OGGFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.ogg)))
export OFILES := $(addsuffix .o,$(BINFILES)) \ $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) \ $(sFILES:.s=.o) $(SFILES:.S=.o)
export OFILES := $(addsuffix .o,$(BINFILES)) \ $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) \ $(sFILES:.s=.o) $(SFILES:.S=.o) $(OGGFILES:.ogg=.ogg.o
PlayOgg(mem_open((char *)bg_music_ogg,C), 0, OGG_INFINITE_TIME);
PlayOgg(mem_open((char *)bg_music_ogg,bg_music_ogg_size), 0, OGG_INFINITE_TIME);
Re: Playing Sounds June 15, 2009 06:39PM | Registered: 15 years ago Posts: 36 |