Results 1 to 2 of 2

Thread: Including sound in an exe

  1. #1

    Thread Starter
    Fanatic Member coox's Avatar
    Join Date
    Oct 1999
    Posts
    550

    Post

    Anyone know how to include sounds in an exe, you know, so you don't have to package it with a load of wav's or whatever...

  2. #2
    Guru Yonatan's Avatar
    Join Date
    Apr 1999
    Location
    Israel
    Posts
    892

    Post

    Open the WAV file with a hex-editor, and copy the contents to a RES file, insert it to your project. When you need to play the file, extract it from the RES file to a temporary file (you can use the APIs to find out an unoccupied temporary file name). Play the temporary file with the PlaySound or sndPlaySound APIs, and delete it when you finish playing...

    ------------------
    Yonatan
    Teenage Programmer
    E-Mail: [email protected]
    ICQ: 19552879
    AIM: RYoni69

Posting Permissions

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



Click Here to Expand Forum to Full Width