How to use playtone() to play a melody?

I wrote an application to read the unique music using playtone() notes. However, as this function is non-blocking, I not know I need logic to tell me when the note is made before playing the following in sequence (I like to play a simple melody together). I tried to use just thread. Sleep (), but everyone seems to agree it is very bad (and it works poorly or not at all for the tight sequencing.)

So, what to do? Can someone please tell me is "hey dummy, do not use playtone() to read a sequence of notes, use xyz...". (whatever), or "Here's how to wait playtone() finish before playing the next note."

Yes, I know that I am a dummy! So please enlighten me - how to play a sequence of notes properly! (PS I use a Curve 8310). Thank you forever!

Roricka

I don't know if it works for playtone (never tried), but I think we can connect up to a PlayerListener which should give you an END_OF_MEDIA event to the ToneControl. See the documentation for the api:

http://www.BlackBerry.com/developers/docs/4.5.0api/javax/microedition/media/PlayerListener.html

Tags: BlackBerry Developers

Similar Questions

  • How is Samsung TV, possible to permanently hide the message that explains how to use Air play via Apple TV?

    How is Samsung TV, possible to permanently hide the message that explains how to use Air play via Apple TV?

    Apple Tv has the conference room mode turned on causing the message to appear.  Turn it off:

    On restrictions of airtime and the mode of the conference room on your Apple TV - Apple Support

  • my knee is locking when I used it to play nfs most wanted. How to use without blocking?

    my knee is locking when I used it to play nfs most wanted. How to use without blocking? and how to find the size of the graphics card to my lapto?

    Hello


    To know the exact size of the graphics card, you can refer to the following steps:

    (a) click Start, type run, press enter

    (b) type dxdiag in the run, press enter

    (c) it opens the DirectX Diagnostic tool

    (d) go to the screen to know the exact memory of the graphics card.

        

    NFS Most Wanted issue:

    Method 1:  Make sure that the computer meets the minimum system requirements to run the game.

    Method 2: Direct X: update

    Which version of DirectX is on your computer?

    http://Windows.Microsoft.com/en-us/Windows7/which-version-of-DirectX-is-on-your-computer

    Download and install the latest version of DirectX from here:

    http://www.Microsoft.com/en-US/Download/details.aspx?ID=35

    Method 3: To uninstall and reinstall graphics card drivers.

    See the following steps:

    (a) click Start, right click on computer.

    (b) click on properties, click on Device Manager

    (c) Expand, graphics card, right click on the card option, click on uninstall

    (e) now go to your computer/device manufacturer site, download the updated drivers and install them.

    Reference:

    Updated a hardware driver that is not working properly:

    http://Windows.Microsoft.com/en-us/Windows7/update-a-driver-for-hardware-that-isn ' t-work correctly

  • How to use audio only AirPlay on iOS10?

    HI guys, maybe I'm stupid, but I can't find how to use streams of music after upgrade.

    UseCase:

    -listen to music through headphones on my way back

    -When reached on home stereo and activate AirPlay

    iOS9 - low slide menu - AirPlay - Audio sent to Apple TV and stereo, play music (took about 3 seconds)

    iOS10 - slide down menu - AirPlay - there is only activate AirPlay with mirroring. That is originally for my TV to turn on automatically and also phone is drained and you know - I want to use only phone no stream all on television.  (Past 10 minutes, and can not find how to do this)

    Any tips?

    Hello Tomas Vrabec,.

    Thank you for using communities of Apple Support. Information you provided, it looks like you are unable to use AirPlay to play only mirroring content after upgrading to iOS 10. Surely, I understand your concern, especially since it worked as you need on the previous version of the software. I'm happy to help you.

    Looks like you are taking the correct steps. First of all, I recommend you restart. This can solve a lot of unexpected errors. Use the restart below steps if necessary.

    1. Press and hold the sleep/wake button until the Red slider appears.
    2. Drag the slider to turn off your device completely off.
    3. Once the device turns off, press and hold the sleep/wake button again until you see the Apple logo

    Restart your iPhone, iPad or iPod touch

    If the problem persists, please use the steps and pictures in the link below for more information on troubleshooting:

    Get help with AirPlay and AirPlay Mirroring on your iPhone, iPad or iPod touch

    Have a wonderful day!

  • HP Slimline S5 - 1120D: how to use VGA internal?

    Hello

    I am currently using Windows Update to 10 anniversary and my screen turns off after a few minutes I have to play the game. It says "VGA: No Signal.

    How to use the other port VGA on my PC? Currently, they are covered with plastic and has "do not remove" on the subject.

    Coming from my PC with NVIDIA GT 520 graphics card, but I think that this graphics card is broken now.

    Can I remove my VGA card and use the other ports? Or do I need to change some settings?

    Kind regards
    Delegation of Dian

    Hello:

    Before physically uninstall the graphics card from nvidia, uninstall it in Device Manager.

    Go to Device Manager, expand the category of device of graphics cards.

    Make a right-click on the graphics card from Nvidia that there are listed and choose uninstall.  Also check the uninstalling the driver box.

    Do not restart the PC you are prompted.

    Go to control panel > programs and uninstall all software listed Nvidia.

    Once this is done, turn off the PC, remove the graphics card.

    Remove the covers of video ports, plug your monitor DVI or VGA port (your choice) and turn on the PC.

    The switch must be automatic and I think W10 will find and install the Intel HD graphics driver.

  • Camileo X 100-how to use with other software?

    Hello

    I have a camera video camileo x 100. Can someone tell me how to use this unit on other software rather than the CRA? Won't codec, I use vegas video 8 and I try to convert you arc soft video converter, the only problem is

    1. I don't see video without audio
    2. regardless of the profile, I chose the converter does not give me the original size I shot the video
    3. the video is really badly coded and his jumps every time I press on play or make.

    Can you recommend some sort of software where I can convert these files and always keep it without loss?

    I think that it is a terrible problem! Why do you make a camera where you can not even change freely with a versatile codec? The arc soft video demo edition is low and in my opinion it is not supposed to buy a camera with these limited edition modes

    I would be really appreciated if someone could give a suggestion for a converter that can be used!

    Thank you!

    Hey,.

    Identical or similar question already here:
    http://forums.computers.Toshiba-Europe.com/forums/thread.jspa?threadID=56484&TSTART=0

    I m X 100 not owner, but I Camileo H30 is I think its predecessor and it generates AVI video files and I can use those files with each program. Image and sound are working correctly, even the camera software is not installed.

    I don t know what Vegas Video 8 program, but normally each program can handle avi files. Also check the page of manufacturing of this video program for an update.

    I hope that helps! :)

    Welcome them

  • Satellite A210 - how to use the muldimedia with other than Media Player buttons

    Hello

    is it really not possible to use media keys (Play, Pause, FF) on top of my laptop for an application other than Windows Media Player?
    Is there a reason for this? I would like to control Winamp with this button.

    It seems quite sensless to restrict access to a SINGLE application of HUNDREDS available, a then it is the multimedia player that is not used by most people.

    I have the Satellite A210 Notbook.

    Can you tell my how to control my winamp with these buttons?

    Greetings from Robert

    Hello, Robert

    Unfortunately, there is no solution at the moment. If you check this forum, you will find several very interesting discussions on the multimedia buttons and Winamp player. The fact is that some people have found the solution for older models of laptops running Windows XP Home edition. Winamp has offered the plugin must be installed.

    We now have the new situation. Your laptop is running latest Vista OS and I didn t find any plugin that can help. Problem is that your laptop is designed for Windows Vista preinstalled OS contains all the necessary plugins for Windows media player running under the operating system preinstalled.

    Is any kind of restriction. With preinstalled operating system you can do what you want and if you can find a way to change it for that. You know very well that there are hundreds of different players in the market. You can't wait for Toshiba take a time and create a plugins for each other and satisfy customers around the world.

  • Only when you use Facebook to play games, specifically Bejeweled Blitz, lately it hangs or is extremely slow.

    Only if you use Facebook to play games, specifically Bejeweled Blitz, lately it freezes completely or suddenly is so slow I'm bangining the key to get the mouse to move. Now playing the same game, but not through Facebook, he normally plays at the correct speed. Unfortunately only on Facebook are there applications, so I prefer to play there, even if I bought the game, there is not all the add ons. I can do to get the game to replay correctly?

    original title: problems of Facebook games

    Hi PamelaMarcus,

    ·         What web browser do you use?

    ·         Did you do changes on the computer before the show?

    ·         It was working fine?

    ·         You get the error message?

    If you are using Internet Explorer, follow these methods.

    Method 1: Follow the steps in the article.

    Can't access some Web sites in Internet Explorer

    http://support.Microsoft.com/kb/967897

    Method 2: Perform an optimization of Internet Explorer on the computer of the article.

    How to optimize Internet Explorer

    http://support.Microsoft.com/kb/936213/ro

    Note: Reset the Internet Explorer settings can reset security settings or privacy settings that you have added to the list of Trusted Sites. Reset the Internet Explorer settings can also reset parental control settings. We recommend that you note these sites before you use the reset Internet Explorer settings.

    Method 3: Update the latest version of the flash player.

    http://get.Adobe.com/flashplayer/

    Method 4: Update the graphics/display drivers.

    How to manage devices in Windows XP

  • How to use or implement an ICS on my computer (or maybe Xbox) so that I can make calls using my phone VOI?

    My provider of VOI (BasicTalk) informed me that I could filter my phone via my computer using an ICS. My phone receives calls but I cannot be heard when I try to call. I live far, far in the glue... can't even get cell phone service and I had to get internet through flat (hughes aircraft). I mainly use the CAR phone as an answering machine... when a call comes in, I play back, the message, and then sink 25miles into our nearest town to get cell phone service and make my calls by cell phone. I have no other options available for the telephony service. It's obnoxious, but that's all I have right now. I knew that the CAR would work this way, but I decided that it was better than nothing. When I discovered that my son is able to use its earpiece via Xbox Live and has no trouble at all, I thought that there must be a way around this problem. So I called basic talking and they told me that it was no help... after that I begged for help, they finally checked around and advised I could use a VOI and gave me this address Windows. I found the site of ICS, but still don't know how to use the phone on this system... Any ideas or suggestions? Any help would be greatly appreciated!

    Hi Rhonda,

    You can, see the following Microsoft article and check if that helps.

    Using ICS (Internet Connection Sharing)

    Keep us updated on the State of the question

  • How to use a sony pslx-300 with wondows 7

    How to use my turntable sony PSLX300 with windows 7?  My pc dooes not play vinyl with the turntable, using the usb connection.

    How to use my turntable sony PSLX300 with windows 7?  My pc dooes not play vinyl with the turntable, using the usb connection.

    The free Audacity software might be worth a try:

    Audacity
    http://Audacity.sourceforge.NET/

    Features of Audacity
    http://Audacity.sourceforge.NET/about/features

    Audacity tutorials
    http://Audacity.sourceforge.net/manual-1.2/tutorials.html

    How to scan discs vinyls, audio tapes and minidiscs?
    http://Audacity.sourceforge.NET/help/faq_i18n?s=recording&i=records-tapes

    How to record tapes to PC/computer
    http://www.online-tech-tips.com/computer-tips/transfer-audio-cassette-to-computer/

    How to copy tapes to hard drive
    http://www.WikiHow.com/copy-cassettes-to-computer-hard-drive

    Transferring tapes and records to computer or CD
    http://wiki.audacityteam.org/index.php?title=Transferring_tapes_and_records_to_computer_or_CD

    How to save my recording on an audio CD?
    http://Audacity.sourceforge.NET/Help/FAQ?s=files&i=burn-CD

    Audacity can record RealAudio or other audio streams?
    http://Audacity.sourceforge.NET/Help/FAQ?s=recording&i=streaming

    Recording with Audacity
    http://Audacity.sourceforge.net/manual-1.2/tutorial_basics_4.html

  • How to close a song played in the music of xbox

    While I have a song to play if I can't listen to most how to stop more songs playing music and shut the application down I can't rewind before the break, but stop and close to finish listening

    Hi LeslieO'Brien,.

    Thanks for posting in Microsoft Community!

    I understand it, when you want to stop the songs to play and to close the application you can't do go back so that you can pause, fast forward, but cannot stop and close to finish listening.

    I would like to inform you that it has no function as well to stop the music of the game, but you can pause and play any song of your choice.

    Here, you will use the pause button to stop the music. To close the application, you need to press ALT + F4. This will close the music app. For more information, feel free to post. I'll be happy to help you.

    See also:

     

    How to close an app?

    http://Windows.Microsoft.com/en-us/Windows-8/how-close-app

    Thank you!

  • Im trying to open the tutorial of 23 minutes on how to use different tools in photoshop and it continues to come with unable to resolve the DNS servers worked fine yesterday? Ive had creative cloud on my laptop for a week and still have not been able t

    Im trying to open the tutorial of 23 minutes on how to use different tools in photoshop and it continues to come with unable to resolve the DNS servers worked fine yesterday? Ive had creative cloud on my laptop for a week and not yet able to get past the basics make me very frustrated.

    I guess you meant the links when you open photoshop CC. I tested all four videos of the 23 min tutorial and they all played fine. If something between you and adobe does not work correctly.

    • Check that your firewall is blocking the net. Try to access youtube videos and see if they play very well
    • Go to the adobe tv site and try to play one of the videos here. Adobe TV
    • If youtube plays very well and adobe tv does not work, next is to check if you have flash installed. Some videos require flash, others are html 5. Sorry that I could not confirm what player has been used for this tutorial. I think that html 5 but not sure.
    • Next is to look at the properties of your browser and check multimedia settings are not disabled if it y in a. (this is totally dependent on the browser)

    If none of this helps, let us know.

  • How to use the same point of view as read only in the ADF and editable

    Hello

    How to use the same point of view as read only in the ADF and editable? How can we succeed in TF?

    -James

    Hello

    Steven Davelaar wrote a presentation on this 'building highly reusable Taskflows.

    From slide 14, that's where your use case comes into play

    Frank

  • How can I learn how to use the effects affect for the 1st time?

    Download to help me with the aftect effect: 'Now Playing' for my movie maker. I'm frustrated b/c I don't know how to use it.

    I see that Rick has already you linked to my favorite updated resource on the way, but I wanted to warn you that EI is not a very easy to learn program. It's a real pleasure once you know what you're doing, but it will take a few months before you really understand how to use it - and it'll take a lifetime to master. It is a very powerful program, and as such, it has a steep learning curve.

    Do not expect to pick up in a day.

  • How to use the Fusion and my whole bootcamp partition?

    Here's what I want to do...

    I have a bootcamp with Windows XP partition on this already...  I installed merger and created a brand new Windows XP on it and everything goes smoothly.  There are times when I want to start windows in my score so I can play my games without having to run two operating systems at the same time.

    I was able to do this with Parallels for a long time, but I have since then switched.  My question is...  How to use my bootcamp with merge partition?  I just want to be able to run Fusion when I'm not playing games, and when I am, simply restart so I can get my complete resources of computers.

    Well, the reason why you did not see the Virtual Machine library window was because the Windows XP Home Edition virtual computer is configured to start automatically when the merger opens such indicated by the orange and white star.  By clicking on the orange/white star if he stops automatically load and clicking on the blue/white star it will become orange/white

    Just a little note... The CONTENT on Bootcamp is not what I want to use. I want to use Windows XP from VMWare Fusion I have done, but on the training camp of partition.

    Based on what you said it sounds like what you want to do a (Virtual, physical) V2P transfer and while this is feasible technically is not necessarily a simple process and V2P requires that the source properly prepared to be transferred to a different material and then an Image created, and then loaded into the Boot Camp partition.  It is outside the scope of his abilities and VMware Fusion and requires the use of tools 3rd party and knowledge of such a process of preforms.  IMO, if one may wonder how to do that, so it's just better than you manually rebuild the Boot Camp partition to suite your needs if the current configuration does not meet your needs.  That said a clean generation always produces a less problematic situation and provides long-term for a better overall performance however if you want to search the forum or Internet V2P or physical Virtual you can find more information on what it has been covered before.

