I'm trying to read ID3v1 tags from mp3 files using "BASS.dll"(via bass.lib and bass.h).
It works fine until .mp3 file has title (or artist) has 30 characters.
Instead
Happy Times (Feat. Margaux Bos
I get Happy Times (Feat. Margaux BosEmigrate
with Emigrate
added (that's artist tag).
How to make it work properly, without adding artist tag?
Here is my source code:
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Unit2.h"
#include "bass.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm2 *Form2;
//---------------------------------------------------------------------------
__fastcall TForm2::TForm2(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button1Click(TObject *Sender)
{
BASS_Init(-1, 44000, 0, 0, 0);
if(OpenDialog1->Execute())
{
HSTREAM stream = BASS_StreamCreateFile(false, OpenDialog1->FileName.c_str(), 0, 0, 0);
TAG_ID3 *tags = (TAG_ID3*)BASS_ChannelGetTags(stream, BASS_TAG_ID3);
Edit1->Text = tags->title;
}
}