Ver Mensaje Individual
  #2  
Antiguo 08-09-2003
__cadetill __cadetill is offline
Miembro
 
Registrado: may 2003
Posts: 3.387
Reputación: 25
__cadetill Va por buen camino
Esta respuesta la saque del Club hace tiempo. El autor de la misma es Quicky

Cita:
Para leer esto te valdría :

Código:

TID3Tag = packed record // 128 bytes
TAGID: array[0..2] of char; // 3 bytes: TAG
Titulo: array[0..29] of char; // 30 bytes: Titulo de la canción
Artista: array[0..29] of char; // 30 bytes: Artista
Album: array[0..29] of char; // 30 bytes: Album
Anno: array[0..3] of char; // 4 bytes: Año de publicacion
Comentarios: array[0..29] of char; // 30 bytes: Comentarios
Genero: byte; // 1 byte: ID del Genero
end;


procedure TForm1.foButton1Click(Sender: TObject);
const
_mp3file='C:\Songs\Scorpions\Wind of change.mp3'; //this is only an example for filename
var
id3tag : TID3tag;
mp3file : Tfilestream;
begin
mp3file := TFileStream.Create(_mp3file,fmOpenRead);
try
mp3file.position := mp3file.size - 128;
mp3file.Read(id3tag,SizeOf(id3tag));
showmessage('Titulo: ' + id3tag.Titulo + #13 +
' Artista: ' + id3tag.Artista + #13 +
' Album: ' + id3tag.Album + #13 +
' Año: ' + id3tag.Anno + #13 +
' Comentarios: ' + id3tag.Comentarios + #13 +
' Genero: ' + IntToStr(id3tag.Genero)
);
finally
mp3file.Free;
end;
end;



por lo tanto para escribir, con cambiar el Modo de apertura del Archivo de fmOpenRead a fmOpenWrite, te deberia valer.

No tendrias mas que hacer un FillChar de la variable Tipo TID3Tag, y luego mediante unos edits o lo que mejot te vieniera pasrle los valores.

Estos son los generos que el WinAmp entiende (creo que empezarian desde cero...) :



Blues,
Classic Rock,
Country,
Dance,
Disco,
Funk,
Grunge,
Hip-Hop,
Jazz,
Metal,
New Age,
Oldies,
Other,
Pop,
R&B,
Rap,
Reggae,
Rock,
Techno,
Industrial,
Alternative,
Ska,
Death Metal,
Pranks,
Soundtrack,
Euro-Techno,
Ambient,
Trip-Hop,
Vocal,
Jazz+Funk,
Fusion,
Trance,
Classical,
Instrumental,
Acid,
House,
Game,
Sound Clip,
Gospel,
Noise,
AlternRock,
Bass,
Soul,
Punk,
Space,
Meditative,
Instrumental Pop,
Instrumental Rock,
Ethnic,
Gothic,
Darkwave,
Techno-Industrial,
Electronic,
Pop-Folk,
Eurodance,
Dream,
Southern Rock,
Comedy,
Cult,
Gangsta,
Top 40,
Christian Rap,
Pop/Funk,
Jungle,
Native American,
Cabaret,
New Wave,
Psychadelic,
Rave,
Showtunes,
Trailer,
Lo-Fi,
Tribal,
Acid Punk,
Acid Jazz,
Polka,
Retro,
Musical,
Rock & Roll,
Hard Rock,
Folk,
Folk-Rock,
National Folk,
Swing,
Fast Fusion,
Bebob,
Latin,
Revival,
Celtic,
Bluegrass,
Avantgarde,
Gothic Rock,
Progressive Rock,
Psychedelic Rock,
Symphonic Rock,
Slow Rock,
Big Band,
Chorus,
Easy Listening,
Acoustic,
Humour,
Speech,
Chanson,
Opera,
Chamber Music,
Sonata,
Symphony,
Booty Bass,
Primus,
Porn Groove,
Satire,
Slow Jam,
Club,
Tango,
Samba,
Folklore,
Ballad,
Power Ballad,
Rhythmic Soul,
Freestyle,
Duet,
Punk Rock,
Drum Solo,
Acapella,
Euro-House,
Dance Hall.
Para el tema de la lectura de todo el CD de MP3, puedes mirarte un truco que tengo en mi web para recorrerte todos los archivos de un directorio (con FindFirst, FindNext)

Espero te sirva
Responder Con Cita