How to record and play Audio

Hello

I want a code example to learn how to record audio and play audio recorded

Can anyone help me regarding this?

Thank you

Pounet

Try this code, it works for me.

To record the audio. Note that this code records audio in the device memory. Just change the url to save the code in the sd card.

try {}
Reader = Manager.createPlayer ("capture://audio?encoding=amr");
Player.Realize ();
            
RC = (RecordControl) player.getControl ("RecordControl");
BT = new ByteArrayOutputStream();
rc.setRecordStream (bt);
FC = (FileConnection)Connector.open("file:///store/home/user/RecordedFiles/audio1.amr");
{if (!) FC. Exists())}
FC. Create();
}
OT = fc.openDataOutputStream ();
rc.setRecordStream (ot);
rc.startRecord ();
Player.Start ();

} catch (Exception e) {}
e.printStackTrace ();
}

To stop and play the audio. Copy the following code,

try {}
RC.Commit ();
            
data = bt.toByteArray ();
BT. Close();
Player.Close ();
          
            
BI = new ByteArrayInputStream (data);
            
            
Player = Manager.createPlayer (bi, "audio/amr");

Player.Realize ();

Player.Start ();

} catch (Exception e) {}
e.printStackTrace ();
}

Tags: BlackBerry Developers

Similar Questions

  • Disable plug and play audio

    Original title: sandisk
    I plugged a sandisk in 1 of my usb ports and my computer is Beeping at me all day, even with the unit unplugged, and when I went to devixes and printers, he tells me to right click on the device icon and everything I installed my TOUCH screen. so, how do I right click (touch) the icon? AND how can I STOP the beep of thia?

    Hi Marsha,

    Welcome to the Microsoft Community and thanks for posting the question.

    According to the description, it looks like you want to disable plug and play audio.

    I suggest you to read the following steps to disable Plug and Play audio.

    a. right on the icon of the computer located on your desktop or in the Start Menu. Then select Manage from the drop-down list.

    b. in the computer management window, go to "system-> Device Manager tools.

    c. on the view menu, select 'show hidden devices '.

    d. expand the list of devices under "-pilot no Plug and Play", and then select beep.

    e. right click on the element to beep, and then select Properties.

    f. in the 'Beep properties' window, go to the driver tab.

    g. in the startup section, scroll the list Type, select Disable and click the OK button.

    Touch screen refer to the following Microsoft article:

    http://Windows.Microsoft.com/en-us/Windows7/using-touch-gestures

    If you need Windows guru, do not hesitate to post your questions and we will be happy to help you.

  • CS5 - sub commands Start Recording and play recorded command grayed out

    How can I activate "Start Recording" and "play recorded command? Please and thank you...

    Sorry to be so stupid, the feature has been removed from the latest versions of Dreamweaver. The recoding and reading refers to a macro that you can create to automate tasks within DW.

    Take a look here help Dreamweaver | Task automation

  • record and play clicks using LabVIEW

    I want to LabVIEW to save the my mouse click and then it reads. Now, the mouse clicks are not in LabVIEW. For example I am google.com and then I click on maps, then on images and then the books. I want to labview to record and play back like a TI open google and click on the maps and images and so on. Is this possible with LabVIEW or is there another software OR who done it.

    Thanks in advance

    ; Lab

    Hey Lab.

    As mentioned above, you can do this by using the functions of the library windows. Attached you will find two screws Record cursor Position.vi will record the position of the mouse cursor. You need to change the Clicks.vi of mouse clicks to simulate in the reading order. I hope this helps.

    See you soon

    NOR-khil

  • Library CC animate sounds how to tie and how to stop and play?

    Library CC animate sounds how to tie and how to stop and play?

    for example:

    allSounds = ["snd_1", "snd_2"]; ("snd_1" - the name of link)

    myInstance = createjs. Sound.Play(allSounds[0]);

    allSounds = ["snd_1", "snd_2"];

    allInstances = [];

    allSounds.forEach (function (item) {}

    var audioInstance = playSound (item);

    allInstances.push (audioInstance);

    });

  • ULaw and alaw record and play G711

    I want to be able to capture and play directly to the a - law and u - law format.  I have read several posts on how to put the reader (capture in my case) in amr and pcm mode.

    Capture of AMR and PCM is not a problem, but the correct string of capture to capture the u - law data is unknown to me.

    for the record:

    capture://audio? Encoding = PCM works, also tried something like:

    capture://audio? Encoding = PCMU (does not), also tried to replace with pcmu, ulaw, audio/x-ulaw

    capture://audio? Encoding = AMR (works)

    When I exit the capture I get supported types:

    Device supports capture Type: audio / amr
    Device supports capture Type: audio / basic
    Device supports capture Type: audio / x - gsm
    Device supports capture Type: image / jpeg

    To play, I think that I should put the x - wav player and provide good wav header, will try later, but my first concern registers directly as G711.

    I'm running on Simulator and device (BB Torch v6) which should be able to support the u-law/a-law.

    someone at - there more information on this? It is not possible or should I put the recorder in pcm mode and convert my data on the fly?

    Hi James!

    Registration is only linear PCM.  The reading can be linear, G711 uLaw and alaw for PCM.  On a BlackBerry audio/basic = audio/pcm.

    If you are interested, GSM is GSM6.10 of recording and playback, AMR's locker AMR - NB 12.2 Kb/s (unless you specify voipMode = true in your locator, but I will not go into these details, you can search the forums if you need more information on this) and any mode of AMR - NB valid for playback (only three units I know can also playback AMR - WB and AMR - WB +).

    Finally, to save some time there is code attached to this question (if you can connect, related to this thread) who has code to generate headers wav on the Blackberry platform for you.

  • (Redirected) Alienware for recording and playing World of Warcraft

    I am considering buying an Alienware Aurora to play world of Warcraft, but I also intend to record and make the game You-Tube videos, someone at - it experience with the appearance of the recording and the Aurora? Its an expensive system and I cannot spend all that money and not being able to do what I need.

    Hi Coyoteowl,

    Please repost this in the forum of the Alienware club for faster assistance.

    http://en.community.Dell.com/Owners-Club/Alienware/

  • Someone advise me on how to record and remember the actual information from a group of combo boxes?

    I have a set of combo boxes save a devices status information. I would like to record and remind all selections. I know there are properties to access the selected items, but the research on, I do not know the technique to do so. I want to save/recall in XML format. I made an attempt, and he saved the combo box data, but not the selections. Thanks for any help.


  • Record and play variable a string will not copy

    I have a variable of string - serialization of an xml variable result - in a process.

    It has a length of 'unlimited '.

    When I opened the recording and playback, there is text indicating the beginning of sequenced xml:

    < node_x

    That's all that I can see.

    Unfortunately, the option 'copy value' in the menu contextual is dimmed, just at the moment where I most need!

    This is normal behavior for a scenario like this?

    Is there anyway that I can get to copy...

    Thanks in advance!

    At least try to open and close the variable perspective.

  • I can't record or play audio data in CS6

    I been using this for 2 years, everything has been good, but then today my setup not record audio OR stream audio of any other session that I made earlier! All parameters are looking for normal and just the climax a unit that I use. It all sounds the same, why not function? Bar barcode reading and time also don't move, just a dead window. Ready to get quick help... I tried to call for help and it does not exist! Why, I don't know! Thanks in advance.

    It is a sign that all is not well with your audio hardware in place. For some reason any hearing has been disconnected from the peak. If, despite all the normal search settings, you must check that the height is set correctly in your computer system and the hearing as well. You don't say what operating system you are using. It would be useful to know that things work differently on a Mac to a PC. Other media players give audio OK, if you play a video file? You can find just to change the settings in the configuration page of the audio of the hearing to another and start again towards the good that this will give the hearing to connect to the audio interface again.

  • How to RECORD and MIX her base in hearing CSx correctly?

    Well, I know your first thought for the answer would be: buy a basic guitar, plug in there and chop chop.

    When it comes to 'home' term, its is going to take a lot of effort to understand everything, but in this section I just asked for a specific type of base - rhymes his base: clear, flawless, is not techno, hard beats long and more like the natural environment. the base type can be easily found in New Age, Ibiza, Spa... music.

    So the question is: exactly how we can produce these sounds?


    I did some research and looked at some low end of videos but they its quite different from what I expected.

    I'll show you what I mean, it is a song with the bass sound I expected: Bernward Koch - Irish Sun (my video slideshow) - YouTube

    and it's the sound of the bass guitar: Ibanez bass guitar | Bass Ibanez 200 GRS. Review | Test - YouTube

    Since im a guitar player, I play the classical guitar and im intended to record bass for my songs too but know very little serious combat. I use Adobe Audition CS6 and I found hearing difficult to produce a sound like that.

    If you have experience with the bass (no matter if mix you or live folder, as long the bass sounds as above). Thank you very much.

    Sort from easy,. Simply, these sounds are not produced by a bass guitar! Certainly not by itself, anyway.

    I am sure that this particular sound is developed from a game sound orchestral string of the type MIDI-based. There are a lot of sustained in sounds and very little "punch" to her at all.

    Is not at all a problem of editing - it is to get the appropriate in the first place, and I am absolutely sure that if you are a guitar player and you want to use it as input device, you will need a guitar-MIDI Converter and if the value of sound right (there are many available).

  • How to activate and play subtitles in Windows Media Player 12 and Media Center?

    Normally, I download any movie .avi or .mp4 and the respective .srt subtitle file, place them in the same folder, make sure that they have exactly the same name (with the exception of the exxtension, of course) and then have no problems to play the movie with subtitles in other media players. But in WMP 12 (after following the exact same steps) do not play subtitles. I tried the basic checks such as "Enable subtitles/captions when available" and it doesn´t work.

    You have any ideas on how to solve this problem?

    Hello

    Windows Media Player does not support. SRT file format. However, you can download the codecs third sites approved to play the. SRT in Windows Media Player files.

    Visit the links below for assistance.

    Codecs: Frequently asked questions

    http://Windows.Microsoft.com/en-us/Windows7/codecs-frequently-asked-questions

    Note:

    Using 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.

  • Record and play back a cluster

    Hello

    I am a student and I have to perform and LV application.
    I did the majority of the program, but I have a problem with the backup data.
    I use a complex cluster (dial other clusters etc.), I can save it as a binary file, but I am not able to open it and read it.
    I got together the post a simple VI to explain the composition of the cluster.

    It's maybe a stupid question, but I am a beginner with LabView, so I still have trouble understanding certain logics of LV

    Thank you for reading and perhaps help

    Ray.R wrote:

    I don't know if the things in the displayed examples would not help, because they may or may not use the clusters.

    But what the heck... If it helps, then all the better:

    We have to wait to see this link Ray

    Here is a small example of the observations of P

  • Satellite A100 PSAA9C: How to do to record sound played by mixer

    I have a Satellite A100 PSAA9C TA902C. (This is my 5th Toshiba laptop)

    My last was able to do the following: play music written by an author of music, which is through the midi mixing table, and enroll as a wav by Blaze Audio. On the last machine, A25-S279, I was able to select the entry list SW Synth. This console is not available for selection on the A100.

    I contacted Realtek. She was told that this feature is not supported by Realtek ALC861 Audio device installed in the A100 for.
    The last driver has been installed.

    It is very difficult to believe that an edition of media machine has these restrictions. I never met this problem on a computer before.

    What I want is to record from any device. But the system won't let me choose SW Synth. There is on the exit list. Not the entrance.

    Anyone has a suggestion how to record sound played via mixer to a wav recorder?

    Stephen

    What about using a 3rd party application?
    Try to use All Sound Recorder XP I put t know the last version, but try the version 2.28. It s a license shareware and you can test.

  • Need help, by Double clicking on an Audio MP3 to run Application and play the Audio.

    Hello, I'm doing a MP3 player in Flash Professional and I want him to have a system where you double click an MP3 file and automatically, the application runs and plays audio, like VLC Media Player. Therre is anyway to do this?

    http://www.senocular.com/Flash/tutorials/FileAssociation/

Maybe you are looking for

  • Your comments on 10-core CPU

    All, I am currently using the Mac Pro 3.7 Ghz 4 strands and I'm pretty happy with the performance The main tasks are to 50% of video editing with Final cut pro (soon in 4K), imaging and work with VM parallels but also 50% Office and iTunes. Right now

  • NP-FV50 battery

    Can I use a NP-FV50 battery on a Camcorder HDR-CX280?

  • BlackBerry Smartphones UK - mail and Windows Live Messanger

    Hello My first post here, but I got my BB a while, just never got roud to juggle with it and try to get the apps I want. First and foremost I want to mail and Windows Live Messanger for IMs, addressing Phones4U where I got my contract, they said I ne

  • a MCU 5300 for on demand and not at the request of deployment

    Hi all I deploy new telepresence to our customers. our clients have the mcu, a tms and a single vcs. My question is, if we don't have that and not an mcu can be used for the planned conference scheduled? Guide to deployment of cisco, they use 2 mcu t

  • Hammer.js universal theme, creating two Click events

    I work with Apex 5.0 and universal theme. I have a very simple test page herehttps://Apex.Oracle.com/pls/Apex/f?p=90766:1If you click on the first link on the column, it should display an alert with the customer ID. When I try this on a computer with