Audio / Music MIME Question

0 favourites
From the Asset Store
6 looping tracks to use in your games and projects. These tracks are in the style of the 1960s detective movie genre.
  • 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???

  • I checked my output folders that C2 creates and there is only (1) folder called "media" and there are only OGG files in there.

  • 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.

  • 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.

  • 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.

  • 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...

    brotechentertainment.com/test/index.html

  • Here is a link to my CAPX if that helps

    brotechentertainment.com/test/test1.capx

  • 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.

  • 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.. :)

  • 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.

  • or is it AddType audio/mp4 ???

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ok, I found this C2 tutorial, but I don't think it explains very well what to do, or how to do it..

    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

    This explanation could offer a little bit more information to be helpful.

  • balistrerinick

    On my webserver which is apache I have a .htaccess file with the following contents:

    AddType video/ogg .ogv

    AddType application/ogg .ogg

    AddType video/mp4 .mp4

    AddType video/webm .webm

    AddType audio/aac .aac

    AddType audio/mp4 .mp4 .m4a

    AddType audio/mpeg .mp1 .mp2 .mp3 .mpg .mpeg

    AddType audio/ogg .oga .ogg

    AddType audio/wav .wav

    AddType audio/webm .webm

    This file is located in the games root directory.

    .htaccess is just a text file that I created in notepad.

  • Thank you rfisher...

    Here is a link to my test page..

    brotechentertainment.com/test/index.html

    This basically has one button that makes a BOING sound effect

    and counts each button click.

    It also is touch enabled for cell phones and tablets.

    Test Results

    Explorer = OK

    Chrome = OK

    Mozilla = OK

    Android = OK (slow button response for some reason)

    iPad = No sound still

    Any ideas what could be the problem with the iPad ??

  • This link plays the BOING sound just fine directly, however, not when thru my test game.. ???????????????????????????????????????????????

    Boing Sound effect

    brotechentertainment.com/test/media/boing_x.m4a

    Here is the CAPX

    brotechentertainment.com/test/test1.capx

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