Audio / Music MIME Question

Discussion and feedback on Construct 2

Post » Tue Jan 22, 2013 3:30 am

Ok, I'm new, so be gentle.

I am a little confused about how to implement audio sounds and music
to be most compatible.

I found a tutorial that reads as follows...

MIME types
In order for your server to send audio files correctly, it must be set up with the following MIME types:

.ogg as audio/ogg
.m4a as audio/mp4

Without these MIME types you may not hear audio after uploading your project to your server, or directly visiting the audio file's URL will return a 404 Not Found error.

So, does this means, I need on my output server files, I need to create 2 folders and store duplicate sets of all my audio files in both OGG and MP4 formats???
B
5
Posts: 58
Reputation: 916

Post » Tue Jan 22, 2013 3:34 am

I checked my output folders that C2 creates and there is only (1) folder called "media" and there are only OGG files in there.
B
5
Posts: 58
Reputation: 916

Post » Tue Jan 22, 2013 4:13 am

Did you import the file into Construct as music or sound? I believe music is only ogg, where as sound effects construct creates ogg, m4a and wav.
B
94
S
29
G
11
Posts: 1,545
Reputation: 20,993

Post » Tue Jan 22, 2013 6:31 am

Construct2 does convert the sounds for you.

Follow this tutorial to import your sounds in C2.

Also, are you using windows XP ? I think I remember that in that OS, the conversion to .m4a files did not occurred by default but there was a warning message after (or before) conversion that said it.Kyatric2013-01-22 06:31:58
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791

Post » Tue Jan 22, 2013 10:56 am

@ArcadEd - that's not quite right, you need both .m4a and .ogg for both sound effects and music, and Construct 2 will automatically encode both for you if you import WAV files.

@balistrerinick - if audio works when you upload to your server, you don't have to do anything.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,518

Post » Wed Jan 23, 2013 5:34 am

Hey Guys,

Thank you for all the advice.
As a test, I created a simple game and inported a WAV file
that plays a "BOING" sound when you play a button.

C2 created the OGG and m4a files ok. I play them and they work.
I test in CHROME and all is well, with this test game and with my
actual game. However, I am unable to hear the sound in Explorer on a
WIN7 PC. or on my iPad when I click the button.

I implemented the TOUCH for the iPad.
Could anyone test this and maybe see what it is I am doing wrong???

Click here to test...
http://www.brotechentertainment.com/test/index.html
B
5
Posts: 58
Reputation: 916

Post » Wed Jan 23, 2013 5:36 am


Here is a link to my CAPX if that helps
http://www.brotechentertainment.com/test/test1.capx
B
5
Posts: 58
Reputation: 916

Post » Wed Jan 23, 2013 12:01 pm

@balistrerinick - your server is set up wrong. It sends .m4a files as application/octet-stream, whereas it needs to send it as audio/mp4. If you don't know how to set up MIME types, ask your host, since it's different for each service.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,518

Post » Wed Jan 23, 2013 3:18 pm

Hey Ashley,

Thank you for the help..
You must be right, this is my first game and I just created
my website at Go Daddy a week ago.

So, I import WAV files into C2, then C2 creates the ogg and m4a files..
I export my game to a HTML5 website.
I then FTP the game file to my actual website.

Now, to make sure I understand, I need to go to Go Daddy and set-up the MIME types to send the audio as audio/mp4 type?

That should be in my Go Daddy control panel and they have excellent tech support so I should be able to figure it out..

Thank you sooo much Ashley and everybody else.. :)
B
5
Posts: 58
Reputation: 916

Post » Wed Jan 23, 2013 7:30 pm

@Ashley or anyone who knows...

I contacted Go Daddy and was sent an email describing what I need to do..
I hope this may help others who bump into this same problem in the future.

Here is what I was told to do...
-------------------------------------------------------------------------------------------
You can configure MIME types on your Linux hosting account using a .htaccess file. When you configure MIME types in your .htaccess file, you associate file types with a specific application or action.

For example:

AddType application/x-shockwave-flash swf
AddType specified you are adding a new mime type (file type).

application/x-shockwave-flash is the actual mime parameter specs.
swf is the extension of the file type.

-------------------------------------------------------------------------------------------

So, regarding my current problem, I'm just a little confused on the syntax of what the notation should be.

I create a TEXT file called ".htaccess" ???
I then type in a line that reads,

AddType application/ ???

Then I post this file to root directory of my host site?
Also, will I need to Addtype to any other file types for C2 to function properly
on most browsers???

I apologize if I'm asking what seems like dumb questions, but I've never set up a website so this is all new to me.
B
5
Posts: 58
Reputation: 916

Next

Return to Construct 2 General

Who is online

Users browsing this forum: Eisenhans and 5 guests