Sound Formats

As far as I know ALSA supports 4 sound formats, S16_LE, S24_LE and S32_LE and FLOAT_LE
My soundcard plays S16_LE and S32_LE fine, and for FLOAT_LE and S24_LE fail to play at all.
I found it a bit surprising that I can play 32-bit format but not 24-bit format, isn't 32-bit format superior to 24-bit to begin with? (Either way I have an X-Fi Titanium which supports 24-bit format, just not on Linux, fuck Creative!) Then there is Floating Point/double precision which is even better than these others.
Since I can force ALSA to use a specific format, I was wondering if I should force it to use S32_LE or S16_LE or just leave it at whichever format the source wants to use? And also if there would be any point in using S24_LE at all if we already have S32_LE which works fine.
Last edited by rabcor (2014-07-10 23:44:18)

rabcor wrote:So you're saying 24 bit has 3x the latency of 32 bit? But 32 bit really is the best right?
No, I meant that if I had to implement 24 bit resolution support for the hardware codec/controller/dsp that already supports 32 bit resolution, I would go for the trade off of 3 times the latency, compared to 32 bit for the sake of simple implementation (I assume some hardware restrictions here, simply filling 24 bit data to 32 bit with zeros would be easier). That however is a comparison of latency (strict delay in this case) between the data being send and processed, so the actual latency difference in audio might not exist at all. This remark has nothing to do with alsa whatsoever.
"The best" is not empirical. What is your setup? Do you know what mass inertia is? Quality is a difficult topic and one has to consider the whole signal path/chain: beginning from the source, through all connections and amplifiers, ending with speakers or headphones. Is 32 bit better then 24 bit? That depends on the circumstances (like emi, elements along the signal path that alter the signal etc.). If you only take resolution in consideration, then yes, since it is more precise representation of the original signal.
Last edited by emeres (2014-07-12 16:01:20)

