Replacing audio doesn't work

0 favourites
  • 6 posts
From the Asset Store
_______ Huge collection of metal fixtures ________
  • Problem Description

    According to Ashley in this thread: scirra.com/forum/suggestion-list_p758566

    if we want to replace already existing audio in our project, we should just replace it in the project's folder in windows explorer. I tried that, but it still plays the old audio after replacing it.

    Attach a Capx

    dl.dropboxusercontent.com/u/32626868/Construct2/Bugs/AudioTest/audioTest.capx

    Description of Capx

    The project contains nothing but the Audio object, one audio file, and one event that plays the audio when the layout starts.

    Steps to Reproduce Bug

    • I created a new empty project and saved it to a new folder.
    • I added an audio file called audioFile.wav to the project folder (in windows explorer). This file simply plays a chime sound.
    • I right-clicked on the Sounds folder in the Projects view, clicked Import Sounds, chose audioFile.wav, and clicked Import.
    • The file was successfully imported, leaving me with three audio files in the Projects view: audioFile.wav, audioFile.m4a, and audioFile.ogg.
    • I added the Audio object to the project.
    • I created a new event: System - On start of layout | Audio - play audioFile
    • I ran the layout, and it works as expected; upon opening in Chrome, the sound plays.
    • Next I took a different audio file (this one just says the word "yes") and also named it audioFile.wav; I moved it into the project folder and replaced the other audio file with it.
    • I ran the layout again, but the new audio file did not play; it's still playing the older one (the chime sound).

    Observed Result

    The original audio still plays.

    Expected Result

    I expected the new audio to play.

    Affected Browsers

    • Chrome: YES
    • FireFox: YES
    • Internet Explorer: YES

    Operating System and Service Pack

    Windows 7 SP 1

    Construct 2 Version ID

    Release 168 (64-bit) (Free edition)

  • Construct 2 only plays .m4a and .ogg files. If you only replace the .wav file, it will have no effect. You need to replace the .m4a and .ogg files as well.

  • Construct 2 only plays .m4a and .ogg files. If you only replace the .wav file, it will have no effect. You need to replace the .m4a and .ogg files as well.

    Okay. How do I do that? Only the .wav appears in my project folder. I can only access the .m4a and .ogg files from within Construct2 itself, and when I try adding a file of the same name, it just appends 2 to the end of it instead of replacing the old one.

  • The .ogg and .m4a should be there as well! They're stored in the same place.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The .ogg and .m4a should be there as well! They're stored in the same place.

    Ah, I think I know what the problem was. I had my project saved as a single .capx file, so only the original audio file that I had imported was there, not the compressed versions (which I'm guessing were zipped into the .capx file somewhere). When I tried the same process again this time saved as a project (not a single file) then the files appeared, and replacing the audio worked as expected.

    Thanks for the help.

  • If I might make a suggestion:

    Importing audio and having Construct2 do the compressing for me is very convenient, but if I need to replace it later I have to find some other way of compressing it. What I ended up doing was importing it as a different name so it would be compressed, and then renaming them and replacing the originals. It works, but it's a bit of a hassle.

    It would be nice if when importing a file with the same name as another already in the project, that Construct would ask if you would like to replace the originals or rename the new file.

    Either way, I'm glad there's at least some way to replace audio; saves the trouble of having to recreate audio events. Thanks again!

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