Sound signal with a mp3 file

All,

I have a bit of a problem when you test an application I created on a physical 9530. The following code:

public void playClick() {
    Player player; VolumeControl vc;
    try {
        InputStream is = getClass().getResourceAsStream("/" + "click.mp3");
        player = javax.microedition.media.Manager.createPlayer(is,"audio/mpeg");
        player.addPlayerListener(new PlayerListener() {
          public void playerUpdate(Player player, final String event, Object eventData) {
               if (event.equals(END_OF_MEDIA)) {
                     player.close();
               }
          }
    });
        player.realize();
        player.prefetch();

        vc = (VolumeControl) player.getControl("VolumeControl");
        if (vc != null) {
                vc.setLevel(100);
        }

        Control[] c = player.getControls();
        for (int i=c.length-1; i>=0; --i) {
                if (c[i] instanceof AudioPathControl) {
                    AudioPathControl apc = (AudioPathControl)c[i];
                    apc.setAudioPath(AudioPathControl.AUDIO_PATH_HANDSFREE);
                }
        }

        player.start();

    }
    catch(Exception e){
        System.out.println("ERR: " + e.toString());
    }
}

Works fine in the simulator of 9550. I have also pulled down the standalone Simulator for the 9530. In the two simulators, the above code works when a button is clicked. The sound plays instantly. I call playClick() within the field for each button change listener.

I have ptried placing the click.mp3 in the /res folder or the folders/SRC and it works in two ways in each Simulator. When I sign the code and place it on a physical 9530, application hangs for about 5 seconds after I press the button until the button does what it is supposed to do. Even if the button is his function required, there is no sound. I coded an option to mute and when I choose to turn off the sound, everything on the keys are instant and don't hang up as they do when sound is enabled.

I'm puzzled. I restored the code above, since many messages in this forum on the theme playing sound. I spent the last two days looking for a solution to my problem with no luck. Any help or pointers in the right direction would be most appreciated. Thank you

TEP, sorry for the delay, has had a busy weekend.  In any case, I ran your code verbatim from your first post... it works fine for me on my device the same Build.  I wonder if the media file itself which may be the problem for you.

You can try the other files?  Perhaps a longer more another shorter?  I used the 'click' to http://soundbible.com/783-Click.html mp3 file which is free to download under a license.  That works better for you?

I have re-looked at the journal of debugging, you have validated, an IOException that happens on a call from reading in the file, and since I'm not under what seems like the same conditions of difficulty I wonder if it is the file itself which in the present case.

Let me know if you see the same results with the file I linked to and we can go from there.

Thank you

Tags: BlackBerry Developers

