play Audio in different browsers

Get help using Construct 2

Post » Sun Oct 30, 2011 7:25 pm

Hello,
perhaps somebody needs some infos how this can be done - even when you're not on a win 7

To play sound in browsers with ogg-support(Firefox,..) and brothers without ogg-support (IE9 on Win7,..) i've done the following:



1) import the ogg-File in C2

if (not Win7): 2)convert the ogg-File to .m4a (ie with fre:ac)

3) import the .m4a File in C2
C2 gives the m4a file the name soundExample2.m4a so i renamed it back to soundExample.m4a



hear example
download capx

Joe7Joe72011-10-30 19:28:18
B
14
S
6
G
5
Posts: 173
Reputation: 4,742

Post » Thu Dec 01, 2011 5:12 am

On Vista, when I import a sound...
OGG, import works, I can choose the sound, but nothing when I run the game.
M4A (done with fre:ac, from the ogg), I can import it, but I can't select it when I create the Action > Play sound.
The file doesn't appear in the list...

Is there something else I can do ?
B
12
S
2
G
5
Posts: 73
Reputation: 3,570

Post » Thu Dec 01, 2011 5:30 am

the sound must be Mono...
Of course... my bad...
B
12
S
2
G
5
Posts: 73
Reputation: 3,570

Post » Thu Dec 01, 2011 10:38 am

Guicole, as you said, I can also import M4A sound file but I can't select it when I create the Action > Play sound (alert message: "None - import some audio files first" although there is imported M4A file). The M4A sound is done by fre:ac, from the OGG and it is mono but it still cannot be selected!

But when there is imported an OGG sound then that sound can be selected.

I'm not sure if this is a bug in C2?
B
9
S
2
G
5
Posts: 26
Reputation: 3,219

Post » Thu Dec 01, 2011 1:02 pm

You should just import WAV files and Construct 2 will encode them to both OGG and M4A saving you the hassle of doing it yourself (M4A is only done on Windows 7+ though).

Construct 2 considers Ogg Vorbis files to be your project's audio files, and the M4As are a backup to the Vorbis file for browsers which don't support Ogg Vorbis. So you need the Ogg file first to be able to select it for the Play sound action.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Tue Aug 20, 2013 4:20 am

can we import Midi as our background music? b ecause midi is small in file size.
B
32
S
5
G
3
Posts: 49
Reputation: 5,167


Return to How do I....?

Who is online

Users browsing this forum: linkman2004, supreme676 and 19 guests