Re: [Dev-C++] New to the list, and a quick question
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Per W. <pw...@ia...> - 2007-01-12 02:45:27
|
Note that non-lossy audio compression (I'm definitely not talking about zip :) or similar) have a hard time giving more than 30-50% compression for music. Software that needs to be delivered with audio samples often requires non-lossy audio (instrument samplings for a sequencer software) or have too small sample files for it to be worth it to bother with mp3 or similar (informational/error sounds or speech messages). Consider for example an application I developed at a previous employer. It was delivered with alarm messages. Let's assume 50 different alarm messages, each about 3 seconds long. 150 seconds times 22kHz 16-bit mono is less than 7MB total size. The need for sound compression would in this case be quite small, and I think this would be representable for quite a large percentage of applications that are distributed with sound data. The other end of the spectrum is of course high-end sequencer software, that might be delivered with many GB of sound samples, but then the requirements are often 24-bit non-lossy audio. While multimedia players make good use of (lossy) compressed audio, I really don't think they are representative of software that are distributed with audio. You get the player without any sound clips, and you then collect your music separately. /Per W On Thu, 11 Jan 2007, Roger Furer wrote: > Aloha from honolulu, > If you use a .wav file this is usually uncompressed audio. There > are several compressed audio formats .mp3, .m4a, etc. Microsoft and > Apple each have their own formats that Windows Media Player and iTunes > use. I'm not sure about Unix/Linux, but the point is audio compression > formats exist and deliver reasonable results. Don't try to compress a > .wav file into a .zip and expect to enjoy the listening experience. > (Although that isn't based on my experience--I've never tried it.) > In professional recording the trend now is to record the tracks at > the higest resolution, now 24-bit/196KHz sample rate. Then mix to > stereo file (at same res) then downsample to meet spec for various > formats. Audio DVDs are 24-bit/96KHz and CDs are 16-bit/44.1KHz. Audio > for video is usually 16-bit/48KHz. Note that none of this is > compressed, it is just using less of the original information. > MP3 (MPEG-1 Audio Layer 3) on the other hand is defined as a lossy > compression format where "inaudible" data is removed from the audio > file. Look up "MP3" in Wikipedia http://en.wikipedia.org/wiki/MP3 the > article has information on the various formats in use today. > The compression ratios are quite impressive, but you must choose > what type of compression you use, based on the audio material involved. > Speech can be compressed the most. Loud, hard rock and roll music can > handle a lot of compression. Delicate classical music with large > dynamic range will suffer the most from compression. If you have the > time and tools, run the audio through an oscilloscope and compare > uncompressed to compressed. > Hope this is helpful. > Aloha, > Roger Furer > > Per Westermark wrote: > > > Note that sound is very hard to compress, and for most applications it > > isn't meaningful to spend any time to compress/decompress it. > > > > The only situations where compression is important is when used in flash > > memory of small hand-held devices, or if transmitted over a > > bandwidth-limited media, such as using a GPRS phone. > > > > Cmpiling audio or images into an application is quite often done, and > > works very well. By having the information in the exe file - or even > > better in one or more dll files - the OS will be able to throw away the > > information in case of a mermory contention. If the information is read in > > from a data file (read in, instead of memory-mapped), the OS must swap out > > the information so that it can restore the information later without > > letting the application know about it. Information stored in resource > > files, the exe file or a dll file does not need to be swapped, since the > > OS specifically knows how to load the information on demand directly > > from the original source. > > > > /Per W > > > > On Thu, 11 Jan 2007, Pedro Perez wrote: > > > > > >>Hello; > >> > >> Is not advisable to include a complete audio file in your program, maybe if is a small file you can include it as a resource file. > >> > >> I think the best you can do is to pack it in a file in some format you desire (*.dat), unpack it and use it as desire. (Tip: You can apply a compress format leaving the .dat extension and then encrypt it, that helps too). > >> > >> > >> > >>____________________________________________________________________________________ > >>Any questions? Get answers on any topic at www.Answers.yahoo.com. Try it now. > >> > >>------------------------------------------------------------------------- > >>Take Surveys. Earn Cash. Influence the Future of IT > >>Join SourceForge.net's Techsay panel and you'll get the chance to share your > >>opinions on IT & business topics through brief surveys - and earn cash > >>http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > >>_______________________________________________ > >>Dev-cpp-users mailing list > >>Dev...@li... > >>TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > >>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > >> > > > > > > > > ------------------------------------------------------------------------- > > Take Surveys. Earn Cash. Influence the Future of IT > > Join SourceForge.net's Techsay panel and you'll get the chance to share your > > opinions on IT & business topics through brief surveys - and earn cash > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > _______________________________________________ > > Dev-cpp-users mailing list > > Dev...@li... > > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |