How to play non-standard audio file in J2ME CLDC

Hello,
I am developing an application for mobile. In this application I need to save the text and audio data in one file (extention of the file may be .mmo etc.), and then I need to play the audio from that file with the help of a mobile. (the file will be created with the help of a PC).
I am seeking for help, whether it is possible or is there any other solution? I want to save both text and audio in the same file to facilitate my user.
Your help or comments on my question will be greatly appreciated.
with best regard,

Hi japaneagle!
This is the way i would solve the problem and i have not tested it, So there can be some problems while implementing it. The approach is based on BASE64 encoding and XML, there can be some some limitation on file size.
This is the way.
1) first you have to encode the audio file using BASE64 encoding. Its about reading the bytes from file and encoding to BASE64 char sequence. You can find serveral BASE64 encoder examples in Java (do Google).
2) Now you have to create a XML file like this, assume that, file type is WAV and you have the encoded char sequnce..
<AudioFile>
<AudioFormat>WAV</AudioFormat>
<TextData>some text</TextData>
<AudioData>encoded BASE64 char sequence here</AudioData>
</AudioFile>
3) Assume that, now file is available in the memory card.Now you have to read it using File Connection API and parse it using kXML inside your MIDlet
4) After parsing it you will have file type and encoded BASE64 char sequnce..now you have to decode the charsequnce to byte[]. Then create a ByteArrayInputStream using the byte[].. Here you need a BASE64 Decoder..(do Google).
then create the player using Manager.createPlayer(InputStream stream, String type) MM API;
Now you can play the file...
You can add many attributes in the XML file if you want...
If you are going to use J2ME polish API for your UI then BASE64 won't be a problem, it has a Base64Encoder and Decoder..
-Jestan

