Results 1 to 3 of 3
  1. #1
    Wolverine1992 is offline Member
    Join Date
    Nov 2012
    Posts
    2
    Rep Power
    0

    Default Using JMF player.setRate to playback mp3 files at different speeds

    Hi, I am a somewhat new Java programmer and i have managed to set up a player, and playback a local mp3 file, however, I would like to be able to change the speed/tempo at which the mp3 is played. I believe player.setRate(float a) is the way to do it, however, calling that method after realizing, but prior to starting does not seem to make any noticeable difference. I tried arguments such as setRate(1.0) and setRate(1000.0). I also am aware that in the API, it says that players only garuntee a rate of 1.0, so I suppose it is possible I may not be able to change this rate.

    Thanks in advance for any insight.

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,452
    Rep Power
    20

    Default Re: Using JMF player.setRate to playback mp3 files at different speeds

    According to the documentation,
    The setRate method returns the actual rate set by the Clock.
    In your program, what value does setRate(...) return?

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    Wolverine1992 is offline Member
    Join Date
    Nov 2012
    Posts
    2
    Rep Power
    0

    Default Re: Using JMF player.setRate to playback mp3 files at different speeds

    It returns 1.0 even if I enter 100.0 in as an argument, which would explain why it isn't changing the rate of play.

Similar Threads

  1. stoping playback of a mp3: javazooms JLayer
    By dko in forum Advanced Java
    Replies: 0
    Last Post: 05-16-2011, 06:24 AM
  2. slowing down playback of mp3
    By paddala in forum Advanced Java
    Replies: 0
    Last Post: 10-17-2010, 01:14 AM
  3. continuous playback of chunks
    By arnab321 in forum CLDC and MIDP
    Replies: 0
    Last Post: 12-11-2008, 09:46 PM
  4. Please complete the setRate mthod
    By Adiel224 in forum New To Java
    Replies: 6
    Last Post: 09-19-2008, 11:41 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
  •