Playback of mp3 tags

Hello

is there an easy way to read the mp3 tags since Phonon is not supported right now? I found Taglib, but have no idea how compile for stunts and use it.

any help will be appreciated!

Here is a simple code. You can modify it as you wish

#include 
#include 
#include 
#include "TagReader.hpp"

#define MP3_FILENAME "/accounts/1000/shared/music/Dub_Fx.mp3"

typedef struct{
   char tag[3];
   char title[30];
   char artist[30];
   char album[30];
   char year[4];
   char comment[30];
   unsigned char genre;
} mp3Tag;

QString TagReader()
{

    FILE *fp = fopen(MP3_FILENAME, "rb");
    if (!fp)
    {
        perror("File open failed");
        return "1";
    }

    mp3Tag tag;
    // Seek to 128 bytes before the end of the file
    if (fseek(fp, -1 * sizeof(mp3Tag), SEEK_END) == -1)
    {
        perror("fseek failed");
        return "2";
    }

    // Read the tag
    if (fread(&tag, sizeof(mp3Tag), 1, fp) != 1)
    {
        fprintf(stderr, "Failed reading tag\n");
        return "3";
    }

    // Make sure we've got what we expect.
    if (memcmp(tag.tag, "TAG", 3) == 0)
    {
        // Found the tag where we expected
        printf("Title: %.30s\n", tag.title);
        printf("Artist: %.30s\n", tag.artist);
        printf("Album: %.30s\n", tag.album);
        printf("Year: %.4s\n", tag.year);

        if (tag.comment[28] == '\0')
        {
            printf("Comment: %.28s\n", tag.comment);
            printf("Track: %d\n", tag.comment[29]);
        }
        else
        {
            printf("Comment: %.30s\n", tag.comment);
        }
        printf("Genre: %d\n", tag.genre);
    }
    else
    {
        fprintf(stderr, "Failed to find TAG\n");
        return "4";
    }
    return tag.title;
}

Tags: BlackBerry Developers