Similar Messages

  • How to play 5.1 audio files

    I have ripped my The Crystal Method Legion of Boom DVD-A to 5.1 FLAC files then converted to Apple Lossless (ALAC) using either Amadeus Pro or XLD. The resulting m4a files play in quicktime and preview but won't even import in iTunes. The info properties of the file show 6 channels of audio. I have tried other settings when converting, (24bit, 16bit, AAC instead of ALAC) and the results are the same. Here is the funny thing if I change the filetype from m4a to m4v it shows up in itunes and plays and says in the channel info Multichannel. Obviously it shows as a video. Is iTunes yet capable of playing multichannel audio files? If so what is the best converter to show up as proper 5.1 surround?

    I used to play multichannel quicktime .mov audio files with iTunes. AAC and AIF.But not 24 bit AIF.
    You need a multi output audio interface for this.
    iTunes can play AC3 files only on bought movies or with perian installed via optical out. But problems with jumping from one file to the next or changing audio tracks leading to complete hangs of iTunes made me switch to PLEX, which plays everything perfectly even DTS and 5.1 AAC files over spdf optical into 5.1 receiver.(Converting AAC to DD on the fly).
    Back to your question,
    if you have a multi output audio interface and Quicktime Pro, you can generate multi channel .mov files and define what track goes to what output.

  • Bug when playing non-standard MP3 file

    There appears to be a problem when reading/playing MP3 files. If the mono/stereo indicator in the first frame of a VBR MP3 file (VBR frame itself, Xing VBR in my case) contains "stereo", but the subsequent frames contain single-channel sound (i.e. mono), the file is not played by iTunes. The file is playing perfectly fine with MS media player, Foobar2000 and a host of other music players though.
    To be precise, in my case, the frame header of the Xing VBR frame is FF FB 90 00, but the frame header of the actual sound frame is FF FB 40 C4.
    I thought the whole idea of MP3 encoding is that it allows to change all parameters of the sound from one frame to another. Yet, it seems that a simple switch from stereo to mono throws iTunes off track.

    Why not fix the VBR frame to be correct for the sound it's describing? Just run VBRFix on the files.

  • Playing a mp3 audio file in j2me

    Hi
    I need a code to play a mp3 file in j2me

    Hi ,
    Well, you can try going through the [The J2ME Mobile Media API.|http://developers.sun.com/mobility/midp/articles/mmapioverview/] It has all the information on how can you make your application to run audio or video files. It also have the example to understand better.
    One more example for the same you can find in WTK apps list where it gives to demo for playing media files, both audio and video.
    Edited by: hiteshrawat on Jun 12, 2009 12:14 AM

  • How can I fast forward Audio Files without itunes?

    So I like having the ability to preview audio files directly in the finder folders. I would like the ability to fast forward and rewind them but I cant seem to figure out how to do it without opening itunes first. Kind of annoying. I like how in windows you click play on an audio file and windows media player opens and you can ffwd and rewind. Any Jedi's out there know how I can do this? Thanks!

    There are plenty of other audio players for Mac that are lighter weight than iTunes.
    I use VLC, but here are some others:
    http://www.apartmenttherapy.com/10-mac-osx-music-player-altern-139519

  • How can I use mp4 audio files from my iTunes library in an Elements 10 slide show?

    How can I use mp4 audio files from my iTunes library in an Elements 10 slide show?

    AAC is Advanced Audio Coding.  Basically it's a format that sounds better than MP3 but doesn't take up as much space as a lossless format (like you'd have on a CD).  More than likely you've had that encoding turned on when you ripped your music into itunes (it's the default encoder).  Therefore your LG phone won't play them.
    You need to turn off the AAC format by going to the iTunes menu, Preferences, General (at the top), then clicking the "Import Preferences" button.  Change the AAC Encoder to MP3 Encoder.  After that you'll have to make MP3 copies of your songs by right clicking them and selecting "Create MP3 Version."  You'll get a copy of the song that should transfer to your SD card and have MP3 encoding.  Hopefully your phone will play that.

  • AVTransmit, how transmit more than one audio files

    Hello. I have download the client server example from your site for transmitting an audio file. The example is in http://java.sun.com/products/java-media/jmf/2.1.1/solutions/AVTransmit2.java
    The thing is that i want to change it so as to transmit one audio file after another, something like having a playlist. How can i change the datasource and play the next audio file? I try to change it by adding an endofmedia event but just changing the datasource is not working

    I'll post u the jnlp file which i am using. To sign all the jars i've used the same alias ( a self signed certificate using keytool and jarsigner).Here is the jnlp file:
    <?xml version="1.0" encoding="utf-8"?>
    <jnlp spec="0.2 1.0"
    codebase="http://127.0.0.1:8080/healthdec"
    href="testTool.jnlp">
    <information>
    <title>Unit Test Manager </title>
    <vendor>Sun Microsystems, Inc.</vendor>
    <description>A minimalist drawing application along the lines of Illustrator</description>
    <icon href="images/testing.gif"/>
    <offline-allowed/>
    </information>
    <resources>
    <j2se version="1.3+ 1.2+"/>
    <jar href="utestfw.jar" main="true" download="eager"/>
    <jar href="crimson.jar" main="false" download="eager"/>
    <jar href="jaxp.jar" main="false" download="eager"/>
    </resources>
    <application-desc main-class="utestfw.ObjectBrowser"/>
    <security>
    <all-permissions/>
    </security>
    </jnlp>
    Can u please look at the above code and suggest me where i am wrong. Thanks.
    -Regards
    Aparna

  • How can I add an audio file to each slide when I export to HTML Keynote 6.2

    How can I add an audio file to each slide when I export to HTML Keynote 6.2
    I am trying to create an audio slide show instead of a movie

    Drag and drop one music files onto each slide then export. (File > Export > HTML)

  • How can I upload an audio file and link a page on my webiste to it?

    I host a radio show weekly, have recorded broadcasts in MP3, want to host them on itunes and have a link from my website for visitors to listen to. Can anyone help me? Thanks

    Could I ask you to read my 'get you started' page on podcasting, which should answer most of your questions.
    http://rfwilmut.net/pc
    If you still have questions do please come back.
    As to your website, which is a separate matter from iTunes, you can provide embedded players - these pages gives you some information:
    How to embed an MP3 audio file into a web page without bringing up dialog boxes in Windows
    How to create a pop-up MP3 player

  • HT1473 how do i save an audio file from a webpage to iTunes?

    how do i save an audio file from a webpage to iTunes?

    If the web page is designed to let you save files it will often have a download link, or if it is a link to the file directly you can try to right click on the file.  If it isn't set up that way then they probably don't intend for the file to be downloaded.

  • How do i save an audio file using quick time?

    How do i save a audio file from quick time. When I looked it up I was told to go to file on quick time and click on save as but my quick time has no save as to click on in file. What Now?

    How do i save a audio file from quick time. When I looked it up I was told to go to file on quick time and click on save as but my quick time has no save as to click on in file. What Now?
    You need to explin your workflow better.
    The "Save" action may be initiated by a "Share" or "Export" option depending on the app you are using. For instance, QT 7 Pro has "Save", "Save As...", "Share...", "Export...", and "Export for Web..." options depending on what you are specificly trying to do. On the other hand, QT X may have "Duplicate", "Export...", Export To", and/or "Share" options for various goals.
    Are you trying to record a new audio file using a mic, extract and save an audio track from a video, export audio from a video file, save an internet audio file that opened in the QT player, save an online audio file, etc?

  • How do I save an audio file sent to my phone so I may use it as a ringtone?

    How do I save an audio file sent to my iphone?

    try searching in the App store for something that will do that.  You can't do that natively.

  • How do I save an audio file to my phone that was sent through a text message attachment

    How do I save an audio file that was sent via a text message to my phone so that I can use it as a ring tone

    try searching in the App store for something that will do that.  You can't do that natively.

  • How to transfer video and audio files from windows PC to new ipad?

    How to transfer video and audio files from windows PC to new ipad?

    iTunes: Syncing media content to iOS devices and iPod
    Sync with iTunes.
    Connect the iPad to the PC and launch iTunes.
    Click on the iPad name on the left side under devices.
    Click on the Music Tab on the right.
    Click on all of the albums, artists, playlists that you want to sync
    Click on the Sync Music Heading.
    Click on Apply in the lower right corner of iTunes
    Follow the same procedure for Movies.

  • How do I unprotect my audio files so I can upload them to garage band on my iphone4?

    How do I unprotect my audio files so I can upload them to garage band on my iPhone and use them

    Hi Chris,
    Format the flash drive in FAT32, save the file as you would normally and transfer it to the flash drive, then the PC. It should work fine unless one of the Word apps is older.

Maybe you are looking for

  • Alert - Do Not Buy This Phone before 4g Network is in place

    I just bought my Droid X less than 30 days ago. Verizon is launching a new 4G network. These phones are not upgradable to get on the 4g network. If you are one of the 110 million people that live in the test markets where the 4g network will be avail

  • Seeing iTunes library from MacPro with ethernet only

    I upgraded from an Apple TV 1st Generation so I could use Netflix.  I've managed to successfully set up home sharing with my MacBook Pro, but it is not seeing the content on my MacPro. This does not have a wi-fi card, but is connected to a wi-fi rout

  • Xcode fails to launch on Snow Leopard

    If I attempt to launch XCode from the dock (as a standard user), I simply get an error message (see end of his message). The same happens regardless of the way XCode is launched, ie, from Spotlight, from the Applications folder, from the Applications

  • Facing null pointer exception

    Hi, When i try to run any PG.xml i am getting the below error. Exception Details. oracle.apps.fnd.framework.OAException: java.lang.NullPointerException      at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:888)      at oracl

  • Address Book Wants Web Access? Why?

    Hi All, I have a 3rd party app called Little Snitch installed on my system. It alerts me anytime an application wants to phone home or otherwise access the Internet. When opening my Address book today, I got a Little Snitch alert saying that Address