A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Any guidelines/standards for audio compression?

  1. #1
    Senior Member Alluvian's Avatar
    Join Date
    Jun 2006
    Posts
    967

    Any guidelines/standards for audio compression?

    So, I am starting to record my sound files for a game, and this is the first time I have made my own sounds for a project. In the past I have just made silent projects or used freely available sound files.

    What is the standard sampling rates you guys use?

    Any tips on software? I am using audacity right now.

  2. #2
    Senior Member tonypa's Avatar
    Join Date
    Jul 2001
    Location
    Estonia
    Posts
    8,223
    I import the wav files into Flash and they are saved as PCM, 44100kHz, 16 bit Stereo. Don't know if its standard or even good settings but it works for me. Once I start to export swf from Flash the sounds are compressed as mp3 using lowest settings that does not distort them (too much).

  3. #3
    Senior Member Alluvian's Avatar
    Join Date
    Jun 2006
    Posts
    967
    Ah, so you change your sampling rate depending on each sound and how susceptable it is to compression distortion? Seems reasonable.

    Since I have not used sounds in flash yet, I am a little confused about importing wav into library and then later using mp3... Are there options in the authoring tool to convert .wav into .mp3 during the publish? Or do you use .wav while authoring and then compress them to .mp3 when you are done and change your sound sub to use external assets? Just curious why you don't start with mp3?

    Sorry if these are stupid questions. Also, this is an old project I am finishing (never got final art assets, and finally decided to just do the art myself) so this is in AS2, but I also have works in progress for AS3 (long from sound design though, which is the VERY last thing I do, well, maybe final level design lags even behind sound)
    Last edited by Alluvian; 02-19-2010 at 03:49 PM. Reason: I can't think and type at the same time. It is a medical condition called "stupid".

  4. #4
    Senior Member
    Join Date
    Oct 2009
    Posts
    117
    Hey guys

    I've also just started taking sound more seriously and have some questions that I hope the more experienced among you can answer:

    - Are mp3 files the only sound files that can be embeded into a class with an embed metatag?

    - I've noticed that mp3 files have a header, which makes them impossible to loop without hearing a bit of silence on the repeat. Any tips on fixing this?

    Thanks!

  5. #5
    Senior Member
    Join Date
    Sep 2004
    Posts
    633
    Well, this is not complicated. Import .wav files ( avoid MP3 as you gain absolutely nothing and usually have problems with those ) and then use MP3 compression in flash when you export your.swf.

    I usually stick with 64kbps for effects and most music ( publish settings in flash ) . That seems to be the minimum if you want decent sound. Thing to remember is if you want to keep stereo ( uncheck convert stereo to mono ) in your main soundtrack then each channel will only be 32kbps and you will probably need to set that file to be exported/compressed at 112kbps so you have each channel sounding fine.

    Importing 16bit / 44100 khz ( CD quality ) is fine. If you are using a little better equipment to record your sounds those usually can record at 24bit/96khz and these .wav files cannot be imported into flash, so remember to save/export as 16bit/44k .wav file for import into flash ( keep your originals at 24/96 ).

    Loading and looping external MP3 files is a different problem. Haven't done that in a while, but that gap on loop restart doesn't happen with every MP3 file, it depends on the app you used to save the MP3 in question. I've always used Sound Forge and I don't remember having those problems, but it's been a while. Since most people use mochi and people have faster connections most of us don't do all the fancy pre-loading like we used to ( the whole game has to load before you can play anything and all portals pretty much want a single file ), so there is not much to gain by loading external MP3s into a game unless you want to give users a choice of track selections or make some kind of a music player.
    Last edited by MikeMD; 02-20-2010 at 02:29 AM.

  6. #6
    Senior Member tonypa's Avatar
    Join Date
    Jul 2001
    Location
    Estonia
    Posts
    8,223
    Quote Originally Posted by Alluvian View Post
    Since I have not used sounds in flash yet, I am a little confused about importing wav into library and then later using mp3... Are there options in the authoring tool to convert .wav into .mp3 during the publish? Or do you use .wav while authoring and then compress them to .mp3 when you are done and change your sound sub to use external assets? Just curious why you don't start with mp3?
    You can set global compression options for all audio in swf:
    File >> Publish Settings >> Flash
    or you can right click the sound in library and set its compression individually.

    I have never used external mp3 files, with careful looping and compressing none of my games has grown over 1 MB and most are < 500 kB. I understand its probably a memory of times 10 years back when most people had dial-ups and 1 MB was considered large file, younger developers go happily toward 10 MB files.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center