Recording and playing audio files

hi, is there a way by which one can record and play an audio file in java ?? I am doing a project in Voip but I can't find any help in this matter(actually i am a newbie in java ) .. can anyone please tell me how to proceed?
Edited by: streetfi8er on Jun 28, 2009 2:47 AM

>
hi, is there a way by which one can record and play an audio file in java ?? I am doing a project in Voip but I can't find any help in this matter(actually i am a newbie in java ) .. can anyone please tell me how to proceed?>You could not find anything on ['java audio'|http://lmgtfy.com/?q=java+audio]? Where did you look, underneath the bed and in the back yard?
Note that you might help dispel my impression that you are lazy, by applying the shift key once at the start of each sentence.

Similar Messages

  • Recording and playing Audio at the same time

    Hi,
    Having problem with a MMAPI imp.
    The simplest way of doing it is to start one thread playing a audio file of any kind.. As it is playing start a other thread that start a audio recording.
    As soon as the audio recording is allowed to record (Security promt) the audio playback stops. And the playerListstner sends a END_OF_MEDIA event.
    So my question is: Is there a way of doing playback and recording at the same time or is this a limit on the phone or the MMAPI?
    This has been tested on Nokia N90 and SE W550i with same reults
    Cheers
    Kenth

    i also desperately need to record and play audio at the same time.. i have a term project, i am develeoping a karaoke player in j2me and it is supposed to capture the voice at the same time background song is played.. and it is also supposed to grade the singer according to the pitch of voice.. please help me about recording and playing audio at the same time...

  • Can anybody explain me how to sample and play audio files with logic's EXS2

    can anybody explain me how to sample and play audio files with logic's EXS24 Sampler???
    i cant find a way to upload and manage my own audio content on this sampler...

    i uderstand , thanx...
    i managed to open an audio file and placed it in the sampler,i can play t sample in the little keyboard in the zones section, howver i dont know how to play it with my controller... the sample shows in C1 on logic's keyboard but if i play C1 on my controller nothing happens... how can i fix this?
    Also, i noticed the sample plays from beginning to end once i click on it, how do i do to just make it last until i release the key? like a logic sound??? (in case i want to play a small portion of the sample only)
    Thanx

  • Please help me with recording and playing audio simultaneously!!!

    Right now I can either play the incoming stream OR record it. I tried making Clones for datasource like :
    DataSource clone1 = Manager.createCloneableDataSource(originalSource);
    Then I pass it to these 2 classes:
    new playThread(clone1).run;
    new recordThread(clone1).run;
    playThread is a Thread class that will take the cloned datasource and then plays it while recordThread will record the incoming datasource. Here is what happens when i run them one after another:
    When I run playThread before recordThread I get ACM driver error. But if I run the recordThread before playThread the playThread's playerWindow shows up and plays for a split second then stops; The recordThread does record all the incoming stream though... Here are my questions....
    1. Anyone know what my problem is? is it resource alocation? Threading problem?
    2. Did I use the clone datasource correctly? I tried making clone1, clone2 but those didnt work well either...Should I do anything to the clones for record and play? all I did was pass them to the 2 classes and those classes just use them straight out without proccessing or anything...
    Please help me out!!!! thanks a bunch!

    i dont think it is... i tried the clone thing but samething happened... it might be a Thread problem since when i put those together sometimes record runs sometimes player runs... and at the end i get "ERROR while querying ACM driver's information" error..... i am really confused...
    DataSource clone1 = Manager.createCloneableDataSource(originalSource);
    DataSource clone2 = Manager.createCloneableDataSource(clone1);
    playerThread play= new playerThread(clone1);
    recordThread record= new recordThread(clone2);
    record.start();
    broad.start();
    anyone can help is appreciated

  • Load and Play audio file (either sound or music) from my computer using DirectSound in C++

    #include "stdafx.h"
    #include <dsound.h>
    class AudioPlayer
    private:
    unsigned long long start_point,
    playback_point,
    break_point;
    bool now_playing, loop, ignore_start_point;
    int speed;
    //and any data that stores an audio (can be either sound or music)
    public:
    void Play_or_Resume(); //Either starts playing or resumes the audio stored in private (Runs a thread that either increments or decrements the playback_point by the speed member and sets the now_playing member to true).
    void Pause(); //Stops playing the audio stored in private until Play_or_Resume method is called (Just suspends the thread that was mentioned above and sets the now_playing member to false).
    void Play(unsigned long long from = 0, unsigned long long length = -1, bool move_start_point_too = true);
    //Plays audio from the value of the 'from' parameter along the value of the 'length' parameter and sets the now_playing member to true.
    //Playback point is pushed to the value of the 'from' parameter, and break point is pushed to the result of from + length.
    //If move_start_point_too parameter is true, then also start point is pushed where playback point is pushed too (to the value of the 'from' parameter).
    //Also the value of the 'from' parameter is an absolute position, but otherwise (if move_start_point_too parameter is false) it ('from' parameter) is relative to start point's position until it (start point) is ignored.
    //The value of the 'from' parameter never can be negative!
    void MovePlaybackPoint(unsigned long long new_position); //Modifies playback point position that is stored in private to a new position that indicates to sample no. new_position.
    unsigned long long GetPlaybackPointPosition(); //Returns playback point's position that has been alreadyS mentiond above.
    unsigned long long GetLength(); //Returns total number of samples in the audio stored in private.
    void MoveBreakPointTo(unsigned long long new_position); //Moves the break point to a new position that indicates to sample no. new position.
    //If the loop member is false, then audio should always stops playing and also set the now_playing member to false, when playback point reaches the break point, even the Pause method was not called.
    //Then calling again the Play_or_Resume method will bring the playback point back to start point (the default value for this member is zero 0).
    //But if the loop member is true, then playback point just returns to start point immediately and continue playing from there (now_playing remains true and it's value is unchanged).
    //There is a possibility to move the break point to a negative integer, so audio either stops and sets now_playing to false or replays from start point and left now_playing true according to the loop member, at the end of the audio. The default value of break point member is minus one -1 .
    unsigned long long GetBreakpointPosition(); //Returns the position of the break point that has been already mentioned above.
    void MoveStartPointTo(unsigned long long new_position); //Moves the start point to a new position that indicates to sample no. new position.
    unsigned long long GetStartPointPosition(); //Returns the position of the start point that has been already mentioned above.
    void EnableRepeatMode(); //Sets the private loop member to true.
    void DisableRepeatMode(); //Sets the private loop member to false.
    void ToggleRepeatMode(); //If loop was true before calling this function, so after it is false. Otherwrise it is true.
    bool IsRepeating(); //Returns whether audio repeats itself (from start point to either breakpoint or end of buffer). This function just returns the value of the loop member.
    void SetSpeed(int num_sam_per_sec); //Modifies the number of samples that are played in every second.
    //If number (integer) is negative, then audio is played in backward.
    //When playback point reaches start point, then it is transferred to break point if it's position is not negative. Otherwise it is transferred to the end of the audio buffer.
    void IgnoreStartPoint(); //Sets the ignore_start_point member to true. Then all methods always relate to start point as zero (even if it's value is not zero).
    void ReferStartPoint(); //Sets the ignore_start_point member to false.
    bool IsStartPointIgnored(); //Returns whether start point is ignored or not. This method just returns the value of ignore_start_point member.
    int GetSpeed(); //Returns the number of samples that are played in every second.
    void SetNumberOfChannels(byte new_value); //Modifies number of channels.
    byte GetNumberOfChannels(); //Returns number of channels.
    void SetBlockAlign(byte new_value); //Sets block align.
    byte GetBlockAlign(); //Returns block align.
    const char* LoadAudioFromComputer(const char* path_and_name_of_file, AudioPlayer* lpAp, bool auto_start_playing = true);
    //This function fills the instance pointed by 'lpAp' parameter with the data of the audio file redirected by 'path_and_name_of_file' parameter, and calls the Play_or_Resume method of this instance if auto_start_playing is true.
    //If the function succeeds, then it returns "succeed". Otherwise (if the function fails) then it returns an error string that describes the problem (the reason it failed). It can be sent to output, so it can be read, by either call to MessageBox, printf, std::cout, TextOut, DrawText functions and etc.
    //The function can fails, because the file was not exist, or could not be opened for reading, because it was opened by another process, or the file was either encrypted or protected, or corrupted, or was not audio file, but text, image and etc.
    I want to implement all methods of the AudioPlayer class and the LoadAudioFromComputer function by myself using DirectSound (the <dsound.h>) and all functions, interfaces, methods, structures, etc... that this header provides, but I don't know how! I
    need your help! This is difficult for me to find in the internet the information I need to do this. MSDN is teaching all this stuff, but this is too difficult! I need you to implement all these methods of the AudioPlayer class and the LoadAudioFromComputer
    function for me using DirectSound and the <dsound.h> and the explanations I wrote in comments, and then post the code. I will copy it to mine and read it all to learn. Please use comments so I can understand. I will thank and appreciate anyone who will
    donate his time to help me and do this for me! :D

    Microsoft pulled the plug on DirectSound HAL in Vista due to lack of hardware support. The SAL exists for
    software compatibility, good intention but bad performance as there is no longer a direct path from
    DirectSound to audio drivers.
    People choose DirectSound for its Direct-ness
    but there is no reason to choose it now.
    DirectX SDK was integrated
    with WIndows SDK which ships with Visual Studio 2012 so you don't need additional downloads for
    WASAPI and XAudio 2.
    Just look up the documentation for headers/librarieslike every other Windows API you use. If you have a hard time to find the documentation then you need to go to search engines and find search engine tutorials. 
    There are plenty of samples for both WASAPI and XAudio 2, both in the Windows SDK and online. The DirectX team has some suggestions on which to use on their team blog.
    You can find experts for those APIs at the Windows Desktop Pro-Audio Application Development forum and the
    Audio/XACT forum on MSDN (link left out for you to practice your search skills). Again, it is fine to ask for hints but don't ask the whole
    solution. You are competing with others who just need a hint to finish work here. The time spent on working on your assignment would be better spent on helping on giving hints to others. 
    Visual C++ MVP

  • How to import and play audio files in java

    Hi, I'm pretty new to java and im trying to make an application that can import and play simple audio clips (mp3, wav, etc formats) when a button is clicked. If any one can help me it would be greatly appreciated.

    hi,
    i'm not a professional with java sound but it may be possible that you will find something good at this link:
    http://www.jsresources.org/examples/
    peace

  • Is it possible to record and play at same time in swift, is there a option to record without storing the file

    I am making a microphone, is it possible to record and play at same time in swift, is there a option to record without storing the file

    Its pretty simple with FMS. You just need to do following things:
    Publish using FMLE with following settings: (just telling which are needed , rest you configure based on your needs)
    Video codec: H.264
    Audio Codec: <of your choice>
    Server ip: rtmp://<server-uri>/<app-name>
    Stream Name: mp4:<stream-name>.f4v
    Application : Server-side code
    application.onPublish = function(myclient,mystream){
         mystream.record();
    application.onUnpublish = function(myclient,mystream){
         mystream.record(false);
    Have a client , which subscribes in following live mode:-
    ns.play("mp4:<stream-name>.f4v",-1,0,true);   // this is subscribing in live mode
    In this way even if file is recorded, your clients are subscribing in live mode so all will be in sync.
    Now if you want to disallow any clients who will try to subscribe to "recorded" file when live event is going on, you can achieve using auth adaptor. (let me know if you want to enforce such requirement)
    But i think above solution solves your primary problem. Also please let me know if there are any issues in getting it work , i have given bare minimum which is required.

  • TS1717 I can play audio files in iTunes but I can't play downloaded tv shows or movies.  Everytime I attempt to play them, iTunes stops working and closes.

    I can play audio files in iTunes but I can't play downloaded tv shows or movies.  Everytime I try to play them, iTunes stops working and closes.  Any information will help.

    Is QuickTime installed? If not it might help to install it.
    If so is Direct3D Video Acceleration enabled? If so it might help to disable.
    tt2

  • The audo files do not play from websites instead ask for download. This has occured from the time I have updated Firefox 4 to Firefox 5. Why? And how can i play audio files?

    The audo files do not play from websites instead ask for download. This has occured from the time I have updated Firefox 4 to Firefox 5. Why? And how can i play audio files from websites?

    You have a <b>general.useragent.override</b> pref that identifies you as Firefox/3.5.7
    *Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7 (.NET CLR 3.5.30729)
    See:
    *https://support.mozilla.com/kb/Websites+or+add-ons+incorrectly+report+incompatible+browser
    *http://kb.mozillazine.org/Resetting_your_useragent_string_to_its_compiled-in_default

  • How to play audio file in default player in j2me

    Hi ,
    I would like to implement Audio Streaming in Mobile application. I am record the voice using amr format and store
    local mobile memory and retrieve and play the file successfully, what is my requirements is, when i was play the
    file , i want to open the file in any default player in the mobile, the forward and backward control are use the default
    player control. is it possible to play the file in default player in j2me. please reply soon.
    With Regards,
    Ganesh Kumar
    Edited by: tlgkumar on Oct 23, 2008 11:55 AM

    Hi Ganesh,
    my suggestion to u is use existing streaming protocol that already support by MMAPI, thats RTSP/RTP protocol.
    u only need to configure existing streaming server like HELIX SERVER or DARWIN SERVER, and ENCODER like FFMPEG, HELIX PRODUCER, etc to encode ur live media / store file become RTP packet and then let server send that to ur client. u can use camera / TV turner also to capture live video and send that by streaming. So u dont need to make ur own server, except ur project need different protocol from that streaming server use.
    in client side, u can choose to use REAL MEDIA or make ur own player, Nokia already support RTSP protocol since S40 3rd edition and S50 2nd edition FP 3. so u dont need to parse by ur code RTSP message and RTP packet. u also can use forward and backward fiture too by that both streaming server.
    please read any RTSP / RTP standar protocol reference, i think it will be helpfull to u to make ur own system configuration ..
    -best regards-
    adek aidi

  • Play audio files in Bridge CS6

    Hi,
    I used to be able to play audio files created with my Mk4 right in the preview window in CS4 which was easy for renaming files after their description was recorded when taking the shot.
    Does anyone know how I can do this in CS 6 - there are no play/pause controls under the preview like there was in CS4.
    Thanks Heaps for any help.

    Hi ,
    yes , MK4 and .wav files
    I have Mac 10.7.5 & Bridge CS6
    I have selected "Play audio files automaticly when selected" in the preferences but it doesnt do it.
    In previous versions of bridge you could get a play and pause buttons below the .wav icon view in the preview
    but this doesnt happen.
    It is really inconveinent as it defeats the purpose of having the .wav file and the I have to go back to Bridge CS4 to play the files.
    Thanks

  • Playing Audio Files in the Finder-any tips?

    Something I've been meaning to ask for ages... and hopefully an easy one to answer!
    When playing audio files in the Finder (in 10.5.8), it's really annoying when the file stops playing when you click on another window or application (or even just the Desktop). Is there any way around this?
    Someone recommended Snapper, but it's the same story - file stops playing when you click on any other area. Is this problem confined to Leopard (ie. has it been fixed in Snow Leopard?) - never used to be like this in Tiger.
    Some of us like to multi-task when listening to audio. The only solution I can see is importing the file into itunes. Any other suggestions?

    I assume you're talking about QuickLook?
    That's not the Finder, that's QuickLook.
    QuickLook is a function that can only work with the foremost selected item, and that makes sense, as you can, for example, QL a PDF within Mail.app, as well.
    Why not just use column view (doesn't everybody?) and play it in the Preview pane at the right?
    It will keep playing until you close the window or select another object within it.
    I use QuickLook when I want to give an audio file a quick once-over - skip here and there, but for actually playing it through, I use the column view preview.
    Message was edited by: spheric

  • Playing audio file while Downloading

    Hello all,
    Can anyone give me an idea on how can I play audio file while downloading.
    Thanks

    Connect the external drive and then launch Disk Utility found in Applications/Utilities. Your external drive while show up in Disk Utility's side bar. It should be Mac OS Extended or OS Extended (Journaled).
    If it isn't:
    Then select it and click the 'Erase tab' at the top.
    Select Mac OS Extended-Journaled formatting from the Volume Format menu.
    Then click the oval Erase button at the lower right. Just remember-this will erase the drive!
    http://danslagle.com/mac/iMovie/usage/5006.shtml
    Sue

  • Recording and playing back

    Hi, I have question about recording and playing back.
    I am going to record by AudioQueue and to play back by MPMoviePlayerController.
    My code can record by AudioQueue.
    But, It can not record After playing back by MPMoviePlayerController.
    Is Anyone who had same problem and solved it.
    Please tell me resolution method.

    Hi
    Welcome to Apple Discussions.
    We don't get very many questions about Core Audio here so if you don't get any response, you can try the Apple emailing list for Core Audio:
    [email protected]
    The list is very friendly and I'm sure someone there will be able to answer your question.
    Bob

  • Recording and playing sound input from mic simultaneously in iphone/ipad

    I want to simultaneously record and play the sound from a mic in iphone. As thecricket commentory application.
    Please provide me a solution for this.
    Is this possible in iOs.

    This probably isn't going to sound very helpful, for which I apologise in advance, but I'm afraid it's the truth...
    The only way you stand any way of doing any of this is by using ASIO4ALL, which can aggregate different drivers from multiple devices. But I don't rate your chances too highly, I'm afraid - USB mics have long been the problem child of computer-based audio. On top of that, you are trying to get sounds in and out of a separate device at the same time - not only that, but it's a Creative Labs gamer's device and they are second only to USB mics in terms of the 'difficult' stakes - search this forum!
    A much, much better way to attempt to do this would be to use a sensible ASIO external device with sufficient inputs, and a mic that plugs into it, not a USB one. That way you could route the inputs and outputs appropriately, and use the device's monitoring so that you could monitor what you need to. I wouldn't attempt to do anything like this any other way, I'm afraid. Another approach (which can be made to work well) is to use an external mixer to do most of the work - often it's easier to set up the monitoring on these. You can get mixers with the appropriate interface built-in, and they don't cost a fortune either. Mackie and Behringer make suitable devices.

Maybe you are looking for