Method to create Player directly from the mp3 bytes array

I was checking JMF and didn't find any method to play a mp3 informing its byte array
Wouldn't it be an interesting method ? Ok, URL is much easier, but I am talking about ID3 files that has sequences of mp3 chuncks in the same file... Anyone knows a way to build a Player from mp3' array of bytes ???

sergio_abreu wrote:
Err, Sorry but I desagree.I expected as much
It seems you didn't understand my question well.Quite possibly
I think the form I wrote was confusing:
In +"Anyone knows a way to build a Player from mp3' array of bytes ???+"
I meant: Anyone knows a way to create a Player or MediaPlayer CLASS from DYNAMIC mp3' array of bytes ???That's even less coherent, to be honest
Have you seen the structure of an ID3 music file (album) ? It's a collection of mp3 chuncks in only one file.ID3 is simply metadata about a work. It is not "chunks of MP3"
I have already designed a ID3 class (I called "ID3Info" ) in Java that extracts/shows (dump) all the mp3 from the ID3 file.ID3 isn't a file format. Nor can you extract an MP3 from it
The thing I would need now is to have some methods in Manager Class from which I could choose which bytes of a generic file I want to load as an mp3 song, that's all.This makes zero sense. Like saying "I need a kettle which will turn furniture into weather"
It would be nice if there were 2 new different methods:
1) Player createRealizedPlayer( byte[] songBytes, String fileExtension);
Arguments: the song byte array and the extension, ex. "mp3"And what would this method do? Where does the byte[] come from? What is in the file, that you also need in order to play the song? How is this - assuming it's possible - easier, better, than just playing the file?
2) Player createRealizedPlayer( java.net.URL genericFileURL, int beginPosition, int endPosition, String fileExtension);
Arguments: the URL of a file containing varios mp3 chuncks and the begin / end of the bytes to be loaded as a song and a String to describe the type of file ("mp3" for example)See above
PS: If you find it interesting, I am willing to contribute to enrich even more the Java Media framework. If you think my ideas are not valid, I just ask someone to send me the jmf source code so that I can alter some classes for my tests only.Why do you need JMF source code? I don't think this magical upside-down-ness is going to enhance anything, to be honest

