View Full Version : Audio in SDL
psiko_scweek
October 15th, 2006, 19:52
Alright maybe im retarded I dont know...
I know when you install SDL_mixer it installs LibTimidity and MilkMod.
Now in order to play a Midi or a mod file, do you have to include those libraries into your makefile, if so how? if not, then how can you get a midi or mod to play in SDL!??
lol thanks
psiko
oh yeah i searched everyhere and i could not find anything on this! lol so I figured id ask the experts!
yaustar
October 15th, 2006, 20:04
IIRC, you need to link mikmod libraries in the same way that you link other libraries to play midi or mod files in SDL.
You must be linking the SDL, SDL_image and SDL_mixer libraries for it to compile and run so you link the mikmod libraries the same way.
Yessy2952
October 15th, 2006, 20:41
What in the world is SDL lol
psiko_scweek
October 15th, 2006, 21:15
Yessy2952, SDL stands for Simple Direct Layer, its a programming layer thats been ported to a bunch of platforms.
Yaustar, thats what i figured! but I dont know how to link to them. Does any one know how? :-(
yaustar
October 15th, 2006, 21:30
You link them in EXACTLY the same way as you do with any other library.
TARGET = Select Square
OBJS = main.o
YOURLIBS=
INCDIR =
CFLAGS = -G4 -Wall -O2
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
LIBDIR =
LDFLAGS =
STDLIBS= -lSDL -lSDL_image -lSDL_mixer -lmikmod -lpng -lm -lz -lpspsdk -lpspctrl -lpspumd -lpsprtc -lpsppower -lpspgu -lpspaudiolib -lpspaudio -lm
LIBS=$(STDLIBS)$(YOURLIBS)
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = SelectPSP
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
psiko_scweek
October 15th, 2006, 23:48
lol i sense the hostility, but the reason i ask is i figured that was the answer, but
when i change my makefile to:
LIBS = -lstdc++ -lSDL_mixer -lvorbisidec -lmikmod -lSDL_image -lpng -lz -ljpeg $(shell $(PSPBIN)/sdl-config --libs) -lc
it states that it cannot find "lmikmod"
maybe it didnt install correctly to SDL_mixer, or am i linking to it wrong?
(btw, the only reason I ask is cayse I added -lmikmod to my make file and got an error so I assumed i was doing wrong)
yaustar
October 16th, 2006, 10:36
Check the directory for the mikmod library file. If it isn't there you need to install it.
Percival
October 19th, 2006, 00:30
I didn't know SDL_mixer makes use of libmikmod, because the README.PSP of SDL_mixer only mentions SDL, libogg, libvorbis and libTremor as prerequisites. :confused:
I only add -lvorbisidec in my makefile when using SDL_mixer.
psiko_scweek
October 19th, 2006, 01:28
really? well how do you get SDL_mixer to play MOD, IT or Midis?
or should i just scratch the the SDL_mixer
Powered by vBulletin® Version 4.2.3 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.