Python and XAudio2 - Play Resource

This forum is currently in read-only mode.
From the Asset Store
Mine those precious space resources & start trading
  • I'm trying to use XAudio2 in a Python script, mainly playing sounds / resources. My question is: how do I do this? Do I have to


    Every time I try to play a sound using a Python script it gives me an error:

    XAudio2: Failed to load file from disk. Check the filename exists and that the file is of a supported format. (0x80004005)

    That resource / file is a simple .WAV file, playing well from an event when called, but not from script. This would help me greatly if I could invoke it using Python, so any help appreciated, as always!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • The action equivilent of the script is a combo select, so in python you would use a integer index. 0 for the first resource, 1 for the second and so on. To use a filename you'll have to use "play from file" and have the files alongside your exe.

    You could alternatively use the resource plugin to avoid integers.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)