🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.multimedia
Article #186

Re: MP3 tag code ?

#186
From: Brett
Date: Wed, 14 Nov 2007 13:28
65 lines
3145 bytes
Hi,
 
Please email me for source of Id3v2.3 tag reading
My code is in BCB6 and also extracts embedded JPG album art out of the file
in my Mp3 ID3 files the tags are at the start of the file and each Tag has its own unique identifer,
I found that in my ID3v2.3 files the TAgs at the end are blank
So the below code would no work

Also Maybe you can help me.
 I have embedded WMP win media player on my form.
I cam play files fine. But I want to add media items to the media collection library

int sze;
sze =  FileListBox1->Items->Strings[cnt].WideCharBufSize();
tmp = WideChar(FileListBox1->Items->Strings[cnt],sze);
MusicForm->WMP1->mediaCollection->add(tmp) ;


But the complier just complains that
[C++ Error] MusicPL.cpp(375): E2285 Could not find a match for 'IWMPMediaCollection::add(wchar_t)'

Do i have to create a new collection?  All the examples Ive seen are in VB and look really simple I even just tried 

MusicForm->WMP1->mediaCollection->add("c:\filex.mp3);  // just like vb example
and it didnt work either?
Can anyone help?

Cheers
Brett


"Mark Jacobs" <www.jacobsm.com/mjmsg.htm?Borland Newsgroup> wrote:
>"Jim Davis" <jim46dd@hotmail.com> wrote in message 
>news:Xns99A1DC0C76EA7jim46ddhotmailcom@207.105.83.66...
>> Seeking C or C++ source
>> to read *.MP3 ID3v2 tags
>
>OK. This is C-style code. It gets the info at the end of the mp3 file marked 
>with the letters 'TAG'. Some of this may be truncated. I assume mfnm is an 
>AnsiString holding the name of the MP3 file.
>
>    FILE *fpj=fopen(mfnm.c_str(),"rb"); int nbry=0;
>    char btgf[130],sngnm[35],artst[35],albm[35],yur[5],cmmnt[35];
>    if (fpj)
>    {
>      if (fseek(fpj,-128,SEEK_END)==0) 
>nbry=fread(btgf,sizeof(char),128,fpj);
>      fclose(fpj);
>    }
>    if (nbry>0 && btgf[0]=='T' && btgf[1]=='A' && btgf[2]=='G')
>    {
>      strncpy(sngnm,&btgf[3],30*sizeof(char)); sngnm[30]='\0';
>      strncpy(artst,&btgf[33],30*sizeof(char)); artst[30]='\0';
>      strncpy(albm,&btgf[63],30*sizeof(char)); albm[30]='\0';
>      strncpy(yur,&btgf[93],4*sizeof(char)); yur[4]='\0';
>      strncpy(cmmnt,&btgf[97],30*sizeof(char)); cmmnt[30]='\0';
>    }
>
>HTH
>-- 
>Mark Jacobs
>http://jacobsm.com
>
>
Technical Details
Message-ID: <473b061f$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <Xns99A1DC0C76EA7jim46ddhotmailcom@207.105.83.66> <46f4f84f$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10d0fc,ae53320f888388d4
X-Google-Attributes: gid10d0fc,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Brett" <brett.kelly@austereo.com.au>
Sender: "Brett" <brett.kelly@austereo.com.au>
Reply-To: "Brett" <brett.kelly@austereo.com.au>
Subject: Re: MP3 tag code ?
Newsgroups: borland.public.cppbuilder.multimedia
X-User-Info: 124.169.137.68     
References: <Xns99A1DC0C76EA7jim46ddhotmailcom@207.105.83.66> <46f4f84f$1@newsgroups.borland.com>
NNTP-Posting-Host: 207.105.83.66
Message-ID: <473b061f$1@newsgroups.borland.com>
Date: 14 Nov 2007 06:28:47 -0700
X-Trace: newsgroups.borland.com 1195050527 207.105.83.66 (14 Nov 2007 06:28:47 -0700)
Lines: 66
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail