Results 1 to 9 of 9

Thread: Audio in SDL

                  
   
  1. #1
    DCEmu Regular psiko_scweek's Avatar
    Join Date
    Apr 2006
    Posts
    315
    Rep Power
    71

    Default Audio in SDL

    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!

  2. #2
    GP2X Coder/Moderator
    Join Date
    Jan 2006
    Posts
    1,678
    Rep Power
    87

    Default

    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.

  3. #3

    Default

    What in the world is SDL lol

  4. #4
    DCEmu Regular psiko_scweek's Avatar
    Join Date
    Apr 2006
    Posts
    315
    Rep Power
    71

    Default

    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? :-(

  5. #5
    GP2X Coder/Moderator
    Join Date
    Jan 2006
    Posts
    1,678
    Rep Power
    87

    Default

    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

  6. #6
    DCEmu Regular psiko_scweek's Avatar
    Join Date
    Apr 2006
    Posts
    315
    Rep Power
    71

    Default

    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)

  7. #7
    GP2X Coder/Moderator
    Join Date
    Jan 2006
    Posts
    1,678
    Rep Power
    87

    Default

    Check the directory for the mikmod library file. If it isn't there you need to install it.

  8. #8
    DCEmu Newbie
    Join Date
    Jun 2006
    Posts
    7
    Rep Power
    0

    Default

    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.

    I only add -lvorbisidec in my makefile when using SDL_mixer.

  9. #9
    DCEmu Regular psiko_scweek's Avatar
    Join Date
    Apr 2006
    Posts
    315
    Rep Power
    71

    Default

    really? well how do you get SDL_mixer to play MOD, IT or Midis?

    or should i just scratch the the SDL_mixer

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •