Results 1 to 7 of 7
  1. #1
    Saran185 is offline Member
    Join Date
    Jan 2011
    Posts
    36
    Rep Power
    0

    Default mp3 file length..kindly help

    hi..
    iam using javax.media.*;
    to play wav,mp3 files. i want to display total duration of audio file. i.e i want the time in seconds of the entire audio file. What is the cmd to be used. i tried with player.getDuration. is it the correct way to follow.plssss help me.

  2. #2
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,565
    Rep Power
    12

    Default

    What happened when you tried that?

  3. #3
    Saran185 is offline Member
    Join Date
    Jan 2011
    Posts
    36
    Rep Power
    0

    Default

    i got the return value as time i.e. for eg: time@173ec72..now wat should i do to get the value as seconds or milliseconds. .. i am not sure whther the function getDuration returns the correct time length of the audio file.

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is online now Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,236
    Rep Power
    19

    Default

    Have you read the API for the javax.media classes you are using?
    JMF 2.0 API (03/10/01)

    What class is the returned value from Player#getDuration()?

    What methods does that class have?

    db

  5. #5
    Saran185 is offline Member
    Join Date
    Jan 2011
    Posts
    36
    Rep Power
    0

    Default

    the getDuration method is in player class. Other methods are getmediaTime()
    getStopTime(), get Mediananoseconds().
    the method getduration are imported from javax.media.Duration.
    I invoked it as player.getDuartion().

  6. #6
    DarrylBurke's Avatar
    DarrylBurke is online now Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,236
    Rep Power
    19

    Default

    I see I have to repeat myself
    What class is the returned value from Player#getDuration()?

    What methods does that class have?
    db

  7. #7
    DarrylBurke's Avatar
    DarrylBurke is online now Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,236
    Rep Power
    19

Similar Threads

  1. Kindly Help me..DICE PROGRAM
    By aronkevin in forum Advanced Java
    Replies: 1
    Last Post: 10-08-2010, 07:32 AM
  2. kindly help for getting JcheckBoxes in Jtree
    By sonyerricsonk750i in forum AWT / Swing
    Replies: 1
    Last Post: 08-07-2010, 07:14 PM
  3. Kindly assist me...
    By delbg in forum New To Java
    Replies: 7
    Last Post: 02-05-2009, 03:52 AM
  4. kindly answer the queston in attachment file
    By abhinav_jain09 in forum Advanced Java
    Replies: 11
    Last Post: 09-19-2008, 04:47 PM
  5. Kindly Help me to apply Stylesheet
    By AMATYA-CHANAKYA in forum Advanced Java
    Replies: 0
    Last Post: 03-18-2008, 06:30 AM

Posting Permissions

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