Adding OGG and AAC to a Project. but not WAV

Get help using Construct 2

Post » Sun Mar 18, 2012 2:04 pm

I see in the manual that WAV files are recommended, but I'm wondering if I can add an OGG file and an AAC file instead. My files would be:

bang.ogg
bang.m4a

Note that .m4a is an AAC file.

If I add these two and keep the same filename but with the appropriate extension, will everything be cool?

I just tested a simple game that plays a sound with both files uploaded, and it worked in Firefox, IE9, Safari, Chrome, and Opera.

This is fun. I like playing with browsers and audio formats!
Check out my HTML5 Firefox OS Game Programming and Game Playing blog at http://firefoxosgaming.blogspot.com/ and my book on Amazon at http://www.amazon.com/dp/B00IZUYIGO. I wrote a newer post on using Construct for Firefox OS at http://firefoxosgaming.blogspot.com/201 ... -game.html.
B
16
S
4
G
4
Posts: 181
Reputation: 3,837

Post » Sun Mar 18, 2012 2:18 pm

[QUOTE=Bob Thulfram] I see in the manual that WAV files are recommended, but I'm wondering if I can add an OGG file and an AAC file instead. My files would be:

bang.ogg
bang.m4a

Note that .m4a is an AAC file.

If I add these two and keep the same filename but with the appropriate extension, will everything be cool?

I just tested a simple game that plays a sound with both files uploaded, and it worked in Firefox, IE9, Safari, Chrome, and Opera.

This is fun. I like playing with browsers and audio formats![/QUOTE]

Further testing shows that Chrome not only does not play the sounds, it freezes when a collision happens. All the other browsers work just fine, even Safari. I am not running this on a server and Chrome works fine with I run the project from within Construct. I guess I need to get that Opera Unite server running on my network. I ran into the sample problem when I was writing HTML5 Web Worker code.

Is Construct 2 using Web Workers? I can't see why Canvas would not run on a client.
Check out my HTML5 Firefox OS Game Programming and Game Playing blog at http://firefoxosgaming.blogspot.com/ and my book on Amazon at http://www.amazon.com/dp/B00IZUYIGO. I wrote a newer post on using Construct for Firefox OS at http://firefoxosgaming.blogspot.com/201 ... -game.html.
B
16
S
4
G
4
Posts: 181
Reputation: 3,837

Post » Sun Mar 18, 2012 7:39 pm

Yeah you can import a .ogg and .m4a with the same name, that's what importing a .wav does for you (it creates the two files automatically).

If the game freezes you should check for browser errors and report anything you find.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,468

Post » Mon Mar 19, 2012 4:55 am

[QUOTE=Ashley] Yeah you can import a .ogg and .m4a with the same name, that's what importing a .wav does for you (it creates the two files automatically).

If the game freezes you should check for browser errors and report anything you find.[/QUOTE]

Thanks for the quick answer. I appreciate that Construct 2 will convert a WAV file for me, but I also like the ability to create and use my own OGG and AAC files.

Construct is awesome!

Two quick questions:

1. Is there a way to search through the manual?
2. If I can't find something, can I file a bug on the manual or make suggestions?
Check out my HTML5 Firefox OS Game Programming and Game Playing blog at http://firefoxosgaming.blogspot.com/ and my book on Amazon at http://www.amazon.com/dp/B00IZUYIGO. I wrote a newer post on using Construct for Firefox OS at http://firefoxosgaming.blogspot.com/201 ... -game.html.
B
16
S
4
G
4
Posts: 181
Reputation: 3,837

Post » Mon Mar 19, 2012 5:05 am

[QUOTE=Bob Thulfram] [QUOTE=Bob Thulfram] I see in the manual that WAV files are recommended, but I'm wondering if I can add an OGG file and an AAC file instead. My files would be:

bang.ogg
bang.m4a

Note that .m4a is an AAC file.

If I add these two and keep the same filename but with the appropriate extension, will everything be cool?

I just tested a simple game that plays a sound with both files uploaded, and it worked in Firefox, IE9, Safari, Chrome, and Opera.

This is fun. I like playing with browsers and audio formats![/QUOTE]

Further testing shows that Chrome not only does not play the sounds, it freezes when a collision happens. All the other browsers work just fine, even Safari. I am not running this on a server and Chrome works fine with I run the project from within Construct. I guess I need to get that Opera Unite server running on my network. I ran into the sample problem when I was writing HTML5 Web Worker code.

Is Construct 2 using Web Workers? I can't see why Canvas would not run on a client.[/QUOTE]

I finally set up a server and Chrome works just fine on a web server.

Everyone may already know this, but Opera browser has a free web server built in. You just have to install Opera and then set up Opera Unite. This will create a password protected server on your network. I put this on an old netbook running the Windows 8 Developer Preview. Opera seems to use a lot of resources but maybe all servers do, and this is a low-spec old Acer notebook with 1GB of memory and a puny Atom processor.

I'm more of a client guy, but I think it is cool that Opera gives you a server that can server pages, files, and stream media. As well as a bookmarks and notes across all instances, a blog, photo gallery, and probably all kinds of other stuff. I especially like the way I can sync bookmarks with my Android phones! And so far, everything from Construct works on Opera also.

As you can guess, I'm a browser nut, and always have the following on my machines for testing: Chrome, IE, Firefox, Safari, Opera, Iron, Songbird, Maxthon, and SeaMonkey. 9 browsers, that's not too many. I live in the browser world, which is one of the reasons why I'm so gung ho on HTML5 and Construct.

So no problems with Chrome and OGG/AAC for me.Bob Thulfram2012-03-19 05:08:24
Check out my HTML5 Firefox OS Game Programming and Game Playing blog at http://firefoxosgaming.blogspot.com/ and my book on Amazon at http://www.amazon.com/dp/B00IZUYIGO. I wrote a newer post on using Construct for Firefox OS at http://firefoxosgaming.blogspot.com/201 ... -game.html.
B
16
S
4
G
4
Posts: 181
Reputation: 3,837


Return to How do I....?

Who is online

Users browsing this forum: HugeCube, imnotspecial, tomi71, totoe, Yahoo [Bot] and 19 guests