Audio AMR upsampling

Can someone give me advice how to beat AMR? The amr file has header of 6 bytes -! #AMR and after that there are frameworks each image with 32 bytes - 1 byte header and audio 31 bytes.

How am I supposed to rate it? I read on linear interpolation but how am I supposed to apply here? Should I interpolate between the different frameworks or bytes in a frame? Any ideas?

Well here is the answer in case someone needs this.

I've found a way to cadence amr directly. So you must convert to pcm amd cadence being gross audio pcm samples.

In my case I just replaced with pcm amr because this change was ok with my application.

There any algorithm standard interpolation (linear cubic, etc.) applies without too much effort.

Tags: BlackBerry Developers

Similar Questions

  • Play audio .amr on Windows 8

    My collection of files audio .amr, recorded on my cell phone, does not play in QuickTime, or Windows Media Player 12 after the upgrade to Windows 8 Pro.

    I installed the http://shark007.net/win8codecs.htmlShark007 codec pack.  The option "make a multimedia" in the settings app makes files perfectly, but WMP12 does not produce any audio.  GraphStudioNext reported that splitter audio decoder AVL and AVL are used and also plays the media.

    I tried fiddling with different parameters, but you cannot make it work.  Someone with a similar configuration can confirm?

    Well, with the settings suggested on the Shark007 codec pack, I am able to play these files without any conversion...

  • 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 ();
    }

  • Exception during Audio recording

    Hello

    I am trying to create a screen where the user can start and the voice to stop recording.

    Start button will start the recording of the voice, where as stop stop recording and store the voice record.

    I looked for Ko Javadevelopment and found some code and changed according to my understanding (as the code is available in pieces).

    When I press the Start Recording button, I get an exception "java.lang.ClassCastException.

    Can you please help me to solve the same.

    I'm pasting my entire code here for your reference.

    package comp;
    
    import java.io.IOException;
    
    import net.rim.device.api.ui.Field;
    import net.rim.device.api.ui.FieldChangeListener;
    import net.rim.device.api.ui.component.ButtonField;
    import net.rim.device.api.ui.component.LabelField;
    import net.rim.device.api.ui.container.HorizontalFieldManager;
    import net.rim.device.api.ui.container.MainScreen;
    
    public class myAudio extends MainScreen {
        private ButtonField _startRecordingButton;
        private ButtonField _stopRecordingButton;
        private HorizontalFieldManager _fieldManagerButtons;
        private VoiceNotesRecorderThread _voiceRecorder;
        private LabelField _myAudioTextField;
    
        public myAudio() {
            _startRecordingButton = new ButtonField("Start Recording");
            _stopRecordingButton = new ButtonField("Stop Recording");
            _fieldManagerButtons = new  HorizontalFieldManager();
            _voiceRecorder = new VoiceNotesRecorderThread(5000,"file:///store/home/user/myfile.amr",this);
            _voiceRecorder.start();
    
            myButtonFieldChangeListener buttonFieldChangeListener = new myButtonFieldChangeListener();
            _startRecordingButton.setChangeListener(buttonFieldChangeListener);
            _stopRecordingButton.setChangeListener(buttonFieldChangeListener);      
    
            _fieldManagerButtons.add(_startRecordingButton);
            _fieldManagerButtons.add(_stopRecordingButton);
    
            _myAudioTextField = new LabelField(" Hello..." );
            add(_fieldManagerButtons);
            add(_myAudioTextField);
        }
    
        public void setAudioTextField(String text) {
            _myAudioTextField.setText(text);
        }
    
        class myButtonFieldChangeListener implements FieldChangeListener{
            public void fieldChanged(Field field, int context) {
                if(field == _startRecordingButton) {
                    try {
                        _voiceRecorder.startRecording();
                    } catch (IOException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                    }
                }else if(field == _stopRecordingButton) {
                    _voiceRecorder.stopRecording();
                }
            }
        }
    }
    
    package comp;
    
    import java.io.ByteArrayOutputStream;
    import java.io.IOException;
    import java.io.OutputStream;
    
    import javax.microedition.io.Connector;
    import javax.microedition.io.file.FileConnection;
    import javax.microedition.media.Manager;
    import javax.microedition.media.Player;
    import javax.microedition.media.control.RecordControl;
    
    import net.rim.device.api.ui.Field;
    import net.rim.device.api.ui.FieldChangeListener;
    import net.rim.device.api.ui.UiApplication;
    import net.rim.device.api.ui.component.Dialog;
    import net.rim.device.api.ui.container.MainScreen;
    
    public class VoiceNotesRecorderThread extends Thread
    {
       private Player _player;
       private RecordControl _rcontrol;
       private ByteArrayOutputStream _output;
       private byte _data[];
       private int recordSizeLimit;
       private String recordFileName;
       private myAudio myAudioScreen;
       private FileConnection fileConn;
    
       VoiceNotesRecorderThread(int limit, String filePath, myAudio screen) {
           fileConn = null;
           recordSizeLimit = limit;
           recordFileName = filePath;
           myAudioScreen = screen;
       }
    
       private int getSize()
       {
           return (_output != null ? _output.size() : 0);
       }
    
       private byte[] getVoiceNote()
       {
          return _data;
       }
    
    //  public void run() {
    //      while(true){
    //          synchronized (UiApplication.getEventLock()) {
    //              myAudioScreen.setAudioTextField(" Running Thread...");
    //          }
    //      }
    //  }
    
        public boolean startRecording() throws IOException {
    
            _output = null;
            _rcontrol = null;
            _player = null;
    
            try {
                synchronized (UiApplication.getEventLock()) {
                    myAudioScreen.setAudioTextField(" Start Recording...");
                }                
    
                fileConn = (FileConnection) Connector.open(recordFileName);
    
                if (fileConn.exists()) {
                    fileConn.delete();
                    synchronized (UiApplication.getEventLock()) {
                        Dialog.inform(" File: File is already available" );
                    }
                }
                fileConn.close();
    
                fileConn = (FileConnection) Connector.open(recordFileName, Connector.WRITE );
                fileConn.create();
                _output = (ByteArrayOutputStream) fileConn.openOutputStream();
    
                //Create a ByteArrayOutputStream to capture the audio stream.
                //_output = new ByteArrayOutputStream();
                // Create a Player that captures live audio.
                _player =  Manager.createPlayer("capture:///audio?encoding=audio/amr");
                _player.realize();
    
                synchronized (UiApplication.getEventLock()) {
                    Dialog.inform(" Player is Created" );
                }
                // Get the RecordControl, set the record stream,
                _rcontrol = (RecordControl)_player.getControl("RecordControl");
                _rcontrol.setRecordSizeLimit(recordSizeLimit);
                //_rcontrol.setRecordLocation(pathToRecording);
                _rcontrol.setRecordStream(_output);
                _rcontrol.startRecord();
                _player.start();
                synchronized (UiApplication.getEventLock()) {
                    Dialog.inform(" Player is Started" );
                }
                //_output.reset();
                //_player.addPlayerListener(playerListen);
            }
            catch ( Exception e) {
                if(fileConn != null) {
                    fileConn.delete();
                    fileConn.close();
                }
                synchronized (UiApplication.getEventLock()) {
                    Dialog.inform(" StartRecording: Exception "+ e.toString() );
                }
                return false;
            }
            return true;
        }
    
        public void stopRecording() {
            try {
                synchronized (UiApplication.getEventLock()) {
                    myAudioScreen.setAudioTextField(" Stop Recording...");
                }
    
                if(_rcontrol != null) {
                    _rcontrol.commit();
                }
                else {
                    synchronized (UiApplication.getEventLock()) {
                        Dialog.inform(" _rcontrol is null " );
                    }
                }
                if(_output != null) {
                    //_output.flush();
    
                    if(!(_output.size() >0) ) {
                        synchronized (UiApplication.getEventLock()) {
                            Dialog.inform(" _output buffer empty " );
                        }
                    }
                    _data = _output.toByteArray();
                    _output.close();
                }
                if(!(_data.length > 0)) {
                    synchronized (UiApplication.getEventLock()) {
                        Dialog.inform(" Data gone baby gone " );
                    }
                }
                if(_player != null) {
                    _player.close();
                    _player = null;
                }
            }
            catch (final Exception e) {
                synchronized (UiApplication.getEventLock()) {
                    Dialog.inform(" Stop recording Failed:  " + e.toString());
                }
                return;
                //Dialog.inform(e.toString());
            }
        }
    
        class FieldListener implements FieldChangeListener {
            Object recordButtonField = null;
            Object stopRecordingButtonField = null;
    
            public void fieldChanged(Field field, int context) {
                if(field.equals(recordButtonField)) {
                    try {
                        startRecording();
                    } catch (IOException e) {
                        synchronized (UiApplication.getEventLock()) {
                            Dialog.inform(" Start Button Exception:  " + e.toString());
                        }
                        //e.printStackTrace();
                    }
                    /*recording only occurs during the sleep*/
                } else if(field.equals(stopRecordingButtonField)) {
                    stopRecording();
                }
            }
        }
    }
    

    _player = Manager.createPlayer ("capture://audio?encoding=audio/amr");

    Mark as resolved

    Give us some kudoes

  • Once its saved audio playback

    Can someone tell me how I should play an audio recorded? I'm recording in default AMR format. The data are stored in an array of byte []. Now, I want to play these data once registration is completed. Please can someone give me a code example of how this could be done.

    My code is,

    Reader = Manager.createPlayer ("capture://audio");

    Player.Realize ();

    rcControl = player.getControl ("RecordControl") (RecordControl);

    output = new ByteArrayOutputStream();

    rcControl.setRecordStream (output);

    rcControl.startRecord ();

    Player.Start ();

    Once I hit the stop button, it does the following:

    rcControl.commit ();

    data = outout.toByteArray ();

    output. Close();

    Player.Close ();

    Now, when I hit the play button,

    Reader = Manager.createPlayer (new String (data));  Note: data are a byte array

    drive. Realize();

    Player.prefetch ();

    Player.Start ();

    But when I hit the play button, the player does not have these data. Can anyone help me please with this. I'm really stuck with it. Can someone give me a code to play this audio recorded? Thank you.

    Kind regards

    David

    I did not try it, but I think it goes something like this:

    (data [] byte)

    ByteArrayInputStream bi = new ByteArrayInputStream (data);

    Reader = Manager.createPlayer (bi, "audio/amr");

  • combined audio path definition does not, even if no exception is raised.

    Hi all

    I read a stream of UDP data and then read it over the phone. Ideally, the sound should go to the internal speaker, as in the case of telephone calls. But what I hear, it's always the f same speaker external I put the audio track to be combined. No exception is raised, no error.

    Someone at - it had the same problem? Is there a solution?

    See my code below and the comments.

    Thanks for your help

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

    create my own source of stream data

    playerStreamDataSource = new PlayerStreamDataSource("audio/amr");

    try {}

    Player = Manager.createPlayer (playerStreamDataSource);

    player.addPlayerListener (this);

    player.setLoopCount (1);

    Player.Realize ();

    } catch (Exception e) {}

    System.out.println ("ERROR:" + e);

    }

    There is certainly a difference between the listener and the way audio speaker. If I remember correctly, adjust the volume to 100 in headset mode at all does the intensity that you get when you activate the speaker and all the volume to 100.

    Try switching the speaker using AudioPathControl.toggleSpeakerphone ().

    PS if there is another audio player at the same time, you must use AudioPathControl this player instead of your drive.

  • one of my plugsins in firefox, but in my laptop obsolete say he said updated?

    in the folder plugins the program VLC WEB PLUG IN say outdated, but when I check my control panel in my laptop its says he's got the current plugin. File: npvlc.dll

       Path: C:\Program Files\VideoLAN\VLC\npvlc.dll
       Version: 2.0.6.0
       State: Enabled
       VLC media player Web Plugin 2.0.6
    

    MIME Type Description Suffixes
    audio/mpeg MPEG audio mp2, mp3 or mpga, mpega
    audio/x-mpeg MPEG audio mp2, mp3 or mpga, mpega
    video/mpeg MPEG video mpg, mpeg, mpe
    video/x-mpeg MPEG video mpg, mpeg, mpe
    system video/mpeg MPEG video mpg, mpe, mpeg, vob
    system video/x-mpeg MPEG video mpg, mpe, mpeg, vob
    Audio/mp4 MPEG-4, aac audio, mp4, MPEG4
    audio/x-m4a MPEG-4, m4a audio
    video/mp4 MPEG-4 video mp4, MPEG4
    application/mpeg4-iod MPEG-4 video mp4, MPEG4
    application/mpeg4-muxcodetable MPEG-4 video mp4, MPEG4
    MPEG-4 video/x-m4v video m4v
    video/x-msvideo AVI avi video
    application/ogg Ogg ogg stream
    video/ogg Ogg video ogv
    application/x-ogg Ogg ogg stream
    application/x-vlc-plugin VLC plugin
    video/x-ms-asf-plugin Windows Media Video asf, asx
    video/x-ms-asf Windows Media Video asf, asx
    application/x-mplayer2 Windows Media
    video/x-ms-wmv Windows Media wmv
    video/x-ms-wvx wvx Windows Media Video
    audio/x-ms-wma Windows Media Audio wma
    application/x-google-vlc-plugin Google VLC plugin
    audio/wav WAV wav audio
    audio/x-wav WAV wav audio
    3GPP audio/3gpp audio 3gp, 3gpp
    video/3gpp, 3GPP video 3gp, 3gpp
    Audio/3gpp2-3GPP2 3g 2 audio, 3gpp2
    video/3gpp2 video 3GPP2 3g 2, 3gpp2
    video/divx DivX divx video
    video/flv FLV video flv
    video/x-flv FLV video flv
    application/x-matroska Matroska mkv video
    video/x-matroska Matroska mkv video
    audio/x-matroska Matroska audio mka
    application/xspf + xml xspf xspf Playlist
    audio/x-mpegurl MPEG audio m3u
    WebM video/webm, webm video
    Audio/webm, WebM audio webm
    vnd.RN - application/realmedia rm Real Media File
    audio/x-realaudio Real Media Audio ra
    Audio/amr AMR audio amr
    audio/x-flac

    Hello

    Try uninstalling and then reinstalling the plugin, download the latest version available.

    I hope this helps!

    Curtis

  • MS Movie Maker - codecs

    MS Vista - using Movie Maker 6.0, I have problems with the audio.  Any video imported into Movie Maker is not audio with it.  I'm more interested, however, get a few Notes of the voice of my Blackberry in Movie Maker (file extension is .amr).  DivX won't, and I also had problems with WMEncoder.  Any ideas on how to get my .amr files in Movie Maker?

    MS Vista - using Movie Maker 6.0, I have problems with the audio.  Any video imported into Movie Maker is not audio with it.  I'm more interested, however, get a few Notes of the voice of my Blackberry in Movie Maker (file extension is .amr).  DivX won't, and I also had problems with WMEncoder.  Any ideas on how to get my .amr files in Movie Maker?

    ================================
    Try to use the following free software to convert the .amr
    files to the .wma format.

    (FWIW... it's always a good idea to create a system)
    Restore point before installing software or updates)

    Format Factory
    http://www.pcfreetime.com/
    (FWIW... you can uncheck
    all the boxes on the last screen)

    After downloading and installing Format Factory...
    Open the program and choose an output folder...
    (this is where you will find your files when they are
    converted)

    Drag and drop your clips audio .amr on main screen...

    Select "while"WMA"/ OK...

    Click on... Beginning... in the toolbar...

    That should do it...
    John Inzer - MS - MVP - Digital Media Experience - Notice_This is not tech support_I'm volunteer - Solutions that work for me may not work for you - * proceed at your own risk *.

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

  • ContentDescriptor do not accept the pcm?

    Hi all

    I have the following strange situation: I created player with Datasource to receive the RtpPacket byte array and play with blackberry player. However, to implement this I use SourceStream who must have a few ContentDescriptor:

    public class RecvStream implements /*Runnable,*/ PlayerListener {
        private Player mPlayer;
        private SendStream mSendStream;
    
        private SourceStream mInput= new SourceStream(){
            ContentDescriptor mContentDescriptor=new ContentDescriptor("audio/amr");
             /* (non-Javadoc)
             * @see java.io.InputStream#read(byte[], int, int)
             */
            public int read(byte[] b, int offset, int length) throws IOException {
                int len = 0;
                return len;
            }
    
            public ContentDescriptor getContentDescriptor() {
                return mContentDescriptor;
            }
    
            public long getContentLength() {
                return -1;
            }
    
            public int getSeekType() {
                return SourceStream.SEEKABLE_TO_START;
            }
    
            public int getTransferSize() {
                return 320;
            }
    
            public long seek(long where) throws IOException {
                return where;
                //throw new IOException("not seekable");
            }
    
            public long tell() {
                return 0;
            }
    
            public Control getControl(String controlType) {
                return null;
            }
    
            public Control[] getControls() {
                return null;
            }
        };
    
        public RecvStream(RtpSession session,SendStream sendStream) {
        }
    
        public void stop() {
            if (mPlayer == null) return;//nothing to stop
            mRunning=false;
            try {
                if (mPlayer.getState() == Player.STARTED) {
                    mPlayer.stop();
                }
                if (mPlayer.getState() != Player.CLOSED) {
                    mPlayer.close();
                }
            } catch (MediaException e) {
            }
        }
    
        public void start() {
            mSession.setTimestampClock(new TimestampClock(){
                public int getCurrentTimestamp() {
                    return getCurTs();
                }
            });
            try{
                mPlayer = Manager.createPlayer(new DataSource (null) {
                    SourceStream[] mStream = {mInput};
                    public void connect() throws IOException {
                    }
    
                    public void disconnect() {
                    }
    
                    public String getContentType() {
                        return mInput.getContentDescriptor().getContentType();
                    }
    
                    public SourceStream[] getStreams() {
                        return mStream;
                    }
    
                    public void start() throws IOException {
                    }
    
                    public void stop() throws IOException {
                    }
    
                    public Control getControl(String controlType) {
                        return null;
                    }
    
                    public Control[] getControls() {
                        return null;
                    }
    
                });
    
                mPlayer.addPlayerListener(this);
                mPlayer.realize();
                AudioPathControl  lPathCtr = (AudioPathControl) mPlayer.getControl("net.rim.device.api.media.control.AudioPathControl");
                lPathCtr.setAudioPath(AudioPathControl.AUDIO_PATH_HANDSET);
                mPlayer.prefetch();
                //if ( DeviceInfo.isSimulator() == false) { //only start player on real device
                mPlayer.start();
    
                //}
    
            }catch (Throwable e){
            }
    
        }
    
        public void playerUpdate(Player arg0, String event, Object eventData) {
            if (event.equals(PlayerListener.BUFFERING_STARTED)){
                mBuffering=true;
            } else if (event.equals(PlayerListener.DEVICE_UNAVAILABLE)) {
                //pausing both player and recorder
                try {
                    //already stooped mPlayer.stop();
                     mSendStream.getPlayer().stop();
                } catch (Throwable e) {
                }
            } else if (event == PlayerListener.DEVICE_AVAILABLE) {
                //starting both player and recorder
                try {
                    mSendStream.getPlayer().start();
                    stop();
                    reset();
                    start();
                } catch (Throwable e) {
                }
            }
        }
    
        public int getPlayLevel() {
            if (mPlayer !=null) {
                return ((VolumeControl)mPlayer.getControl("VolumeControl")).getLevel();
            } else {
                return 0;
            }
        }
    
        public void setPlayLevel(int level) {
            if (mPlayer !=null) {
                ((VolumeControl)mPlayer.getControl("VolumeControl")).setLevel(level);
            }
        }
    
        public void enableSpeaker(boolean value) {
            if (mPlayer == null) return;//just ignore
            AudioPathControl  lPathCtr = (AudioPathControl) mPlayer.getControl      ("net.rim.device.api.media.control.AudioPathControl");
            try {
                lPathCtr.setAudioPath(value?AudioPathControl.AUDIO_PATH_HANDSFREE:AudioPathControl.AUDIO_PATH_HANDSET);
            } catch (Throwable e) {
            }
        }
    
        public boolean isSpeakerEnabled() {
            if (mPlayer == null) return false;//just ignore
            AudioPathControl  lPathCtr = (AudioPathControl) mPlayer.getControl("net.rim.device.api.media.control.AudioPathControl");
            return  lPathCtr.getAudioPath()==AudioPathControl.AUDIO_PATH_HANDSFREE;
        }
        public long getPlayerTs() {
            return mPlayerTs;
        }
    

    When I try to write ECM/pcm audio or audio/basic for Simulator ContentDescriptor throws MediaException.As I understand that I did something wrong, but how can I give a pcm for ContentDescriptor entry?

    Any ideas?

    ThanksMSohm , but I already find solution. For that Datasource accepts the pcm (it's weird), but you must write audio/x-pcm not ECM/pcm audio or audio/basic. Before that he was the exception in time of creating player.

  • JSR 211 - don't launch not Media Player to play .wav files


    Hi, sorry it took so long.

    It worked for me, BUT take a different MIME type.

    It seems to be: audio/x-wav

    It's the debug output of the content manager with all supported types:

    _ClassName "net.rim.device.apps.internal.explorer.content.MediaContentHandlerApplication" (id = 793018368)
    _Id 'net.rim.bb.mediacontenthandler' (id = 792977408)
    _types string [79] (id = 793116672)
    [28] "audio/x-mpegurl" (id = 794296320)
    [29] "audio / midi" (id = 794337280)
    [30] "audio / midi" (id = 794378240)
    [31] "audio / midi" (id = 794419200)
    [32] "audio / midi" (id = 794460160)
    [33] "audio / midi" (id = 794501120)
    [34] "video/3gpp" (id = 794542080)
    [35] "video/3gpp2' (id = 794583040)
    [36] "video/mp4" (id = 794624000)
    [37] "video/x-msvideo" (id = 794664960)
    [38] "video/quicktime" (id = 794714112)
    [39] "video/divx" (id = 794755072)
    [40] "video/mpeg" (id = 794796032)
    [41] "video/x-ms-asf" (id = 794836992)
    [42] "video/x-ms-wm" (id = 794877952)
    [43] "video/x-ms-wmv" (id = 794918912)
    [44] "video/x-ms-wmx' (id = 794959872)
    [45] "audio/mpeg" (id = 795000832)
    [46] "audio/mpeg" (id = 795041792)
    [47] "audio/x-wav" (id = 795082752)
    [48] "audio/x-wav" (id = 795123712)
    [49] "audio/amr" (id = 795164672)
    [50] "audio/3gpp" (id = 795205632)
    [51] ' audio/3gpp2' (id = 795246592)
    [52] "audio/mp4" (id = 795287552)
    [53] "audio/aac" (id = 795328512)
    [54] "audio/x-gsm" (id = 795369472)
    [55] "audio/x-ms-wma" (id = 795410432)
    [56] ' audio/qcelp' (id = 795451392)

  • Custom player DataSource without possible RTSP streaming?

    Dear people,

    everyone SUCCEEDS with Manager.createPlayer (source of data source)
    with the data source customized with real audio STREAMING?
    I mean without using the "rtsp: / / ' locator, just feed the player with your data buffer, which is more...

    Example of the RIM is downloading the full file first is nothing new compared to the default behavior of the reader (read full datafile before playing; I understand that it could get in the J2ME standard, but then these methods makes no sense

    When I try to read an audio stream (audio/amr) I see that the Player tries to put first the cached data (called read() length from 58000 until my current buffer size), the computer begins to play (the role he was able to buffer at the beginning) but ends by with code 5 error what Unspecified «» : an error has occurred which does not fit into another category. »

    It looks like you are not conform to the contract of the SourceStream.read method. First of all, if currentPosition + len > stream.size (), and then you return stream.size () rather than the () - currentPosition bytes stream.size bytes. Second, if currentPosition + len<= stream.size(),="" you're="" returning="" the="" right="" bytes="" for="" the="" first="" time,="" but="" then="" you="" don't="" appear="" to="" be="" updating="" the="" currentposition="" variable="" --="" so,="" if="" the="" condition="" is="" still="" true="" on="" the="" next="" read,="" you're="" returning="" the="" same="" frames="" as="" last="" time="" causing="" the="" user="" to="" hear="" a="">

    Here is how the read method should look like (minus the part blocking when no data is available and less-1 or EOFException when the SourceStream is closed or stopped)-I have tried compiling or running it though:

    public int read(byte[] b, int off, int len) throws IOException {  if (len < 1) {    return 0;  }
    
      final int streamSize = stream.size();  final int currentPosition = (int) this.currentPosition;  final int bytesToReturn = Math.min(streamSize - currentPosition, len);  if (bytesToReturn < 1) {    // TODO: Need to block here on the stream until some bytes are available    return 0;  }
    
      System.arraycopy(stream.getByteArray(), currentPosition, b, off, bytesToReturn);  currentPosition += bytesToReturn;   return bytesToReturn;}
    

    PS Examples of RIM (do not remember those who) have a shared stream in which a son written data and another thread reads the data from. This may be another (simpler) solution to your problem, your reading will be a one-liner: return sharedStream.read (b, off, len).

  • Is there a converter optional/codec for audio format '.amr?

    The. Audio format AMR used in my smartphone Blackberry does not seem to be recognized by Media Encoder CC.

    There are a plethora of free converters out there; but I question their legality & I'm afraid of potential viruses...
    I really wish that Media Encoder CC could pass for me in this regard...
    Assume, correctly, that Adobe does not want to pay fees for this codec?

    Hi dayoldy,

    I really wish that Media Encoder CC could pass for me in this regard...

    Assume, correctly, that Adobe does not want to pay fees for this codec?

    Sorry, only the following audio formats are supported: file formats supported first Pro CC

    Thank you

    Kevin

  • Can I play a file AMR downloaded from my smart phone, on Windows media player and if so, how?

    I pulled a few files of playing me the guitar to my computer from my recorder App on my Smartphone Samsung Infuse, when I try to open the fles to hear a window says windows media player can't open files, would like to really hear these things, is there any way I can, thank you very much.

    Hello

    AMR files can be converted to MP3 or you can use the best codec.

    AMR to MP3 - free
    http://www.amrtomp3converter.com/

    AMR to MP3 - free online
    http://audio.online-convert.com/convert-to-MP3

    There are others that you can find using Bing or Google.

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

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

    All you need is good Codec - get these if 32-bit.

    -Free - CCCP also get free tool of insurgents
    http://CCCP-project.NET/

    CCCP - Forums
    http://www.CCCP-project.NET/forums/index.php?PHPSESSID=34ckg75t1mmdlcgfete6rif814;wwwRedirect

    FFDSHOW - free
    http://sourceforge.NET/projects/ffdshow/

    Check here:

    Plug-ins for Windows Media Player
    http://www.Microsoft.com/windows/windowsmedia/player/plugins.aspx

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

    VLC needs, of no use so usually Codec as a backup when asked to support associations of files just say no.

    VLC - free
    http://www.videolan.org/VLC/

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

    If 64 bits and you need codec.

    Read this 1st and go that route, or use the one below. (Vista or Windows 7)

    http://www.Vistax64.com/sound-audio/152850-Vista-codec-pack-32bit-64bit-Media-Player-codecs.html

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

    If 64-bit - can run WMP in 32 or 64 bit mode.

    Or try these: download - SAVE - go to the place where your put them RIGHT CLICK – RUN AS ADMIN.

    For 32-bit use these - OR the 32 bit ones listed above which I prefer.

    K - Lite Codec Pack 8.1.7. (or newer)
    http://www.codecguide.com/

    Use them for 64-bit:

    K - Lite Codec Pack 5.6.0 (64-bit) (or newer)
    http://www.codecguide.com/

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

    You know that you use WMP 32 or 64

    Change, modify or value 64-bit Windows Media Player 11 (WMP11) in Windows Vista x 64 as default (or WMP12 - Windows7)
    http://www.mydigitallife.info/2007/01/19/switch-change-or-set-64-bit-Windows-Media-Player-11-WMP11-in-Windows-Vista-x64-as-default/

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

    And you can use it when necessary because no codex is usually required.

    VideoLAN - VLC media player
    http://www.videolan.org/

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle=""><- mark="" twain="" said="" it="">

  • Audio recording problem

    Hi all

    Can anyone suggest me the code to run the audio recording!

    The implementation of audio recording!

    Hello

    Check this code it will work.

    
    try{
                player = 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();
                }
    

Maybe you are looking for

  • How to unlock my IMEI (iphone 5)

    Greetings, wanted to know if you could help me to unlock the IMEI of an iphone 5 (AT & t) who gave me my cousin (who changes an iphone 6s) and I used 2 months, but I decided to restore because the cammera was slow. But now, the phone asks for a SIM c

  • How can I move my program on my computer to my cRIO

    I noticed that my program slows down the computer over time. I want to move it to the cRIO I. How can I do this?

  • USB6008 output

    Hello I have been asked to draw the output voltage of the USB-6008 vs the entrance of the NOR-9234. The cards are interconnected, so that the NOR-9234 should read exactly what the USB-6008 case sends to. But there is a strange phenomenon that happens

  • account temporarily suspended and groups of invitations.

    y at-it sort of can I send invitations to my client without being as spam in hotmail... incidentally that my account has been temporarily suspended for 24 hours now and I have got it on all my advertising materials. How long before you can start usin

  • Editing software video for use w / 8560p Core i7 Elitebook

    Currently using (or you could say, "try to use") Adobe elements, Prime Minister, for video editing. Just for the clumsy. Takes forever to do simple video work. The machine is capable of? Is there a best software to use to simply change and download t