Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8460957
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:44:52+00:00 2026-06-10T13:44:52+00:00

i am currently writing a script mod for Grand Theft Auto IV using Scripthook

  • 0

i am currently writing a script mod for Grand Theft Auto IV using Scripthook C++.
I have been playing audio files by using this template: Simple C++ MP3 Player Class

My problem starts by attempting to use files from resource.
I have no idea how to load them.

Every time i tried to load sound from resource using my code, game crashed.
Already spend hours browsing google about how to play DirectShow audio from resource without any result.

Inside resource files:

(resource.h)  #define WAV_Sound            106
(resource.rc) WAV_Sound                    RCDATA                  "MySound.wav"

Loading files from HDD is working fine

Load(TEXT("MySound.wav"));

But game crashes when i try one of this:

// Load from resource #1
    LPCWSTR file = MAKEINTRESOURCE(WAV_Sound);
    Load(file);

// Load from resource #2
    Load((LPCWSTR) WAV_Sound);

Hope someone can help me out, thanks !

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T13:44:53+00:00Added an answer on June 10, 2026 at 1:44 pm

    Microsoft recommended using DirectX Audio to provides multilayer interfaces for developing game, namely XAudio2, X3DAudio, XACT, … etc, they are very powerful to process sound effect in 2d/3d game environment. Here is the link http://msdn.microsoft.com/en-us/library/ee415737%28v=vs.85%29

    Please download and install the DirectX software development kit, and find the ‘XAudio2BasicSound’ example to open wave file from file or in resource or in dll and playback with IXAudio2 interface, it was very simple example but next step you can add sound effect to your game.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently writing a small script using pygame, but I don't believe this question
I'm currently writing a bash script for renaming files. Every file looks like this
I'm currently writing a ToDo-Script for a project i have running. Now there is
I'm currently writing a Java daemon. I'm writing a script that will have the
I am currently writing a script whereby an array of checkboxes are displayed using:
I currently have Python 2.6.2 installed on my mac. I am writing a script
So I have a little problem with a PHP script I'm currently writing. To
I'm currently writing some installer script that fires SQL files against different database types
I'm currently writing a small script for use on one of our servers using
Have been writing the shell script such as : #! /bin/bash `sqlplus -s <username>/<passwd>@dbname`

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.