Hi there,
I suppose you haven't seen me around for quite a while.
But yes, MP3 is not freeware.
MPEG-1 or MPEG-2 Audio Layer III, more commonly referred to as MP3, is a
patented encoding format for digital audio which uses a form of lossy data
compression. It is a common audio format for consumer audio storage, as well
as a de facto standard of digital audio compression for the transfer and
playback of music on most digital audio players.
MP3 is an audio-specific format that was designed by the Moving Picture
Experts Group (MPEG) as part of its MPEG-1 standard and later extended in
MPEG-2 standard. The first MPEG subgroup – Audio group was formed by several
teams of engineers at Fraunhofer IIS, University of Hannover, AT&T-Bell
Labs, Thomson-Brandt, CCETT, and others. MPEG-1 Audio (MPEG-1 Part 3), which
included MPEG-1 Audio Layer I, II and III was approved as a committee draft
of ISO/IEC standard in 1991,[8][9] finalised in 1992 and published in 1993
(ISO/IEC 11172-3:1993). Backwards compatible MPEG-2 Audio (MPEG-2 Part 3)
with additional bit rates and sample rates was published in 1995 (ISO/IEC
13818-3:1995).
The use in MP3 of a lossy compression algorithm is designed to greatly
reduce the amount of data required to represent the audio recording and
still sound like a faithful reproduction of the original uncompressed audio
for most listeners. An MP3 file that is created using the setting of 128
kbit/s will result in a file that is about 1/11 the size of the CD file
created from the original audio source. An MP3 file can also be constructed
at higher or lower bit rates, with higher or lower resulting quality.
The compression works by reducing accuracy of certain parts of sound that
are considered to be beyond the auditory resolution ability of most people.
This method is commonly referred to as perceptual coding. It uses
psychoacoustic models to discard or reduce precision of components less
audible to human hearing, and then records the remaining information in an
efficient manner.
OGG uses the .ogg, .ogv, .oga, .ogx, .spx, and .opus
extentions, so it is more flexable.
Ogg is a free, open container format maintained by the Xiph.Org Foundation.
The creators of the Ogg format state that it is unrestricted by software
patents and is designed to provide for efficient streaming and manipulation
of high quality digital multimedia.
The Ogg container format can multiplex a number of independent streams for
audio, video, text (such as subtitles), and metadata.
In the Ogg multimedia framework, Theora provides a lossy video layer. The
audio layer is most commonly provided by the music-oriented Vorbis format
but other options include the human speech compression codec Speex, the
lossless audio compression codec FLAC, and OggPCM.
Before 2007, the .ogg filename extension was used for all files whose
content used the Ogg container format. Since 2007, the Xiph.Org Foundation
recommends that .ogg only be used for Ogg Vorbis audio files. The Xiph.Org
Foundation decided to create a new set of file extensions and media types to
describe different types of content such as .oga for audio only files, .ogv
for video with or without sound (including Theora), and .ogx for multiplexed
Ogg.
As of August 4, 2011, the current version of the Xiph.Org Foundation's
reference implementation, is libogg 1.3.0.
Another version, libogg2, has been in development, but is awaiting a rewrite
as of 2008.
Both software libraries are free software, released under the new BSD
license. Ogg reference implementation was separated from Vorbis on September
2, 2000.
Because the format is free, and its reference implementation is not subject
to restrictions associated with copyright, Ogg's various codecs have been
incorporated into a number of different free and proprietary media players,
both commercial and non-commercial, as well as portable media players and
GPS receivers from different manufacturers.
Waveform Audio File Format (WAVE, or more commonly known as WAV due to its
filename extension), (also, but rarely, named, Audio for Windows is a
Microsoft and IBM audio file format standard for storing an audio bitstream
on PCs. It is an application of the Resource Interchange File Format (RIFF)
bitstream format method for storing data in "chunks", and thus is also close
to the 8SVX and the AIFF format used on Amiga and Macintosh computers,
respectively. It is the main format used on Windows systems for raw and
typically uncompressed audio. The usual bitstream encoding is the linear
pulse-code modulation (LPCM) format. It is also used on some linux, solaris,
and Netware machines.
I Think OGG, out of all 3, is the best. Even though they can be much bigger,
the waveform audio file format can make setup applications, especially
setups that have over 2000 sounds, be really large. Ogg compresses this into
say 168 MB, but people are starting to use .wav, .mp3, or .wma, but they
don't know that this can make setup applications so large that they go into
the GBs. Look at flight simulator X. That's 15.00 GB total, all because it
has .wav and .mp3 files. I've looked into the file formats on my computer
and they're all .wav or .mp3, I haven't noticed ay .ogg file formats at all.
For music packs people should use .mpc file formats.
-----Original Message-----
From: Thomas Ward
Sent: Sunday, January 06, 2013 1:10 AM
To: Gamers Discussion list
Cc: Software developers list.
Subject: Re: [Developers] [Audyssey] for java developpers - playing
wavandmp3 sounds
Hi,
Well, that definitely gives me a clearer picture of what your aiming
for. Before I get into the technical details of working with audio in
Java I would like to point out that ogg might be a better choice than
mp3. The reason I say that is I'm not sure if you are aware of this
but mp3 is a copyrighted and proprietary format and if you intend to
use it in a commercial game or similar you have to pay money to use
the mp3 file format. That's one major reason many game developers etc
are moving to ogg which has the same or better quality and is licensed
under an open source license. The other reason I point out ogg is that
many audio libraries are now supporting ogg and moving away from mp3
do to those same licensing issues.
Now, one thing you did not indicate is what OS you are developing this
game for. Windows, Mac, and Linux all have different audio APIs
available to you so I'm going to be shooting in the dark on which API
would be best for your specific needs here so I'll give you a list of
pros and cons for each possibility.
As of Java 1.4.2 and later Java ships with a basic sound API in the
javax package that is well suited for most games. It can not handle
compressed file types such as wma, mp3, or ogg, but for wav files its
a decent enough API for what you want to do. Using the
javax.sound.sampled.Clip class you can load sound clips, pan them,
control gain, change pitch/frequency, and even handle some simple DSP
effects like echo too. Besides shipping with the Java runtime
environment it works out of the box with Windows, Mac, and Linux JRE
implementations so its really the way to go for anyone wishing to
write a cross-platform game using Java. If you need I can probably
whip up some code samples to show you how to initialize the sound
system and load and play a sound clip using the Java Sound API.
Next is Joal which I've mentioned before. Joal is a Java wrapper for
the OpenAL cross-platform library. The principle advantage of Joal is
that you can write applications that have 5.1 and 7.1 surround sound
audio, have 3d virtualization, as well as handle pitch, gain, and so
forth using OpenAL. The downside here is that it looks like overkill
for your application and OpenAL doesn't have a basic 2d pan control.
Its all 3d audio or nothing. :D
Another option is JSDL which is a Java wrapper for the SDL libraries.
I don't know if it is actively being maintained, is up to date, but
one thing JSDL can do for you is help you access SDL Mixer. SDL Mixer
isn't a really advanced audio library but it is usually very simple to
work with. It has basic 2d stereo panning, allows you to change the
volume/gain of files, and supports a number of compressed file types
such as ogg and mp3 as well as wav, aif, and so on. I've recently
began using SDL Mixer in my own projects and the only disadvantage is
that you can't change the pitch of files on the fly and it doesn't
have many DSP effects. Otherwise its a decent audio library for a 2d
side-scroller etc.
Finally, there is FMOD Ex. This library is a commercial API so it may
cost depending on weather or not you intend to use it commercially.
The advantage here is FMOD has everything you could want including 2d
stereo panning, 3d audio virtualization, ability to change the pitch
and gain of the sounds, handles several audio formats such as mp3,
ogg, wma, wav, aif, and has many built in DSP effects. If you are
developing this game for Windows you can access FMOD via a standard
com wrapper. If you are writing a game for Mac OS or Linux you will
have to write a Java wrapper for FMOD using the Java native interface
or hunt around for an existing wrapper. The only disadvantage to using
FMOD I have ever found is that it is only free for free games. If you
want to use it in a commercial game you will have to pay licensing
fees.
There are a lot of other options here besides those mentioned above
but you'd probably have to dig up documentation for Java or write
custom JNI wrappers for them as I don't know if there are any existing
Java wrappers out there for them. So I decided to give you the most
common options available for you.
Cheers!
On 1/5/13, Felipevr <fvrlis...@gmail.com> wrote:
Thanks very much.
Well, my real idea is develop a sidescroller audiogame, using three
tracks. central, left e right (with this arrowkeys) to move and up-key
to each step.
in this fight game, problably with three or four weapon, maybe use some
atributs - strength and dexterity for example - to define the results of
commands.
the sounds will be used to ambience sound, action song e, I want,
background music.
The itens or npc's can appears in any of this tracks, so, the sound need
to move right, left or right and closer than the sound is, higher need
to be.
I need to controll all this sounds simultaneously, off course.
just the background music need to be in mp3 format, the others wav.
any way, I rope that I could show a little of my ideas.
My Mother Language isn`t English, so if someone was wrong or couldn't be
understand, just tell me.hehe.
thanks again!
_______________________________________________
Developers mailing list
develop...@usagamesinteractive.com
http://usagamesinteractive.com/mailman/listinfo/developers_usagamesinteractive.com
---
Gamers mailing list __ Gamers@audyssey.org
If you want to leave the list, send E-mail to gamers-unsubscr...@audyssey.org.
You can make changes or update your subscription via the web, at
http://mail.audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/gamers@audyssey.org.
If you have any questions or concerns regarding the management of the list,
please send E-mail to gamers-ow...@audyssey.org.