Read the audio data from resource on the storm

Hello

I'm reading a mp3 file on the storm.

//first we need to find the supported content types
String types[] = javax.microedition.media.Manager.getSupportedContentTypes(null);
for (int cnt = types.length - 1; cnt >= 0; --cnt) {
       if (types[cnt].equals("audio/mpeg")) {
       //this sample demonstrates playing an MP3 file that has been
       //added as a resource to the project
       try {
              //retrieve the MP3 file
              Class clazz = Class.forName("myclass");

              InputStream is = clazz.getResourceAsStream("/r.mp3");
              //create an instance of the player from the InputStream
              Player player = javax.microedition.media.Manager.createPlayer
              (is, "audio/mpeg");
              player.realize();
              player.prefetch();
              //start the player
              player.start();
        } catch (Exception ex) { }
        } else if (types[cnt].equals("audio/x-wav ")) {
        //this is where you would play wav files
        } else if (types[cnt].equals("audio/midi ")) {
        //this is where you would play midi files
        }

}

I got this code from the how-to - read KB Article audio. And I added the r.mp3 as a file file to the project. I do that right? He does not play sound.

Can someone help me on this?

Thank you.

javec

First, see this thread for an example of 'work '.

http://supportforums.BlackBerry.com/Rim/Board/message?board.ID=java_dev&message.ID=11616&query.ID=29...

Second, if you run 4.7.0.75, there is a known issue where the sound will not play through the speakers (only the helmet).

http://supportforums.BlackBerry.com/Rim/Board/message?board.ID=java_dev&thread.ID=11963

Tags: BlackBerry Developers

