Results 1 to 7 of 7

Thread: Are MP3's Possible in DelphiX?

  1. #1

    Are MP3's Possible in DelphiX?

    Iv'e been learning to use DelphiX and although it has excellent support for wavs, it doesn't seem to support MP3's. Is it possible? If so, how?

  2. #2

    Re: Are MP3's Possible in DelphiX?

    No.. As far as I know, delphiX can only play wav (maybe also aiff or something simiair). The sound components in DirectX are primarily used to play sound-effects and not music. I think it is better to seek a seperate sollution for music playback.

    The simplest sollution would be to drop a MediaPlayer on your form and play it with that. It's easy, doesn't require a lot of code, and it supports a few nice formats. If you want to do it all by yourself, it would require you to decode your MP3 file and that is quite tedious. If you want to go this way, this will become handy. Just google for some pascal headers and you should be able to use it.

    Slightly easier (if you want to do it yourself), is to pick the Ogg vorbis format and implement that. Check this and the corresponding headers

    Hope this was helpfull.
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  3. #3

    Re: Are MP3's Possible in DelphiX?

    Yes, I also use MediaPlayer for playing mp3's with unDelphiX DelphiX/unDelphix doesn't support mp3's
    Wake up from the dream and live your life to the full

  4. #4
    Legendary Member NecroDOME's Avatar
    Join Date
    Mar 2004
    Location
    The Netherlands, Eindhoven
    Posts
    1,059

    Re: Are MP3's Possible in DelphiX?

    I remember my first game that I made with Delphi. It had 8 media players (channels) and some code to manage which player should open and play the sound. It worked but was inefficient.

    I can dig up my old UnDelphiX project and see if I used a media player or just UnDelphiX for player mp3's...
    NecroSOFT - End of line -

  5. #5

    Re: Are MP3's Possible in DelphiX?

    I have a extra component based on DirectShow that play mp3 files. (Also, can play midi files direct from a collection, the midi file itself is embebbed).
    Current, it can only play external mp3 files, I can't select a "stream" as source, only files... :/
    Also, I have a "StateEngine" component, event based, that helps my development of games, and a extra unit with some Sprite derived classes (with events, mouse helper, hud text sprite...)

    Since you have the source, isn't hard to create new components to help and merge in delphix...

  6. #6

  7. #7

    Re: Are MP3's Possible in DelphiX?

    This is my "UnDelphiX Extra" components pack, my version of Music component (I did it before michel does the version on last UnDelphiX release) can play midi from stream, and, can play mp3 files (stop then, replay then, and have a event trigger when the mp3 file ends - so you can just call DXMusic1.ReplayMP3; to loop).
    Also, there is my version of sprite engine, with extra slots for information, support to events and a pixel check collision procedure (that is slower and less buggy than original). By default, pixel check and the "SagWare" check collision is disabled.
    And, a component to control game states, very usefull if you understand... I use it to control my games (like my wolfenstein), I create this component inspired by klik'n'play...

    http://rapidshare.com/files/25518411...lphiXExtra.zip

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
  •