Similar Messages

  • Problem for Sound Format.

    Hi,
    I have developed a Game and it uses the .wav file works very well in Emulator. I sent that game to Game distributor, This is the reply i got.
    We found no problem to implement into Device and it works properly except
    with NO sound
    Game use "wav" format for the sound. Other Java
    games implemented into Our Devise use "smaf" format for the sound. We assume
    that if you change the sound format from "wav" to "smaf", the sound problem
    will be solved.
    Now i hv got everything player to play samf file , convertor in order to convert the .wav into SMAF format.
    1) But i dont know How can i play smaf format file using J2ME any Idea.
    2) And i looked at the Phone specification it does support the .wav format then why my game does not play sound there.
    My .wav format is
    Bit Rate : 64KBPS
    Audio sample size : 8bit
    Channels 1(mono)
    Audio sample rate : 8khz
    Audio format : PCM

    * Update
    Performed a cleansweep and reinstall of the sound card drivers and so far no improvements.

  • [iPhone]: Sound Format Question

    Hey All,
    I was just curious if you can tell me what the best sound format(s) is for short audio sounds in an iPhone App. I have a lot of audio editing software so I can change my files to pretty much anything (including Ogg Vorbis). Preferably I'd like some kind of best to worst list like:
    caf
    wav
    ogg
    mp3
    etc with any notes when applicable. Any other useful knowledge you can think of would be great as well (like only one compressed sound should be playing at a time etc). Thanks.

    We've been using WAV over CAF. Couldn't find a way to get MP3s working yet. So I guess the advantage of WAV is that its more universally compatible with wav editors, etc. I think you have to use QTPro to make CAFs (basically an encapsulated AIF)

  • Sound Formats for submitting to withoutabox

    I made a short film and edited through FCPX and am submitting to film festivals through "withoutabox" online.
    I am not sure what to put for certain sound formats that they ask.
    First, they ask, Mono or Stereo? Not sure which to choose.
    And second they ask this:
    Any help would be greatly appreciated. Thank you

    rabcor wrote:So you're saying 24 bit has 3x the latency of 32 bit? But 32 bit really is the best right?
    No, I meant that if I had to implement 24 bit resolution support for the hardware codec/controller/dsp that already supports 32 bit resolution, I would go for the trade off of 3 times the latency, compared to 32 bit for the sake of simple implementation (I assume some hardware restrictions here, simply filling 24 bit data to 32 bit with zeros would be easier). That however is a comparison of latency (strict delay in this case) between the data being send and processed, so the actual latency difference in audio might not exist at all. This remark has nothing to do with alsa whatsoever.
    "The best" is not empirical. What is your setup? Do you know what mass inertia is? Quality is a difficult topic and one has to consider the whole signal path/chain: beginning from the source, through all connections and amplifiers, ending with speakers or headphones. Is 32 bit better then 24 bit? That depends on the circumstances (like emi, elements along the signal path that alter the signal etc.). If you only take resolution in consideration, then yes, since it is more precise representation of the original signal.
    Last edited by emeres (2014-07-12 16:01:20)

  • What sound format is the least overhead for OS X?

    I use a typing expander and I have some small custom sound bytes that occur after an expansion. Every now and then I'll notice a pause as the OS deals with tacking on the sound after the expansion. I haven't really paid any attention to the format these sounds are - some are aiff, wav, mp3, m4a etc. For the puposes minimum response time and overhead for OS X, which format is the best. I'd assume uncompressed sound formats would be best because the OS doesn't need to deal with decompressing them, but I'm not sure. Note that I also use these sound files on my iPhone and iPad.

    googling around seems to indicate that Linux has HFS+ support built in but you might have to disable journaling on the HFS+ drive you want to access from linux. that should not be a problem with a secondary drive. I don't do linux but when I boot from the ubuntu live CD I can read and write to my OS X drives without any extra preparation.
    Message was edited by: V.K.

  • .au sound format is not working

    Hello everybody,
    Infact this Alarm.java (attached) using sun proprietary API sun.audio classes, now these are deprecated so i want to replace it with java se 6 classes.
    This Alarm.java is beeping the PC but not able to run alarm.au audio file and gives Following exception
    Exception Occurred....java.lang.IllegalArgumentException: No line matching interface SourceDataLine supporting format ULAW 8000.0 Hz, 8 bit, mono, 1 bytes/frame, is supported.
    Kindly help to make it work with alarm.au
    NOTE: i hav commented all those sun proprietary API sun.audio code and tried with the alternate code in the same Alarm.java
    Thanks
    //Alarm.java
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.sound.sampled.*;
    public class Alarm implements ActionListener
    private static final int BEEP_INTERVAL = 1000;
    private static javax.swing.Timer beepTimer = null;
    private static Alarm theInstance = null;
    private static boolean usePcSpeaker = false;
    //old code
    //private static sun.audio.ContinuousAudioDataStream soundClip = null;
    //my code
    private static AudioInputStream soundClip;
    private static AudioFormat audioFormat;
    private static SourceDataLine sourceDataLine;
    //end my code
    private static boolean isAlarmOn = false;
    * Privately constructs a new Alarm. If useSpeaker is true, the method
    * for sounding an alarm is to beep the pc speaker, otherwise we play
    * a sound file.
    private Alarm(boolean newUseSpeaker)
    String alarmFilename = "Alarm.au";
    usePcSpeaker = newUseSpeaker;
    System.out.println("my code.. usePcSpeaker...."+usePcSpeaker);
    if (!usePcSpeaker)
    try
    //my code
    System.out.println("my code.. while usePcSpeaker..is false alarmFilename.."+alarmFilename);
                   java.io.File file = new java.io.File(alarmFilename);
                   soundClip = AudioSystem.getAudioInputStream(file);
                   audioFormat = soundClip.getFormat();
                   DataLine.Info dataLineInfo = new DataLine.Info(SourceDataLine.class,audioFormat);
                   sourceDataLine = (SourceDataLine)AudioSystem.getLine(dataLineInfo);
    //end my code
    //old code
    soundClip = new sun.audio.ContinuousAudioDataStream
    new sun.audio.AudioStream
    new java.io.FileInputStream(alarmFilename)
    ).getData()
    catch (java.io.FileNotFoundException e)
    System.out.println(alarmFilename + " not found");
         usePcSpeaker = true;
    catch (java.io.IOException e)
    System.out.println("Could not create audio stream");
         usePcSpeaker = true;
    catch (java.lang.UnsatisfiedLinkError e)
    System.out.println("Could not load audio driver");
         usePcSpeaker = true;
              catch (java.lang.Exception e)
    System.out.println("Exception Occurred...."+e);
         usePcSpeaker = true;
    if (usePcSpeaker)
    beepTimer = new javax.swing.Timer(BEEP_INTERVAL, this);
    beepTimer.setRepeats(true);
    System.out.println("my code.. Using PC Speaker....");
    * This method turns on the Alarm. By design the Alarm does not
    * care who controls it or how. Controlled access to this object, if
    * desired, must be handled outside this class. Excessive calls to
    * this method when the Alarm is already on are simply ignored.
    public void turnOn()
    synchronized(theInstance)
    System.out.println("my code.. in turnOn isAlarmOn..."+isAlarmOn+"...usePcSpeaker...."+usePcSpeaker);
    if (isAlarmOn)
    System.out.println("Alarm already on");
    else
         if (usePcSpeaker)
    beepTimer.start();
         else
    //old code
         //sun.audio.AudioPlayer.player.start(soundClip);
    //my code
                        try
                                  sourceDataLine.open(audioFormat);
                                  sourceDataLine.start();
                                  int cnt;
                                  byte tempBuffer[] = new byte[128000];
                                  //Keep looping until the input read method
                                  // returns -1 for empty stream
                                  while((cnt = soundClip.read(tempBuffer,0,tempBuffer.length)) != -1 )
                                       if(cnt > 0)
                                            //Write data to the internal buffer of
                                            // the data line where it will be
                                            // delivered to the speaker.
                                            sourceDataLine.write(tempBuffer, 0, cnt);
                                       }//end if
                                  }//end while
                                  //Block and wait for internal buffer of the
                                  // data line to empty.
                                  sourceDataLine.drain();
                                  sourceDataLine.close();
                        catch (java.lang.Exception e)
                             e.printStackTrace();
    System.out.println(" < < < ALARM ON > > > Exception... "+e);
                             //usePcSpeaker = true;
    //end my code
    System.out.println(" < < < ALARM ON > > > while usePcSpeaker is flase and isAlarmOn is false");
         isAlarmOn = true;
    * This method is called by the timer object when the timer fires.
    * It simply calls a method to BEEP.
    * @param evt the timer action event
    public void actionPerformed(ActionEvent evt)
    java.awt.Toolkit.getDefaultToolkit().beep();
    * Test Main, not production code
    public static void main(String[] args)
    Alarm alarm = Alarm.getInstance(false);
    System.out.println("test-main: turning alarm ON");
    alarm.turnOn();
    try
         System.out.println("test-main: with CPU burn activity in background");
    double b = 12;
    double a = 0;
    for(int ii = 0; ii < 100000; ii++)
    // garbage formula to do busy work
    a = Math.sqrt(1234.4567 * b) / ( (a+ii) / b) + ii;
    b += 1;
         java.lang.Thread.sleep(5000);
    catch (Exception e)
         e.printStackTrace();
    System.out.println("test-main: turning alarm OFF");
    try
         System.out.println("test-main: sleeping 3 seconds");
         java.lang.Thread.sleep(3000);
    catch (Exception e)
         e.printStackTrace();
    System.out.println("test-main: turning alarm ON");
    alarm.turnOn();
    try
         System.out.println("test-main: sleeping 5 seconds");
         java.lang.Thread.sleep(5000);
    catch (Exception e)
         e.printStackTrace();
    System.out.println("PROGRAM EXITING");
    // The Unit Test program will run forever if we dont kill it
    // this way (because the timer/awt dispatch thread is still running)
    System.exit(1);
    }

    You can try to convert alarm.au to a supported format.
    Here is an example how to find available converters:
    import javax.sound.sampled.*;
    import java.io.File;
    public class ShowConverters {
        public static void main(String[] args) {
            AudioFormat format = null;
            try {
                AudioInputStream in =
                    AudioSystem.getAudioInputStream(new File("alarm.au"));
                format = in.getFormat();
            } catch (Exception e) {
                e.printStackTrace();
            AudioFormat.Encoding[] encodings =
                AudioSystem.getTargetEncodings(format.getEncoding());
            if (encodings.length == 0) {
                System.out.println("No available format converters.");
                return;
            for (AudioFormat.Encoding encoding : encodings) {
                AudioFormat[] formats =
                    AudioSystem.getTargetFormats(encoding, format);
                for (AudioFormat toFormat : formats) {
                    System.out.println("--> " + toFormat);
    }Good luck.

  • RECORDING SOUND FORMAT

    I have a Zen Mozaic. I always used it to record sound during lesson.
    The saved format is WAV.
    Can I change it to MP3 format and how to set it on the Zen Mozaic?
    Best regards

    I have a Zen Mozaic. I always used it to record sound during lesson.
    The saved format is WAV.
    Can I change it to MP3 format and how to set it on the Zen Mozaic?
    Best regards

  • ITunes Stores... sound format?

    What format are the songs purchased off the iTunes library? MP3/4?
    Just curious, as I'm finding out that the sound quality between MP3's and WAV is different so the quality of the iTunes Store products may not be quite what you would hear on commerical CD. Correct?

    All tracks on the iTunes Store are AAC. Some are 128kbps and copy protected, and a few (from EMI and a few independent labels) are at 256kbps and not protected; these can be identified by the "+" icon next to the price.
    the quality of the iTunes Store products may not be quite what you would hear on commerical CD. Correct?
    Correct. The quality of all download stores carrying major-label content, with one exception, Music Giants, is lower than what you'd find on a CD. Whether you can hear the difference will depend on your ears and your playback system.
    Message was edited by: Dave Sawyer

  • IMovie Sound Format into iDVD

    Just a quick question ... if my music in an iMovie is mp3 or mp4, will it import any more quickly into iDVD than if I use AIF? Will it affect the file size in iDVD?
    Thanks!
    --Ted

    I think the answer is No on both counts.
    But as you may have noticed the format of all the built-in sound effects and menu audio in both iMovie and iDVD is AIFF, which is far higher quality.

  • What is my sound format?

    I'm trying to submit my short through withoutabox and I'm not sure what to put as the audio format. I edited it with all the defaults coming off a minidv and exported it with quicktime conversion.
    Here are my choices:
    Dolby Digital EX
    SepMag/Cardband
    Dolby SR
    Dolby Digital
    OTHER
    SILENT
    LTRT
    Magnetic
    Dolby A
    DTS
    SDDS
    Optical
    Dolby E
    Which one accurately reflects the audio from my film?

    It's not anything personal about you, it's just that this is not the first time that I've felt like I'm being scolded like a child for not doing something professionally. Of course I know I should pay attention to what I export, but this was just a temporary export that now has to act as my final (a whole 'nother issue).
    I understand, too, that it's hard to judge somebody's skill level from a short post. Coming from your position, I can see how the comment was meant to be a helpful tip to a newcomer, but receiving it as someone who (for the most part) knows what they're doing, it felt extremely condescending. I get where you're coming from, though.
    Can't find QT 7 in my utilities, or anywhere else. Does that info (Linear PCM, 16 bit little-endian signed integer, 2 channels, 48000 Hz) tell you anything about the audio format? Even when I tried to export something from FCP as a test to see what the defaults are, I didn't see anything in the list that Withoutabox is giving me. My best guess is "LTRT"--is that just a stereo mix?
    Message was edited by: jkldagsjlfdsajlasdfjladsf

  • FFT and sound formation

    Two questions.
    1) Does java have any FFT algorithm? or anything close? if not, I'll just try to make one (emphesis on try).
    2) If I have the frequency and amplitude of a wave, is there a way that java can convert my freqency and amplitude data into an actual playable sound file?
    Thanks for any help.

    wow... i didnt find any FFT materials... BUT... i found a cool java sound synthesis package. check it out at http://www.softsynth.com/jsyn/tutorial/index.html
    ITS GREAT!

  • Importing sound formats from Digital Cameras

    I know this is partly covered elsewhere, but if anyone comes up with a way to import video shot on digital cameras and then saved on iPhoto, please let me know. I have a wonderful Casio Exlim S880, that outputs Quicktime movies direct, but with DVI ADPCM audio -- which iMovie '08 simply rejects. Speaking to Casio engineers in Japan, they rightly see it as Apple's problem.
    I know I can convert these movies using iSquint, QT Pro, or iTunes, but to do this over a lot of files is a pain. It SHOULD be possible in iMovie. This major problem aside, I'd be happy with iMovie's lower level capabilities.

    Not only are we dealing with apples and oranges here, we're dealing with two entirely different philosophies and reasons for existence!
    "..So no one's at fault precisely, but without iMovie having access to high quality input, it defeats its purpose of the software itself being low cost, no?.."
    Camera manufacturers are just that: camera manufacturers. They earn their money by selling cameras; making them simple and efficient to use, pretty to look at, and - as Jon says - they aim to "store video in the smallest space possible while retaining reasonable quality". They don't really give a hoot what you do with the video after you've shot it.
    ..Like Kodak, when their main business was making film: you buy (or bought) the film ..but what you actually used it for (scientific recording, family snaps, wildlife photography, cataloguing postage stamps) they didn't care about.
    Apple, on the other hand, doesn't make cameras (though they used to sell some of the first digital snapshot cameras, and the standalone iSight). Their - intangible - product is "ease of use".
    That's what Apple sells: "buy our products, and we'll make portable music easy to use; we'll make photo-manipulation easy; we'll make web-browsing easy; we'll make electronic mail easy; we make everything to do with computers easy; we'll make video editing easy".
    The camera manufacturers aren't necessarily talking to Apple ..the camera manufacturers go off on their own route, trying to give their individual products Unique Selling Points so that people will buy theirs in preference to another manufacturer's.
    They aim to cram as much data as possible into the smallest (physical or virtual) space possible, add pretty design, long battery life, low price, reasonable reliability (so that they don't have to take back faulty devices) with a high profit margin. They want to get their items to market as soon as possible.
    They don't want to consult with people in other industries (Apple, in the "ease of use" business), they just want to get their product on shelves.
    (..In the case of Sony, and HDV video, there was some involvement with Apple, so that Sony could reassure users - primarily pro and semi-pro users - that the material they shot really could be edited. But miniDV pioneers JVC never bothered with that. And Sony never bothered talking with Apple, I believe, about Sony's "consumer-oriented" microMV format..)
    Polaroid, uniquely, never needed anyone else: their film developed by itself, so you didn't need to go to a developing lab to get your pictures done (..though they had other hardware partners; Eumig, for instance, made their Polavision movie hardware). Other camera manufacturers sold cameras, but (apart from Kodak or Fuji-branded cameras) the film developing was always done by a somebody else - you bought a Konica or Olympus or Pentax or Nikon or Canon or Leica or Hanimex or You-Name-It camera; then you bought some film from someone quite different (Agfa, Orwo, Kodak, Ilford, Fuji); then took your pics, then took the film to a third outfit to have the material developed ..the camera manufacturers were far removed from the eventual picture-development process. Kodak introduced new films and new development techniques ..but camera makers were generally uninterested in that; their gaze was on f/stops, lens materials, shutter timing, new materials for camera bodies.
    And so it's been with video: camera makers have bought and used chips, lenses, tape transport mechanisms, microphones, and assembled them into their own products, with their own arrangements of sockets, buttons and battery placement and cosmetic designs.
    Then they've devised, or licensed, new methods for compressing video, so that more can be crammed into smaller storage, with fewer moving parts, making things cheaper and simpler to build.
    The "unravelling" of that compressed audio and video for editing - as distinct from simply plugging a camera into a display for replay - has generally not been the camera manufacturers' worry.
    One more analogy: car makers assemble cars. It's generally not been their worry about how roads are made; optimum camber-angles on bends, and coping with surface water run-off, and grading the gravel and asphalt mix for optimum adhesion.
    You can't use a car without a surface to drive it on. But I don't think that Toyota and Tarmac devise their products in collaboration with each other.
    Camera manufacturers make hardware to pile onto shelves and to sell to people who want some equipment in their hands.
    Apple sells an experience: "ease of use". They generally have to react to what the hardware manufacturers are putting on the market ..except when they devise the hardware themselves, as with iPods, iPhones, display screens and Apple TVs. And, of course, Mac computers. By devising and selling both the hardware and the software, they make Macs, iPods and iPhones "easy to use".
    But when someone else makes the hardware, and they're constantly changing it, and messing about with the new features, and Apple wants to provide that missing "ease of use" capability, then Apple can't always keep up with new developments as fast as customers would like.
    Check the interoperability before you buy! Think what you're buying: are you buying the hardware, or are you hoping to buy the fun and useful experience?
    If it's the experience; does the manufacturer provide that experience, or are you likely to need a third-party to provide it ..as with film developing, audio and video processing and editing, having decent roads to drive on, having the right sea-state to sail on?
    If it's an experience you're after ..check the whole train of interlocking 'components' before committing yourself and your cash.

  • Sound formats for CD / USB

    Hi,
    I want to burn my playlists to CD's for the home and also for the USB in my car.   What is the best format to accomplish this?  WAV files do not work on USB so what would be my best option format for importing from a CD source?  Thanks,

    Make sure you're choosing to burn an audio CD. Some players can also handle MP3 CDs, but iTunes won't convert the track on the fly, so you'd have to make copies as MP3 and then burn those to CD. To make such copies, see:
    http://support.apple.com/kb/PH12167
    Regards.

  • What is the better sounding format with the least space?

    In other words, which of these do you think sound the best and take up the least space:
    MP3
    AAC
    WAV
    Apple Lossless
    AIFF
    I'm doing this because i want to convert my songs to the best sounding but take up the least space or at least a reasonable amount of space...

    The general consensus is that AAC at 128kbps sounds about the same as MP3 at 196kbps, so you can get the same sound quality with a smaller file size.
    Ultimately, your ears are the only judge that matters. If you like the sound of 128kbps AAC, then use it. If not, play around and see (hear) what you like best.
    Another option is to use MP3 or AAC at a higher variable bitrate (VBR). This allows the encoder to "ramp up" the bitrate when the music demands it.

  • Problem with sound format

    Hi,
    Has anyone experienced problems with the audio when importing to imovie hd06 from a dv tape? It starts out fine but the later clips seems to alter the sample resolution in the audio file so that audio is the same lenght but pitch is lower..?
    Macmann

    Hi m
    Some thoughts about audio in iMovie HD 6:
    • it should be 16-bit (cheque that Your Camera not is set to 12-bit)
    • movie should be recorded in SP-mode (60min on a 60min tape) Not LP-mode (90min)
    • lot's of audio clips = severe audio problems. Solution: Mixing down audio to just a few
    by exporting out as QuickTime expert audio .aiff. Then importing this and silence out the rest.
    • If You updated to iLife 08 Your iM6 will start to ill behave. Updating to 6.0.4 might help.
    Yours Bengt W

Maybe you are looking for