Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / February 2005

Tip: Looking for answers? Try searching our database.

Reading in MP3s

Thread view: 
DavidSaunders9 - 18 Feb 2005 17:47 GMT
Hi

I am currently performing my University 3rd Year Project and need some
help in using Sun's mp3 plugin to read in mp3 files. I am unsure of
which classes I should be using to read in the data from an mp3 file
and then be able to get the audio bytes and the files AudioFormat out?

Any help would be much appreciated.

David Saunders
Knute Johnson - 18 Feb 2005 18:51 GMT
> Hi
>
[quoted text clipped - 6 lines]
>
> David Saunders

David:

I haven't tried it but I think all you need to do is install the MP3
plugin and then use AudioSystem.getAudioInputStream() to read the file.

If you want send me a small MP3 file and I'll try it.

Signature

Knute Johnson
email s/nospam/knute/

DavidSaunders9 - 19 Feb 2005 11:18 GMT
> > Hi
> >
[quoted text clipped - 13 lines]
>
> If you want send me a small MP3 file and I'll try it.

I have sent a sample mp3 file to your email address, thank you ery
much for your help.

When I tried it it still says its an unsupported file exception, but I
may have installed the plugin wrong. Any advice/help is much
appreciated.

David
DavidSaunders9 - 19 Feb 2005 14:06 GMT
> > Hi
> >
[quoted text clipped - 13 lines]
>
> If you want send me a small MP3 file and I'll try it.

Ok, I have been able to get the mp3 plugin fully installed and working now - wahoo!

The program is able to read in tha file, but a calls to

audioInputStream.getFormat().getFrameSize() and
audioInputStream.getFormat().getSampleSizeInBits() both return values of -1.

Why is this? Is the plugin unable to retrieve the files actual properties?

Any help is much appreciated.

David
Knute Johnson - 20 Feb 2005 05:04 GMT
>>>Hi
>>>
[quoted text clipped - 26 lines]
>
> David

David:

I'm not an MP3 expert but I believe that the frame size and sample size
are not fixed in an MP3 file.  I'll play with your file tomorrow.  Been
working all day and just got home.

Signature

Knute Johnson
email s/nospam/knute/



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.