Replacing audio doesn't work

Bugs will be moved here once resolved.

Post » Wed May 21, 2014 6:43 pm

Message: inejwstine can only post plain text URLS until they have 500 rep. 2 URLS modified. Why?
Problem Description
According to Ashley in this thread: https://www.scirra.com/forum/suggestion-list_p758566?#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
https://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)
B
6
S
1
Posts: 38
Reputation: 683

Post » Thu May 22, 2014 1:22 pm

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.
Scirra Founder
B
403
S
238
G
89
Posts: 24,654
Reputation: 196,145

Post » Thu May 22, 2014 3:20 pm

Ashley wrote: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.
B
6
S
1
Posts: 38
Reputation: 683

Post » Thu May 22, 2014 3:26 pm

The .ogg and .m4a should be there as well! They're stored in the same place.
Scirra Founder
B
403
S
238
G
89
Posts: 24,654
Reputation: 196,145

Post » Thu May 22, 2014 3:36 pm

Ashley wrote: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. :)
B
6
S
1
Posts: 38
Reputation: 683

Post » Thu May 22, 2014 3:43 pm

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!
B
6
S
1
Posts: 38
Reputation: 683


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 3 guests