Results 1 to 3 of 3

Thread: Sound

  1. #1

    Sound

    It's come time for me to put sound into my game. Now I don't understand much about it at all.

    My major question is, can I play sound files from a MemoryStream?

    Because in my game the idea is to use all it's resources from a pack file where I store all the resources (images, sounds, configuration files). This would be really good.

    Also, what sound system should i use, how should i consider? I'd love to be able to play .midi and .ogg and .wav And I realize some of these sound systems are not free if you plan to sell your product.

    My product, a game creation set, i plan to release as limited freeware. Everything works fine, but it'll have a player cap that can be removed if they pay x amount. Would that be against the sound system's EULA?

    Thanks in advance!
    I have a 2005 CRF 250 so <^>(>&lt<^>
    <br />http://www.gtrpg.com/

  2. #2
    Legendary Member cairnswm's Avatar
    Join Date
    Nov 2002
    Location
    Randburg, South Africa
    Posts
    1,537

    Sound

    My guess is you want to look at OpenAL.

    What Graphics library are you using - SDL has SDL_mixer, DirectX has DirectSound - maybe sticking to something close to your graphics might be a good idea.

    But anyway - dont ask me - I never seem to get the sound stuff in my games right

    But Also - one of the best places I found for sound was windows MMSystems PlaySound - and it can play from streams

    [pascal]
    Procedure PlayTheSound(Ptr : Pointer);
    Begin
    mmSystem.PlaySound(PChar(Ptr), 0, SND_MEMORY or SND_NODEFAULT or SND_ASYNC);
    End;


    procedure LoadWav(const Filename: string; var Ptr: pointer);
    var
    Strm: TFileStream;
    Size: integer;
    begin
    Strm := TFileStream.Create(Filename, fmOpenRead);
    GetMem(Ptr, Strm.Size);
    Strm.ReadBuffer(Ptr^, Strm.Size);
    Strm.Free;
    end;
    [/pascal]

    OK so it only plays Wavs - only plays one sound at a time - But it worked for my LD48 entry
    William Cairns
    My Games: http://www.cairnsgames.co.za (Currently very inactive)
    MyOnline Games: http://TheGameDeveloper.co.za (Currently very inactive)

  3. #3

    Sound

    Im using Omega SDK they have a sound component, should i stick with that?
    I have a 2005 CRF 250 so &lt;^&gt;(&gt;&lt&lt;^&gt;
    <br />http://www.gtrpg.com/

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
  •