Similar Questions

  • Error when you try to edit MP3 tags: 0x8007000D

    Error 0x8007000D MP3 tag

    I'm unable to change some, but not all my mp3 tags it gives me invalid cod error 0x8007000D data.  I am running windows 7 home premium 64-bit edition I installed every possible update for my system and have used several different tags publishers to convert the tag ID3 version 2.3 instead of 2.4. Tag Editor recognizes the info, but mediaplayer and windows Explorer still haven't.  No one knows what else I could try to solve the problem.

    Remember - this is a public forum so never post private information such as numbers of mail or telephone!

    Ideas:

    • You have problems with programs
    • Error messages
    • Recent changes to your computer
    • What you have already tried to solve the problem

    Peter, what type of file music that you want to change the details of (MP3, WMA, WAV...)?

    Usually, this means that the file is marked as read-only or in use by another application. Make sure that the file is not read-only and try again after the reboot.

    Tim Baets
    http://www.BM-productions.TK

  • Noise during playback of MP3 EM326g

    I have an EM326g phone with a built-in mp3 player and I like the feature. I use it every day at work. I have a SanDisk 2 GB card installed in the phone memory. The problem is that, during playback, I get a "squeaking" intermittent noise that might happen three or four times in rapid succession at the stop. This happens randomly, maybe every 20-30 minutes or more. It never happens on a particular song, so I ruled out a problem with the MP3 itself. I tried two different SanDisk 2 GB cards and both have the same problem. It's pretty boring and the only downside to another great phone! Any suggestions to fix this? Thank you!

    Problem solved!

    The noise was caused by the comments of my desktop, so I put the phone on airplane Mode when you use the mp3 playback capability and did not have a problem, because I discovered!

  • Error when you try to change the MP3 tags: 0x8007000D

    MP3 change tags error: 0x8007000D

    When I try to change the brand of some MP3s like "Album Artist" in windows 7 (Ultimate 6.1.7600 build 7600 and updated updated to 2010-01-04)
    It shows me this error:

    Apply the properties file
    An unexpected error you cannot apply the properties of the file.if that you continue to receive this error, you can use the error code to search for
    help with this problem.
    Error 0x8007000D: the data are incorrect.

    But I can change the label of these files without problem on windows XP. (This problem takes place only in files MP3, not all the MP3 files.)

    Hi Farhad2161,

    Welcome to the Microsoft answers site.

    I see one of your son was answered by the user of the community on the TechNet forums. Please take a look at the following link:
    http://social.technet.Microsoft.com/forums/en-us/w7itpromedia/thread/7b612d36-4f25-4265-981C-bad12e923e6b

    Do you have, do as suggested by Vivian Xing, please follow the steps and see if the problem is resolved.
    Get back to us if you have any additional questions.

    Swathi B - Microsoft technical support.
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Imbedding .jpg or video for playback of MP3 file

    I have DW CS 5.5. I am attaching a link to an MP3 file. When you click on it, it plays the music very well. However, the windows of Firefox shows only an MP player against a window empty. How can I integrate a .jpg or a video to watch during MP3 playback?

    You're still using a HTML4 document type that does not support HTML5 audio.

    It is HTML5

    Nancy O.

  • Stop playback of mp3 files in a new tab

    I want to open mp3 files in my player of choice. Firefox opens a new tab and play instead.
    Made things "always ask" and it does not work as explained in other threads.
    Tried to change the 'media.windows' etc. in the subject: config to false.
    Did not help at all!
    I know I can "Save as".
    I prefer to use firefox the way I have for the past years.
    A button on a Web site that is labeled 'Download' should allow me to open the file in my player of choice.
    On the contrary, it opens in a new tab and begins to play (if I wanted that I would have clicked on the 'play' button).
    A given up hope and installed Chrome - and I have the same problem!
    Stick with firefox if I can solve this minor problem (it IS a PITA!)
    Please help me!

    )

    Imustbestupid wrote:

    I did set 'media.windows-media-foundation.play-stand-alone' to false.
    

    Yes, this preference doesn't work anymore.

    Media.DirectShow.enabled set to false to disable the built in support for MP3 files. It could be other things, but I don't know what. MP4 (H.264) files always works with this preference set to false.

    Imustbestupid wrote:

    Thanks for the response.
    

    Thanks for the links. This issue up before, but I could never find MP3 links without Content-Disposition: attachment, so I won't be able to reproduce the problem.

  • After playback of MP3 files, random symbols will then show the name of file in XP

    Basically I'm on Xp, service pack 3 and for a while now, from time to time when I played usually a mp3 or other similar in windows media player, 10 minutes later it will pick a random file from my music folder and add a Japanese symbol at random at the end of the file name.

    Like "be the one" is played, 10 minutes later "be [a]" will now be the file name, only it never appears as the actual symbol, just a square, until you see the name on the windows media playlist where she will be written correctly
    So random, files are defined in the standard. Any help

    Hello again once, yes I ran the scanner.

    My avg updates automatically and I manually ran the update function, and it IS up to date
    I also managed to clear Media Player cache by entering the file manually.
    And as for now the problem disappeared, but as I said earlier, he arrived at random intervals and sometimes takes minutes so he could arrive and sometimes takes weeks. So I'll come back if it comes back. But so far no there no return
    Thank you for your hard work and dedication
  • Sansa fuze + ignores mp3 tags

    Hi guys I just got my sansa fuze + (8 GB) and apply the 01.27.02 firmware update. Later, I download a file from my collection, but the sansa doesn't recognize all the tags of tracks. I don't know if it's a name of file or any other problem. For example, I have in my coldplay album

    drwxrwxrwx 2 tuxtor 4096 tuxtor 2010-09-27 00:41 (2002) A Rush of Blood To The Head
    drwxrwxrwx 2 tuxtor 4096 tuxtor 2010-09-27 00:49 castles
    drwxrwxrwx 2 tuxtor 4096 tuxtor 2010-01-06 01:30 Parachutes [2000]
    drwxrwxrwx 2 tuxtor 4096 tuxtor 2010-09-27 00:41 Viva La Vida or death and all his friends

    I'm sure that all the files have the good tags (I can see it in amarok, banshee, etc.), but in the sansa I can watch Parachutes and Viva vida La or dead... the other albums appear with the album unknown and artist unknown.

    tuxtor wrote:

    I'm sure that all the files have the good tags (I can see it in amarok, banshee, etc.), but in the sansa I can watch Parachutes and Viva vida La or dead... the other albums appear with the album unknown and artist unknown.

    I'd be willing to bet that they don't.

    ID3v2.3 ISO-8859-1 is the format of the desired ID3 tags. If you use Linux, I suppose that whatever program you are using is not written this tag format. There was more here before with the same scenario.

  • 'Jump' during playback of MP3 files

    I have W7 64 bit (home edition) and for two months have been a bit of slowing overall system (ok, the laptop is older than 2 years), but most strangely, now am having difficulties playing MP3 files that are saved locally. This problem is him even as you use Windows Media Player or VLC Media Player, not specific to a single program. These are all the MP3s I pulled my own CDs, and I don't think that them have all been corrupted. The files will begin to play normally, but then after a track or two they begin to 'jump' intermittently, as if it were an old broken record playing.

    I have uninstalled several audio and video programs, which I wasn't really using it where they have can cause conflicts and also performed all the relevant convenience stores on the W7 system. No problem appear.

    I find it very strange. I have no trouble playing music in continuous or video stream on the internet.

    I don't know what else to try or how to go about investigating what is the question. I don't want to have to perform a reset of the major system (e.g. to reinstall W7) I have not really. I found no similar problems mentioned in the forum posts.

    Thank you

    David

    "I uninstalled several audio and video programs, which I wasn't really using it where they have can cause conflicts and also performed all relevant convenience stores on the W7 system." No problem does. »

    This tool to include 'Fix It' and the sfc analysis? If this is not the case run these and see if something is set right... This first-

    http://support.Microsoft.com/mats/windows_media_player_diagnostic/

    and then following the directions...

    http://support.Microsoft.com/kb/929833/en-GB

    If you have already run these we will see another thing. r

  • Playback of MP3s from shared folder

    Hello

    I have a question relating to the content of the shared folder. I use the following code for the reading of its context:

    var audio = new Audio(filepath)
    audio.play()
    

    This command works for: filepath value ' audio / monkey.mp3 ", but does not work for 'file:///accounts/1000/shared/music/monkey.mp3' (or ' / accounts/1000/shared/music/monkey.mp3'). I copied this file in this folder on my Dev Alpha (and in addition it bundled with my app). The directory was returned by "invokeFilePicker".

    I need this feature to let the user choose custom from the device library music.

    Using the debugger remote (aka web Inspector) was not particularly helpful that both motions are displayed as status 'Success' in the tab 'network '.

    Here are the lines maybe interesting my config.xml file, in case something is wrong with my permissions:

    [...]
    access_shared
    [...]
    
    [...]
    
    
    [...]
    

    You have any ideas?

    Note for later: don't post questions in the middle of the night after long hours of work...

    It was really a permissions problem, but I forgot encapsulate my permissions like this:

    
        access_shared
    
    

    It works fine now.

  • Problem during loop playback of MP3

    Hello

    I'm trying to play an mp3 file in a loop on Blackberry pearl 8100, here's the code:

    Try
    {
               
    Player=javax.microedition.media.Manager.createPlayer(getClass().getResourceAsStream("/sound.MP3"),"audio/MPEG");
               
    Player.Realize ();
    Player.prefetch ();
    player.setLoopCount(-1);
    Player.Start ();
    }
    catch (System.Exception e)
    {
    System.out.println ("error in the establishment of the media:" + e);
               
    }

    The problem is the sound simple and after that I get under the exception:

    MEDIA_NATIVES: unload0() mediaHandle = 0
    MN: unload 1
    MEDIA_NATIVES: init0() mediaHandle = 0 State = 0
    MN: charge 0
    MEDIA_NATIVES: seekComplete0() mediaHandle = 0
    MEDIA_NATIVES: unload0() mediaHandle = 0
    MN: unload 1
    Streaming is reason = 1 prev - state = 300
    AUDIOMANAGER: IOException
    Streaming is reason = 1000 prev - state = 300

    This exception is automatically without coming and println statement...

    Is there anything that I'm missing, please give me the solution...

    Kind regards

    LOULOU

    If you have everything installed recent versions, give a try.

  • error during playback of mp3 files

    Some of my MP3 files won't play on WMP 12. I am running Windows 7 64 bit.  I can play music on many other players, so I know that the files are OK.

    I get a little red X next to the song, it is ignored and the error details read like this:

    Windows Media Player encountered a problem while playing the file.

    And that's all. It always happens to the same files and about forty years that give this error among thousands who give me this error.

    I have run the troubleshooter WMP and rebuilt the files and the library. Any ideas of the Wizards here?

    Good, glad to hear it.

    Start > default of programs

    Select set your default programs

    Scroll down to Windows Media Player

    Select set this program as default

    Click Save

  • Can't hear playback of mp3 on the storm

    I use the following similar code in my application by one of the poster

    play a sound mp3 on the storm.  The app works very well in the Simulator.

    public void playClick( ) {
    
                try {
                    Class cl = Class.forName("net.berrysoft.dib.Dib");
                    InputStream is = cl.getResourceAsStream("/sounds/switch.mp3");
    
                    // Create an instance of the player from the InputStream
                    player = Manager.createPlayer( is, "audio/mpeg" );
                    player.realize();
    
                    volumeControl = getVolumeControl(player);
    
                    if (volumeControl != null)
                        volumeControl.setLevel(volume);
                    player.prefetch();
                    player.start();
                } catch (Exception e) {
                    System.out.println("ERR: " + e.toString());
                }
        }
    
        private VolumeControl getVolumeControl( Player p ) {
            return (VolumeControl)p.getControl( "VolumeControl" );
        }
    

    the problem is that I can't hear the sound when I plugin the atrium.

    Once I unplug I can't hear anything.

    The sound works on my Storm. I can listen to music with the media app.

    someone knows why?

    THX. I read your responses on the other thread.

    No wonder he has many updates. hehe

    I hope a release very soon because it's very annoying.

  • Playback of MP3 of clips and jumps blackBerry Smartphones

    Hi, using the media player that comes with the curve to play the MP3 of the micro SD card reading clips once every 3 seconds approximately and often jumps to the next song, everyone here a fix for this?

    Z

    First of all, try doing a battery pull while the device is running, leave aside for 30 sec.  Re-insert and wait for the priming time 1-3 min.  Go right to media player and try to play somethig.  Maybe it's the lack of memory.

  • BlackBerry Smartphones very strong white noice during playback of mp3s

    then, when I play mp3s with Media Player, there is very loud noice. is that normal, software od hardware problem? My wavs are played very clean, without the white noise.

    Thanks in advance

    Ljupcho

    Thanks tanzim.

    Yes, it's a great speaker where you can really notice stereo, one of the questions why I kept the "BOLD", while testing a storm. I did not notice when they are bad, I thought this is one of these updates to the beta OS, but I guess it's a hardware problem. It will send, my Pearl meanwhile will have the chip.

    So, solved

Maybe you are looking for