Maybe you are looking for

  • Satellite Pro A100/P100 - compatibility touchpad

    Hello I have a Toshiba Satellite Pro A100 and I saw pictures and videos on the internet of people have these keyboards LCD that illuminate blue and have shortcuts but only touchpads I can find like that correspond to the P100 and ino models some of t

  • Satellite X 200-219 does not supply power to the top after intense use OpenGL

    After programming for OpenGL and a case of "slow BONES" for a few minutes, the screen is blank. I stopped him with force with the stop button and now there are no leads at all with battery or AC, it doesn't start at all, it is quite dead. It is certa

  • Y510p BIOS will not update

    I just tried to install the new BIOS for my y510p that came out July 2, but when I tried to run, I got "BIOS version compare error! I have no idea why this is happening. Any help would be appreciated, I know how much we all love a new BIOS . Thank yo

  • How can I get 8.0 Windows media for my HP laptop?

    I have a laptop HP with Windows 8.0.  I am plotting to install a new SSD drive and need the support of Windows for a clean install. How he ask to HP?  I don't see on a research forum.

  • Icons from the desktop and menu start locked on logon / closing of internet explore

    Why the icons and the menu start locked on my desk with a log on and then when close internet explore in windows 7? I have to use ctrl alt delete to unlock items and then there are moments that just the start menu is locked and the desktop icons can