Similar Questions

  • Premiere Pro 7.0 - problems with some mp3 files

    Well, I'm back with a new question. Because I need sound effects for my film, I use sounddogs.com and I get sound effects as MP3 files. First can manage very well, but from time to time I'll get a file first refuses to play, and instead of it gives me no sound at all. Other files in this site work very well, so I have no idea what could be the problem. Any ideas? You guys saved my movie before, I have no doubt that you can do it again. Thanks for any help.

    MP3 files are often problematic. I always convert everything except the tiny SFX (like yours) to 48 KHz 16-bit PCM/WAV to Audition. The great little free-audio editor, Audacity, it will also. Just drag the file in Audacity (or open) and Save_As. fact!

    Most of the issues seems to be with some of the "tricks" that can be in an MP3 player, such as the art of the album.

    Now I have also some SoundDogs SFX, but have never had a problem with one of the time. However, the conversion is almost instantaneous and worked 100% for me.

    Good luck

    Hunt

    PS - Note that conversion to WAV format do NOT recover the fidelity lost with MP3 compression.

  • How to remove the rare sounds 2 mp3 files

    Hello

    Is it possible to do this with 2 mp3 files?

    http://funkyimg.com/U2/438/320/Untitled-1.PNG

    I want to leave intact common sounds

    and delete sounds that differ :|

    for example

    2 songs with the same melody but different lyrics

    Sorry for my English

    And any help would be apreciated

    Ah, I see

    Well, you will always have some echo in the background by removing the box in this way, because there will be some reverb or echo added in post-production to melt the dialog box with the rest of the soundtrack. To be honest, it is very difficult to what you ask.

    One thing you can try (but don't expect too much) is to extract the files from the DVD and hope that the music + FX are stored in one or two audio files and the dialog box in a completely separate for each language track. Sometimes the movies are encoded this way, but it is not usual. There is a tool called Handbrake that allows you to control exactly what you want to import from the DVD. But it depends on the creation of DVD. If traces of different languages (French, German, Japanese, for example) all have the complete soundtrack just with different dialogue box, then there is nothing else you can do, unfortunately.

    If you want really, really Dub your language in a high quality way using professional actors (not only for being a pirate of the film or to make the comedy "remix" of the film), then try to contact the international distributor and say you want to produce a dub of the language. Maybe if you can demonstrate your record and the mix of skills on a scene and there is a market for the film in your country, they will cooperate with you to make an entire soundtrack and you might even win money!

    Generally, you will find the distributor information printed on the DVD or on the screen at the end of the film. You may need to perform a lot of phone and e-mail before you find the right person to talk to, generally distributors do not like to deal with the general public. So to present a professional style and treat it like a business project. Good luck!

  • I can't download to work - it does not copy the mp3 files to my location (as defined in tools/options) - it gives me a new window with a player - no dwnlo

    I am running windows xp sp2 and I put my site to dowload under (Tools/options), but when I select an MP3 file to download, firefox does NOT copy the file to my location of choice on my HD - instead, it opens a new window with a 'player' of fortune and starts to load the player with the MP3 file. The problem is that I have no idea where on my system, firefox has copied this file, so, I can't leave and come back later and read this MP3 file using winamp. I need to hear right then or lose - if I close this new window (with this puny little ' player'), then I lose the download, there where to put firefox on my PC (I have no idea where it is). It's all under firefox 25.0

    I also use FIrefox 12.0 on an older windows 2000 machine and that works perfectly - I can download any MP3 file, I want to, and downloads of firefox 12.0 (on win2k, sp4) to my location (on my HD), and it gives me the download window so I can watch its progress and have some control over break and resume , and, when it's done, the download window offers me the option 'open containing folder' so I can make sure that where I wanted. In other words, Firefox 12.0 on WIn2k, sp4 works better than firefox on winxp sp2 25.0! What gives? I went through and set up my options for XP just like I did with Win2k and everything looks good, but firefox 25.0 don't know just my chosen and always default place to give me fortune player and I am not able to actually copy the mp3 files on my hard drive - it's firerox almost unusable 25.0 since downloading mp3 files is a big part of my use firexfox - please help. I am not able to upgrade windows at this time, and since firefox 12.0 still works fine on win2k, I do not understand what has happened to firefox?

    Hello littleberry, you can click on the link that leads to an mp3 file or right click on the drive in firefox and choose to download the file like that...

  • No built-in mp3 files sound

    I have a site with two mp3 files embedded. At some point, I could no longer hear them. I can't be sure it was when I upgraded to FF 4.0. (They play well in Safari). I went through the routine of all plug-ins troubleshooting; nothing has worked. I have reproduced "combo" a friend - OS 10.6.7, FF 4.0.1 and the same plug-ins active. He can hear the noise; I can't. According to information from Mozilla, I guess that's the QuickTime plug-in, which must play the files. I have the latest version AND I tested it on the Web Adobe and Apple site and there seems to be no problem. Help!

    When you have a problem with a particular site, even your own, a good "first thing to try" is clear your Firefox cache and delete your cookies for the site.

    1. turn off the Cache of Firefox

    Tools > Options > advanced > network > storage (Cache) offline: 'clear now '.

    2. If necessary, remove the cookies from the site

    Right-click on the page, choose View Page Info > Security > "View Cookies".

    Who help me? Otherwise, since this forum focuses on management of the end user. consider posting on mozillaZine Web Development Council. Separate forum, separate registration. Please note the advice in the Post sticky at the top of the forum before posting.

  • MP3 files

    Soon to move to hype pro but just to complete 2 simple children's books using widgets created with Adobe edge and fell into iBooks author and tested on my iPad with iBooks using files mp3 integrated in the widget. Tested several times and impressive features. Should I convert to m4as or stay with the MP3 files in the current project and moving forward with projects future use MP4/ACC?

    I would stick with the by the following guides:

    Audio must be encoded using iTunes as follows (with .m4a as the file extension):

    • Stereo
    • AAC/MP4
    • 256 Kbps

    MP3 works locally, but will not be supported if you want to download the book on the iBook Store.

    Source

    https://help.Apple.com/ITC/booksassetguide/#/itc35b8ca5db

  • Some MP3 files are not recognized by Fuze

    I have a 4 GB Fuze v1. I got this as a Christmas present and want to use it to listen to Audio and video podcasts. I updated the Firmware from V01.01.22A. My problem with him that some MP3 files will not be recognized. MP3 files are on the card of 2 GB external so I, MPT/MSC mode does not matter. For example, "NPR: CarTalk Podcast" in format mp3 will not play but "The Index Investing Show" podcast also in mp3 format will play very well. I first noticed it with downloaded mp3 files iTunes, I do not think it is an iTunes related issue because the same podcast downloaded directly from the NPR site will also fail. No idea what is the problem? Here is the link to the download of the podcast (use the button download MP3/4): http://www.npr.org/rss/podcast/podcast_detail.php?siteId=9911203

    I solved the problem first I used Any Audio Converter to convert MP3 to MP3 with the same audio features. The file is converted to the same sheet worked! I noticed converted file was not any ID3 tag information in the original file. After playing a bit with MP3Tag software and tags removal began, I found that the offending tag has been KIND on the value of 'Podcast '. Fuze does not recognize "Podcast" in the field of the kind so he simply ignored, rather than list it under "unknown". In my view, that it is a bug. Sansa must list the MP3 files under Tote 'Unknown' when 'Genre' tag is present, but the value does not match any of the existing tags.

  • No sound in windows media player (11.0.6002.18111) only trying to play mp3 files. No way of fixing/uninstallation or reinstallation. Need advice!

    I recently encountered a problem with Windows Media Player 11 (a specific version in the title of the topic) where no sound play atall when you try to play mp3 files. When trying to play a track of the progress indicator moves VERY slowly and jumps in a stuttering mode and no sound whatsoever is coming through the speakers. He is a recent problem.

    All audio files work on other audio programs like Real player, quick time e.t.c. and the sound comes from the computer normally. Only the sound that I have are with windows media player when you try to play mp3 files. Still fine read video files, wav files play fine. How boring is that he suddenly decided he likes are more mp3 files!

    More annoying, I stumbled upon the fact that I can't uninstall the reader as in Vista, it is part of the operating system literal, I can't download and install WMP install package from Microsoft because I tried and it tells me that I have a more recent version of Windows media player and therefore impossible to use the downloaded Setup program to install or repair windows media player. It is therefore impossible for me to get an installation package that is newer than the one on the computer, you would have thought that the downloadable installation on the microsoft Web site would be the more recent but no!

    I can't think of a way to solve this problem. For me it feels strongly a Codec issue to do with MP3 and WMP but I don't really know about Codecs enough to go on the setting of the specific Codec with the question, or even track down which codec it is perhaps whether she "is" a codec problem in the first place.

    I tried settings with the menu of options in WMP 11 troubleshooting unsuccessful (obviously), I also tried an audio tool / repair of breakdowns than microsfts audio troubleshooting prompted me to try, that of no problems with the actual audio devices on the system... I KNOW, his problem with WMP and mp3 files!

    So, to summarize, WMP doesn't read MP3 files, I can't run a repair tool that there is no 'installation' to WMP 11 package, it is not an uninstall utility is which means that I can't uninstall it to reinstall a new, I can't download the installation package and run it as apparently I have a more current version than is available on the microsoft Web site. Then what should I do?

    I need some advice on how to go about trying to solve this problem I've hit a bit of a brick wall...

    Any advice would be much appreciated!

    FIXED!

    randomly enough rate and bit depth format sample somehow has set high in the sound control panel, advanced driver.

    After hitting "restore defaults" it resets the depth of rate and little sample return at: 16 bit 44.1 khz

    The sound now plays perfectly.

    Weird it performs only mp3 files!

    Thanks for the help people, it seems that I ended up sorting out on my own though! Yay for me! haha

  • How to read an MP3 file with AudioEffectsManager?

    Hello
    I want to play an MP3 file, which is located in the main folder of the application. I want to use a playFile function, but I have not now, what I like "clazz"?

    I have:
    var test: AudioEffectsManager = new AudioEffectsManager();
    test.playFile ('test.mp3'?),

    I want the test.mp3 will play in the Simulator, because I want to hear it.

    Is the other method, I can hear a MP3 file in the Simulator, located in the main folder of the app with?

    For simple sound, the sound is all you need.

    [Embed(source="assets/sounds/swap.mp3")] private var my_sfx:Class;
    ...
    
    var snd : Sound = new my_sfx() as Sound;
    snd.play();
    
  • There is no sound when I import an mp3 file?

    Screen Shot 2015-01-01 at 1.11.24 AM.png

    This is what my screen looks like and yet whenever I click on play, there is no sound. I tried to insert an mp3 file, a wav file, and even a mp4, and yet, there is no sound. With mp4, the film was clearly presented, less noise. I have tried everything I can thing of, and nothing seems to work. Is there something I can do?

    Have you tried clicking on 'Preview Ram' in the ' Preview section, this is the only way to hear the audio in after effects, just clicking on play will not work. "

  • Two problems with MP3 files for interactive PDF files

    1. I put in two excerpts from interview to an interactive pdf. Last week when I tried to import the first MP3, I had him "cannot place this file. "Error message no filter for the requested operation." I don't know anything about audio files, so I tried just to MP3 on the App store, which has converted my MP3 file to another MP3 file, I guess. The new file has worked well.

    I got the second file today and had the same problem. I sent the following URL (esign-cs5-which-was-edited-with-audacity-and-converted-with-switch, http://indesignsecrets.com/forum/general-indesign-topics/how-to-place-an-mp3-file-into-ind http://indesignsecrets.com/forum/general-indesign-topics/no-filter-found-for-requested-ope mp3-ration) I found which seem to describe problems similar to our sound guy at work. He tried to reduce the bitrate, but it won't do any good. So when I got home, I tried MP3 and it solved the problem again.

    Anyone know why this is happening?

    2. once I got the first audio file in place, I wanted to replace the little gray box that Acrobat highlights. Bob Levine suggested

    http://InDesignSecrets.com/hiding-sound-files-in-an-interactive-PDF.php

    that worked great, but I needed a way to control the sound. I tried a variant of Steven Werner suggestions in

    http://InDesignSecrets.com/hiding-sound-files-in-an-interactive-PDF.php

    It was working fine, when I was just a play button / pause, but when I added a curriculum vitae, the play button just stopped working. I tried all kinds of variations, to get rid of stocks double in the buttons from the new files, new buttons, but the play button just didn't work. In my last essay, the play button worked, but only after I had press resume. So I'm completely puzzled.

    Any suggestions would be welcome. Thank you.

    I use InDesign Mac OS x 10.6.8 7.0.4

    Chris

    Not really sure on the second part, but I've seen the behaviour you describe with video files. I have just run through Adobe Media Encoder.

    Which version of Acrobat you test in?

    Bob

  • How to exchange a mp3 file with another without losing metadata?

    I like to follow my iTunes library usage statistics, and I have a file of the song I want to replace it with a newer version. (The latest version is a more long/extended cut of the file that I currently have). I don't want to lose the metadata of the file. Is there a way I can exchange the old by the new and that iTunes file to associate the metadata of the old with the new file?

    Thanks for your help!

    TheJailbreakGenius wrote:

    I like to follow my iTunes library usage statistics, and I have a file of the song I want to replace it with a newer version. (The latest version is a more long/extended cut of the file that I currently have). I don't want to lose the metadata of the file. Is there a way I can exchange the old by the new and that iTunes file to associate the metadata of the old with the new file?

    Thanks for your help!

    If metadata, you mean the game number, no problem.  Leave the track in your library.  Right click, view in the Finder to find its corresponding file.  Delete the current MP3 file and replace it with the new file.

  • Writing of signals with different sampling to file rate

    Hi all.

    I have a somewhat periodic signal, each cycle having his inerference S.A max, min, mean, RMS ect.

    I like to write * ALL * these data to a single file, with a scale of absolute time, where the cycle data will be stamped with the maximum of the cycle time.

    cycle data columns must be empty at the time as the time of the signal peak value.

    Who's asking 2 questions:

    1. can I build a 'waveform' with a not constant sampling rate where I just stamp each data point arbitrarily? This will help me to get the result I want?

    2. is there a better way to convince labview to write data of the cycle next to the signal, with time stamp correct?

    An example is attached.

    Thanks for the tips...

    10 x Heuter, your example is useful - the problem is resolved.

  • The weird sound quality with backlight Fuze and mp3 VBR

    Hello world

    I got my Sansa Fuze (firmware 01.01.11F) 2 weeks and I have noticed a weird problem:

    When I'm playing some VBR mp3 files, the duration is not displayed correctly. Files of start playing very well, but when the backlight of the screen gets off (settings I tried different time, show all the same problem), the sound quality deteriorates strongly. These are mp3 files that I ripped directly from audio CD, samples are available on request.

    Has anyone else had this problem?

    Kind regards

    Soenke

    The question is under development.  Lower rate VBR can trigger the processor at a slower pace, the origin of the problem.  If the backlight is on, there is more work for her, and the rate increases.  The noise disappears.

    The decline in the rate increases the battery time.  This problem will be resolved in a future firmware version.

    Bob

  • I want to use sound recorder to save as wav audio is not wma... How do I save it as a wav or mp3 file in order to make a cd and read it in my car?

    I want to use sound recorder to save as wav audio is not wma... How do I save it as a wav or mp3 file in order to make a cd and read it in my car?

    Hello

    1 are you referring to the sound recorder program in Windows?

    2. you have all the music you want to convert to WAV?

    3 are you referring to the "Sound Converter" when you say 'tape recorder '?

    If so, you can use third party software to convert WMA to WAV audio format.

    Note: The use of third-party software, including hardware drivers can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the use of third-party software can be solved. Software using third party is at your own risk

Maybe you are looking for