Similar Messages

  • How do I read directly from file into byte array

    I am reading an image from a file into a BuffertedImage then writing it out again into an array of bytes which I store and use later on in the program. Currently Im doing this in two stages is there a way to do it it one go to speed things up.
    try
                //Read File Contents into a Buffered Image
                /** BUG 4705399: There was a problem with some jpegs taking ages to load turns out to be
                 * (at least partially) a problem with non-standard colour models, which is why we set the
                 * destination colour model. The side effect should be standard colour model in subsequent reading.
                BufferedImage bi = null;
                ImageReader ir = null;
                ImageInputStream stream =  ImageIO.createImageInputStream(new File(path));
                final Iterator i = ImageIO.getImageReaders(stream);
                if (i.hasNext())
                    ir = (ImageReader) i.next();
                    ir.setInput(stream);
                    ImageReadParam param = ir.getDefaultReadParam();
                    ImageTypeSpecifier typeToUse = null;
                    for (Iterator i2 = ir.getImageTypes(0); i2.hasNext();)
                        ImageTypeSpecifier type = (ImageTypeSpecifier) i2.next();
                        if (type.getColorModel().getColorSpace().isCS_sRGB())
                            typeToUse = type;
                    if (typeToUse != null)
                        param.setDestinationType(typeToUse);
                    bi = ir.read(0, param);
                    //ir.dispose(); seem to reference this in write
                    //stream.close();
                //Write Buffered Image to Byte ArrayOutput Stream
                if (bi != null)
                    //Convert to byte array
                    final ByteArrayOutputStream output = new ByteArrayOutputStream();
                    //Try and find corresponding writer for reader but if not possible
                    //we use JPG (which is always installed) instead.
                    final ImageWriter iw = ImageIO.getImageWriter(ir);
                    if (iw != null)
                        if (ImageIO.write(bi, ir.getFormatName(), new DataOutputStream(output)) == false)
                            MainWindow.logger.warning("Unable to Write Image");
                    else
                        if (ImageIO.write(bi, "JPG", new DataOutputStream(output)) == false)
                            MainWindow.logger.warning("Warning Unable to Write Image as JPEG");
                    //Add to image list
                    final byte[] imageData = output.toByteArray();
                    Images.addImage(imageData);
                  

    If you don't need to manipulate the image in any way I would suggest you just read the image file directly into a byte array (without ImageReader) and then create the BufferedImage from that byte array.

  • Printing directly from the file to adobe createpdf online

    I don't find the file created printing directly from the file to the adobe Createpdf online, and I don't also recive any E-mail as a confirmation of welldone work. Do I make a mistake?

    Try the createPDF forum at http://forums.adobe.com/community/createpdf. This forum is for Acrobat.

  • Why do I get a "can't import spreadsheet because it was created with an unsupported application version" alert when the updated version was purchased direct from the Mac App Store? The spreadsheet is now lost somewhere!

    Why do I get a "can't import spreadsheet because it was created with an unsupported application version" alert when the updated version was purchased direct from the Mac App Store? The spreadsheet is now lost somewhere!

    Pages 4.3 should still be in an iWorks folder within your Applications folder. 
    http://www.apple.com/feedback/pages.html

  • Cant preview mp3's directly from the finder

    Hey Guys,
    Since a few months, I just can see mp3 files as an icon with the itunes symbol in it.
    Before, there was previews from the album cover and everytime you click on it,
    the music was played in preview mode directly from the finder.
    Just a few minutes ago, I updated the version of my itunes to the currently newest one.
    That didnt give me a solution indeed.
    Do anybody know an approach to solve this problem?
    Regards from Berlin
    Sam

         @Kenichi Watanabe
    The "problem" is that you can't preview the song in Finder, correct?  So it's not about iTunes...?
         Yeah, youre right. sorry for the wrong category.
    thank you for your fast replies. but I dont ask for any alternates. I thought, maybe its an issue with the settings.
    Im asking myself why apple dont fix the error that may cause this problem...

  • HT200109 Why do all my other Apple devices not care if the movie I rented from iTunes if it was downloaded directly to that device or not, but the stupid Apple TV won't allow you to play rented movies unless you rented it directly from the Apple TV?

    Why do all my other Apple devices not care if the movie I rented from iTunes if it was downloaded directly to that device or not, but the stupid Apple TV won't allow you to play rented movies unless you rented it directly from the Apple TV?
    Great, so now I have to airplay it by linking my computer to my Apple TV and then the movie has to buffer! So, all that time I spent downloading the HD video has to technically "download" again by buffering. The more I use Apple TV, the more I feel like this item was not created by Apple. I don't even use it for what I originally purchased it for. If I would have known that anytime I wanted to sync a movie from my computer to Apple TV by using airplay that it would have to buffer the movie, I would have never ever ever ever ever purchased this waste of time device. So the video has to technically play all the way through one time first so Apple TV can "remember" the movie to play it back in real time afterwards.
    Am I missing something here? Am I doing something wrong that can be fixing my problem? I should have known that the Apple TV had so many things backwards when simple things like when you are using the remote and you reach the bottom of your list, in order to cycle back to the top of your list you have then press the directional buton back the other way rather than most modern day devices that will automatically cycle you back to the top or to the other side when you reached the bottom or end but keep on pressing the button. That **** annoys me when I am doing a search for a movie and have to type the name in manually and have to cycle back and forth to the letters. It makes me feel like I am using a rotary phone or something!

    I was told by someone to try and purchase something directly from my Apple TV and that will help authorize my Apple TV.  So I picked something that was free and it downloaded.
    Then I went back to the Movie that would not work and it played just fine. 
    So it seemed to work.  I will have to try it on other movies and TV shows later.

  • Problem creating a PDF from the "print view" of a web page

    When creating a PDF from the "print view" of a web page, the features in the print dialog box overlap. When the PDF is created, the words are garbled. e.g. words apppear as jzhhhxxf or zxihcj.

    Use a job settings that embeds the fonts. If you look at the PDF, the font properties probably do not look correct and don't include embedded fonts. Also, set the printer to Adobe PDF before you try to do a print, so that the web page can try to properly adjust to the printer.
    Why not just try opening the web site directly in Acrobat?

  • Can songs be deleted directly from the 5th gen ipod?

    I occasionally find a song I no longer want, and want to delete it then and there off of the ipod, but I can't find this function on the ipod. I forget by the time I get back to the computer to delete it, therefore deleting it when I next sync the ipod.
    any ideas anyone? Should this be function the ipod should be able to perform?

    No, you can't delete directly from the iPod. Depending on how you use ratings, you could, for example, rate all the songs you want to delete 1 star. Or you could add them to an On-The-Go playlist. With either method, you would the easily be able to find them when you next synced.

  • Good Morning.  How do I delete directly from the iPhone, with out synching, movies and/or tvshows?

    Good Morning.  How do I delete directly from the iPhone, with out synching, movies and/or tvshows?

    I had the same problem with Iphone 5 iOS 8, none of the methods described above were successful.
    Finally, Iexplorer helped to solve my problem.
    http://iexplorer-support.macroplant.com/customer/portal/articles/1325738-how-to- delete-all-photos-from-an-iphone-or-ipad
    best regards,
    salad

  • How to create planned order from the sales order for a processing item

    In the MTO sceanrio, assembly order is created directly from the sales order. I would like to create a planned order from the sales order.
    I tried the Planning strategy group 81 in the material master but it didnt work.
    Could you please let me know how to do it? Is it Schedule line config that controls whether planned order is created?
    Thanks
    Harish

    Narayana,
    Planning strategy 82 is the best & standard way of getting production order created on sale order create.
    just assign this strategy  in MRP 3 view under strategy group.
    If not then using sale order reqt type ( KMFA- Assembly with production order) & assigning this to your sale order item category is also another way to create prodcution order without using planning strategy in material master.
    Follow steps in SPRO-->Sales & dist --> basic functions >avail check &transfer of requirements> transfer reqts-->determination of reqt type using transaction
    Here you may select the item category you in sale orders & assign KMFA to your item category. this will then give option in sale order create to change reqt type to KFMA for assebly orders.
    If you need KFMA to be default assign it to Item cat/ MRP type ( PD) combo.
    Regards
    Ritesh

  • Can I stream things directly from the time capsule to my AppleTv without using my computer?

    I have an older MacBook and I'm worried about the storage so I want to get things moved to a Time Capsule.  I was just wondering if I can stream things directly from the Time Capsule to the AppleTV without having to store them in iTunes on my computer and play them off of there.

    You cannot stream from a TC .. it is not a media device.. you can store movie files on the TC but you still need to run the computer to play them.
    Depending on how you connect this can cause dramatic slowdowns.
    A WD Live TV can play raw movie files from a TC.. because it is not a media streamer which is all the ATV is, it is a full media player.

  • Is there a way to create a playlist from the now playing screen on ios7?

    Is there a way to create a playlist from the now playing screen on ios7? I want to be able to hear a song in my collection and immediately add it to an existing playlist or create a new playlist.
    Thank you in advance

    Hi Cornellius,
    From the now playing screen there's a Create button at the bottom that allows you to create a
    Genius Playlist
    New Station form Artist
    New Station from Song
    IPhone Help, Browse and play
    http://help.apple.com/iphone/7/#/iph3cf21a82
    The Now Playing screen provides playback controls and shows you what’s playing.
    For information on Genius Playlists, see
    Archived - Genius for iPod and iPhone
    http://support.apple.com/kb/HT2978
    I don't see an option to add it to an existing playlist.
    Best Regards,
    Nubz

  • I am trying to reinstall CS3 from a download I bought several years ago, and it is saying my serial number is invalid.  I am taking the serial number directly from the list of products on my Adobe account.  Please advise

    I am trying to reinstall CS3 from a download I bought several years ago, and it is saying my serial number is invalid.  I am taking the serial number directly from the list of products on my Adobe account.  Please advise

    Uninstall and try the Adobe Creative Suite Cleaner Tool before reinstalling - it helps resolve installation problems for CS3 thru CS6 and for Creative Cloud
    http://www.adobe.com/support/contact/cscleanertool.html

  • How do I move a file directly from the desktop to a folder in OX 10?

    I am new to Mac and the Mountain Lion software.  Having worked exclusively with PC operating systems, I am familiar with how to work with files in Windows, but am having trouble doing similar actions in OX 10.  How do I move a file directly from the desktop to a folder in OX?  Although this answer is likely in a video tutorioal (somewhere), I do not have the time to sit an arbitrarily watch generic OS videos that give a broad brush overview, without answering specific queries.  Any help out there?

    You might fun http://www.apple.com/support/macbasics/ to be of help to get used to doing things the Mac way.
    Allan

  • Error in creating New Entry from the Client in NW Mobile 7.1

    Hi All,
    I have created a mobile application for Laptops in NW Mobile 7.1.
    I have a requirement to create an entry from the client, i.e., I need to create a PR in the client. The model bindind, the backend adapters, bapi wrappers are in place.
    I have used the standard create BAPI for PR and wrapped it in a BAPI wrapper. I just have to give the PR details and save the entry in the client. The BAPI wrapper has the logic for generating the new PR number.
    My problem here is, when I try to create a new PR, give the details and save, the entry is not getting updated in the backend and the sync state is '201'.
    I checked the "Message Monitoring" in the NW Mobile Administrator for the particular SWCV.
    For this create PR transaction, the particulars are as below
    Message State: Error - Stop Flow
    Message Type: Transaction
    Error: "Error occurred while fetching synckeys from table ZDOE01700000SL"
    "ZDOE01700000SL" is the Sync key look up table for PR(my data object).
    Please let me know where I have gone wrong and guide me in rectifying this problem.
    Thanks and Regards,
    Sunil

    Hi Sunil,
    From my understanding, looks like you are not filling synckey when you are creating a PR in your client. Synckey is a unique key on the DOE using which you can uniquely identify any node.
    There are two scenario's atleast as I know, where this error would have come.
    Case 1. If you are modifying something on client, which has been send by DOE, then you are not supposed to change synckey because it is a primary key. Now if we assume that you are not modifying synckey but when you are sending an update, check if by any chance the synckey is not going to DOE which is one case, and the second one is, after DOE has end that record to client, someone has cleaned up all the tables on DOE for that dataobject or someone has deleted that entry on the backend because of which the entry has been deleted on DOE. In either case, you are modifying something on client which is actually not present on DOE because of which when the DOE tries to look up based on synckey it doesn't find the needed record.
    Case 2. If you are creating something on client, then you are supposed to create a synckey which is a 32 bit character GUID. I think in your case, you are missing the synckey when you are sending it to DOE. Check if there is any API for doing that or you have manually create a GUID and send it.
    Hope it works out.
    Best Regards,
    Siva.
    PS: Reward with points if you find the post useful.

Maybe you are looking for

  • Validation Event Handler Not working with Flat File GTC Trusted Recon

    We are created Event Handler for checking special characters in Telephone field.Its working fine when the user is created through Admin Console.but the event handler is not triggering while doing GTC Flat File Trusted recon. Version: OIM 11.1.1.5.0 C

  • Editing filters - to affect a whole track, not just the clip?

    I'm cutting a four camera shoot and need to match the colours. I have each camera on a separate track, and I got a basic balance before I started lopping. But as usual I want to give it a bit of a tweak now I'm looking at the cuts. I can work down th

  • TEXT DISAPPEARS

    I recently ugraded to appleworks 6 from 5 on a PC with Win XP Pro. I had a database created in 5 which was imported to 6. My problem is that when I create a new record and I type in text, when I move to the next field the text disappears. If I go int

  • Air Drop program let us drop files onto the iPhone or iPad?

    I could really use this feature for my school and work projects. I have school books I need to download onto my iPad, so I can read my chapters at work. It is to much of a hassel to hook the iPad up to my MacBookPro, turn on iTunes, move the books to

  • Regarding status

    Hi all,          Regarding status code .     How to find which user has released status, which user has set the status active and    what are date set & time set in regarding status, & where to find these fields?    Is there any table where I can fin