Similar Questions

  • L50-A-19N satellite can not read audio data from multiple sources

    I can't read the audio data from multiple sources. It is very annoying when I have 2 youtube videos, playing, if I start playing something on the media player, there is no sound on media player, it's the same when I have 2 open media players and 1 youtube video playing, youtube video has no sound...
    It disappears when I plug my headphones...

    I already have all the latest drivers, the DTS driver was last updated was in 2014, his day of February of this year...






    25/02/14

    DTS Inc. Windows 8.1 - 64 Bit 1.01.2700

    I don't know if this has the feel, but I had his most recent DTS driver that I found, it is not my laptop model, but they all seem to be the same - v1.1.88.0
    I uninstalled the DTS software and still had the same problem, then it is irrelevant on its driver somehow...






    02/10/15

    Integrated Device Technology Inc. Windows 8.1 - 64 Bit 6.10.6491.0

    Audio driver IDT has more recent release date, but the version of the driver is the same as the 2013 one...
    Why the older drivers of toshiba releaseing as 'NEW '?

    2nd is my Advanced settings speakers, nothing has changed when I disabled "allow applications to take exclusive control of this device.

    Sorry but I don't understand your problem.
    I tested it on my machine and if I start the music on three different sources (YouTube, player, web radio) I can hear all together, but it makes no sense to listen to music from different sources.

    Or how do understand you?

  • global variable functional to read and write data from and to the parallel loops

    Hello!

    Here is the following situation: I have 3 parallel while loops. I have the fire at the same time. The first loop reads the data from GPIB instruments. Second readers PID powered analog output card (software waveform static timed, cc. Update 3 seconds interval) with DAQmx features. The third argument stores the data in the case of certain conditions to the PDM file.

    I create a functional global variable (FGV) with write and read options containing the measured data (30 double CC in cluster). So when I get a new reading of the GPIB loop, I put the new values in the FGV.

    In parallel loops, I read the FGV when necessary. I know that, I just create a race condition, because when one of the loops reads or writes data in the FGV, no other loops can access, while they hold their race until the loop of winner completed his reading or writing on it.

    In my case, it is not a problem of losing data measured, and also a few short drapes in some loops are okey. (data measured, including the temperature values, used in the loop of PID and the loop to save file, the system also has constants for a significant period, is not a problem if the PID loop reads sometimes on values previous to the FGV in case if he won the race)

    What is a "barbarian way" to make such a code? (later, I want to give a good GUI to my code, so probably I would have to use some sort of event management,...)

    If you recommend something more elegant, please give me some links where I can learn more.

    I started to read and learn to try to expand my little knowledge in LabView, but to me, it seems I can find examples really pro and documents (http://expressionflow.com/2007/10/01/labview-queued-state-machine-architecture/ , http://forums.ni.com/t5/LabVIEW/Community-Nugget-2009-03-13-An-Event-based-messageing-framework/m-p/... ) and really simple, but not in the "middle range". This forum and other sources of NEITHER are really good, but I want to swim in a huge "info-ocean", without guidance...

    I'm after course 1 Core and Core 2, do you know that some free educational material that is based on these? (to say something 'intermediary'...)

    Thank you very much!

    I would use queues instead of a FGV in this particular case.

    A driving force that would provide a signal saying that the data is ready, you can change your FGV readme...  And maybe have an array of clusters to hold values more waiting to be read, etc...  Things get complicated...

    A queue however will do nicely.  You may have an understanding of producer/consumer.  You will need to do maybe not this 3rd loop.  If install you a state machine, which has (among other States): wait for the data (that is where the queue is read), writing to a file, disk PID.

    Your state of inactivity would be the "waiting for data".

    The PID is dependent on the data?  Otherwise it must operate its own, and Yes, you may have a loop for it.  Should run at a different rate from the loop reading data, you may have a different queue or other means for transmitting data to this loop.

    Another tip would be to define the State of PID as the default state and check for new data at regular intervals, thus reducing to 2 loops (producer / consumer).  The new data would be shared on the wires using a shift register.

    There are many tricks.  However, I would not recommend using a basic FGV as your solution.  An Action Engine, would be okay if it includes a mechanism to flag what data has been read (ie index, etc) or once the data has been read, it is deleted from the AE. 

    There are many ways to implement a solution, you just have to pick the right one that will avoid loosing data.

  • read and receive data from the server

    Hi all

    I want to develop an application that extract data related to the content of the server, how to do? I read somewhere stating this task requires sdk server push? is it possible do not use push sdk server and the server reading so that I don't have install anyting from the server.

    Your Web service code decides how much data you send or receive from the customer.

    For example, you can have a Web service method, which returns records to a particular date, then you must create a web service method that accepts a date to a string as a parameter and a request for service records of server request, write resultset in encoding (like xml, json, etc) and return this string as a response to the client client will read the data as a byte array, then converts the byte array to the string and according to the encoding defined by service will analyze data of interest.

  • How to read my waveform data from a file LVM?

    I have collected a form of wave and saved using the file LVM format. I would read the waveform in labview and view with its timestamp and assigned name. The only way that I could read the data in Labview was to convert it to an array of number. I thought that if you could write a waveform and save all data, you should be able to read it back quite easily. I have included my LVM file and two simple programs. The program I use is much larger, but these two programs are representative of what I'm trying to accomplish.

    Thank you

    Eric,

    I am pleased that you have something that can work even if it is not ideal.
    I close this service request, but I thought that I'll let you know that
    because of your issues, I have revised article in the Knowledge Base on
    timestamps and verified for accuracy and thought you should know.

    What is the precision of the timestamp of the waveform returned by my NOR-DAQmx
    Device?
    http://digital.NI.com/public.nsf/allkb/5D42CCB17A70A06686256DBA007C5EEA?OpenDocument

    Concerning

    Vince Methot
    Technical sales engineer
    National Instruments

  • read/write of data from forms (pdf) adobe livecycle xml

    Hello

    I need help reading the xml data in a PDF file created by Adobe LiveCycle and also writing of xml data in the form.

    The forms have been created using PROD LC 8.2 and in the future they will be created using PROD LC 9.5.

    I use VB .NET to access data programmatically.

    Can someone help me with some advice? A SDK library? Any information would be very useful.

    I'm quite new with this problem of electronic forms and I don't know even where to start.

    Thank you

    Ionel

    OK, I understand what you mean now. I did a similar thing about 4 years ago.

    See this thread:

    http://acrobatusers.com/Forum/forms-LiveCycle-Designer/how-extract-LC-form-fields-values-a nd-store-them-base of data.

    and also this thread:

    http://forums.Adobe.com/message/1157969  (read until the end. This is mostly trial and error until I found the solution, which is described above. It will give more information.)

    It has most of the reuqirements you are looking for. If it is close to what you are looking for, I can download the complete source code in my workspace to Google. Plesae let me know.

    I hope it will be useful to you.

    Tarek.

  • HTTP 413 - exception too large entity when you try to read the audio data from URL http

    Hello!

    I sent an audio file of size 718 KB on tamcat and I try to play via a URL but http 413 exception, please help here is my code:

    Try
    {
    Player p = javax.microedition.media.Manager.createPlayer ("http://192.168.0.172:8090 / new.wma");
    p.Realize ();
    VolumeControl volume = (VolumeControl) p.getControl ("VolumeControl");
    volume.setLevel (30);
    p.prefetch ();
    p.Start ();
         
    }
    catch (System.Exception e)
    {
    System.out.println (try ());
    }

    YOUR help is needed thanks.

    Hey thanks for much for your help... I managed to solve the problem using this example BufferedPlaybackDemo accept I made a few changes to it... This added to the URL and change the connection on Read_Write

    if (WLANInfo.getWLANState() == WLANInfo.WLAN_STATE_CONNECTED)
                url.append(";interface=wifi");
            else
                url.append(";deviceside=true");
    

    Thanks anyway

  • Helps burn the audio data from the Director of windows on a real cd

    Remember - this is a public forum so never post private information such as numbers of mail or telephone!

    Ideas:

    • sPrograms you have problems with
    • Error messages
    • Recent changes to your computer
    • What you have already tried to solve the problem

    Questions, please indicate in the body of the
    the message.

    Is the audio file in question an audio separate
    file you have imported into Movie Maker, or is - that the
    soundtrack for a video file that you imported
    on Movie Maker?

    If it's a separate Audio file... you already
    have saved you on your hard drive.

    If it's a movie file, you can separate the audio
    and save it as follows:

    For the timeline, drag the video to the
    Track "Audio / Music. Then type... Caviggia Ctrl + P.
    Reach... File / save movie file / ect... ect...

    This will result in a file audio .wma. Do not forget
    to drag the clip all the way to the left the
    timeline or you will have no air circulation to the
    beginning.

    Once you have all your audio clips stored on
    your hard drive... See the following link to find out how
    to burn an audio CD:

    Windows Media Player 11 for Windows XP
    Burn your own custom CDs
    http://www.Microsoft.com/windows/windowsmedia/KnowledgeCenter/HOWTO/MP11/burn.aspx

    Volunteer - MS - MVP - Digital Media Experience J - Notice_This is not tech support_I'm volunteer - Solutions that work for me may not work for you - * proceed at your own risk *.

  • PC can not read audio data from any media player

    computer laptop windows 7 my mother began to just expose some strange problems. She is unable to play any of his music on his pc using WMP12. the same files will also not play using iTunes, but I can cancel the iTunes issue for now because the problems are related. I was able to get the files to play on my PC in WMP12 across the network, so the files themselves are not at fault. work the system sounds in Windows, but when I say WMP to play a wav file, it errors out as well. I tried to reinstall the audio drivers, and run the troubleshooter of wmp and the resolution of the problems of audio playback, but nothing wrong was found. SFC has found no problem either. before resorting to more drastic measures (restore, reinstall, etc.). I well I ask here to see if I could get assistance.

    Seems rather strange, that my first thought is to check the volume, in windows 7, you can set the volume for different applications, like Chrome. I don't see anything else I'm afraid. You hear the music when played from YouTube? If so, it may be a problem in the settings for music apps, in general. Another idea would be to try to install K-Lite, to ensure that there are no problems with codecs.

    http://codecguide.com/download_kl.htm
    Except that I can not think what you could make, but restore to a time where you could play music.
  • installed adobe flash player. in services, flashplayer is 'stopped' how to activate so it can work. cannot read audio data from many sites because of Flash Player not working not not on Vista

    Adobe Flash Player is installed on the laptop running Windows Vista.   "Run" program services, he says is flashplayer is "stopped".

    I have "enable all" but it can't happen to ebable.   Can you help me?

    Hello

    This can help you:

    Download and run the Flash Player uninstaller program.

    http://helpx.Adobe.com/Flash-Player/KB/uninstall-Flash-Player-Windows.html

    Then download and install Flash Player; After unchecking installing Chrome and Google toolbar option:

    http://get.Adobe.com/flashplayer/?promoid=BUIGP

    If the problem persists, you may want to ask in the Forums of community Flash Player:

    http://forums.Adobe.com/community/flashplayer

    See you soon.

  • read in select data from another table

    Hello world.

    IM Oracle11GR2 database.

    I m facing the following problem:

    I have 2 tables.

    In the first picture, I have a few articles and 3 of these items then come.

    (A) point Varchar2

    (B) Item Varchar2.

    (C) point digital and this point is the id of a record in the other table.

    If the digital point > 0 then points A and B must be read in the second table

    In the second table, I have 3 Articles.

    (A) the id of the record.

    B & C point are also point varchar2 and must be read in the first table, point C is > 0.

    I'm looking for the way that when I write a normal selection in the first picture he gives me the point B & C of the second table if C point in the first table is > 0.

    I thought to solve this problem with a trigger or something similar.

    Any idea is welcome.

    Regards to everyone.

    You don't need a trigger for this. A simple select statement should do. Something like that? I got your if condition perfectly.

    SELECT CASE WHEN (T1. C > 0) THEN (SELECT T2. B OF THE T2 WHERE T1. C = T2. (A) T1 OTHERWISE. END A,

    BOX WHEN (T1. C > 0) THEN (SELECT T2. C FROM T2 WHERE T1. C = T2. (A) T1 OTHERWISE. B END HAVE B,

    T1. C

    FROM T1;

    Look at the following example. Check if it fills your scenario.

    -BEGINNING OF THE SAMPLE DATA

    WITH T1 AS)

    SELECT 'A' A, 'B' B, 1 C OF DOUBLE UNION ALL

    SELECT 'C', ', 2 DOUBLE UNION ALL

    SELECT 'DF', 'G', THE DOUBLE 0),

    () AS T2

    SELECT 1, 'X' B 'Y' C DOUBLE UNION ALL

    SELECT 2, 'Z', 'BB' OF THE DOUBLE)

    -END OF THE SAMPLE DATA

    SELECT CASE WHEN (T1. C > 0) THEN (SELECT T2. B OF THE T2 WHERE T1. C = T2. (A) T1 OTHERWISE. END A,

    BOX WHEN (T1. C > 0) THEN (SELECT T2. C FROM T2 WHERE T1. C = T2. (A) T1 OTHERWISE. B END HAVE B,

    T1. C

    FROM T1;

    OUTPUT:

    A  B           C

    -- -- ----------

    X Y 1 - since c > 0 A and B values in table 2 are replaced

    Z BB 2 - since c > 0 A and B values in table 2 are replaced

    DF G 0 - since c = 0, there is even value in table 1

    Post edited by: Parth272025

  • Select the list box file and read the data from file

    I can list the files in the folder in the listbox

    1. I want to just list file .txt files

    2. How can I read data from the selected file (.txt)?

    I think that's what you want, enter a model in your list of files vi (for example, *.txt) and then just use File.vi text of reading by using the selected item in the list box (double click on event or value change) and use the starting for the vi records list path.  I have included a crude extract for your pleasure.

  • How to implement the reading of data from a matte file on a cRIO?

    Hi all!

    I'm still not sure, it is plausible, but I'll ask rather before you begin complicating. So far, I found no useful information on reading in the data to a device of RT from a file (type of a simulation test - data is simulated).

    I have the MatLab plugin that allows the storage of data read a MAT file, which has a number of columns that represent the different signals and lines representing the samples at a time (depending on the time of the sample - sample every time has its own line of signal data).

    I have no idea how to implement this at cRIO.

    The idea is:

    I have some algorithms running on the controller of RIO in a timed loop. As the entries of these algorithms I need to access each of the values of columns in the row, which is the time of the sample (sort of a time series - without written actual times).

    I am fairly new to RT and LV development, so any help would be appreciated.

    Thank you

    Luka

    Dear Luka!

    I think the reading of all the samples in a single channel is exactly what you need here, because reading the files may take some time and is not deterministic, so it is best to read all the data in memory (or if this is not feasible due to problems of size, fairly large pieces may be sufficient). The table read can be provided and then in the loop simulating outings, something like this:

    I used here separate channels so it's more graphic, but you can build all the channels in a 2D array and array index corresponding to the samples fom 1 who. You can also use for loops with indexing as tunnels are setup and then you won't need the index functions and the number of iterations is also set automatically, but you have to take care of synchronization settings.

    Best regards:

    Andrew Valko

    National Instruments

  • How to read the data from a channel named in windows using labview

    Hello

    I need to read the channel named in windows data. The pipe is created by python by another application. This application post permanent data on the pipe. But I don't know how to read data using labview. is it possible to read the data from different application? If possible, how to start?

    Thanks in advance

    concerning

    RJ

    Hi Rolf,.

    It's just, because of driving is not initialized completely, pipe read returns error 42, I added 2 seconds late, then its work perfect.

    Thank you very much.

    Concerning

    RJ

  • How to read the two columns of data from the Port series

    Hello

    I'm reading two columns of data from the serial port.

    Example:

    52439 52430

    52440 52437

    52209 52214

    51065 51070

    52206 52390

    I use the serial of Visa service and I can read the first column of data from the serial port, but I can't understand how to read the second column.

    I want to both sets of chart data.

    I enclose my VI.

    Thank you for your help.

    The analysis of string function takes a "Format string" on top (with the right button of the function and choose Help, which explains all the entries).  In particular, you can say 'Give me two numbers separated by a tab' and the output will be two numbers (whole or floating, depending on the chosen format).  In particular, %d\t%d specifies a decimal integer, , whole decimal.

Maybe you are looking for

  • Applications (including the Finder) frequently stops responding

    I'm on an iMac Mid-2010 with 8 GB of RAM and the latest version of El Capitan. In the last two days, my iMac began frequently stops responding. The problem does not seem to be specific application; It happens even when I do turn to nothing other than

  • Slow start up Safari

    I'm on OS X 10.11.5 (El Captan) on an iMac 27 inch mid 2011. Since the upgrade to El Capitan, Safari takes 13-15 seconds to start and be in ready condition and will often show that a linked server cannot be found. I am now using Firefox as my default

  • Need to reset security question

    I would like to reset my security question on my ID apple because I do not remember how I can do?

  • cannot change the phone number of the bunch of code - it *.

    Decided to backup Keychain in iCloud. Original installation of iCloud is now a deceased # phone. (Apple HT only concern a) several device, and/or IOS) b. I don't use iPhone (and fewer people are) and can not find a way to update the telephone number

  • convert hp4294a drivers for hp 4195 has

    Hi all I have problems with a code. I already have one that does exactly what I want, but includes the drivers of hp4292a impedance Analyzer, and my camera is a hp4195a Network Analyzer. If anyone knows how to convert the code without interfering wit