Autor Beitrag
gnomecoder
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 51
Erhaltene Danke: 5



BeitragVerfasst: Do 09.12.10 00:11 
Hi,
ich lese nach diesem Tutorial www.delphi-treff.de/...s-aus-mp3-ermitteln/ die ID3-Tags von Mp3 dateien aus, unter Delphi 7 funktionierts super, aber wenn ich das Projekt unter Delphi XE kompilieren möchte bekomme ich
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
reset(f,1);
  Seek(F,FileSize(F)-128);
  BlockRead(F, Buffer, SizeOf(Buffer));   // in dieser Zeile
  CloseFile(F);
  bitrateindex:=((mp3hdr shr 12) and $F);
  versionindex:=((mp3hdr shr 19) and $3);
den Fehler 'Versuch hinter dem Dateiende zu lesen.
Also das kompilieren klappt zwar, doch beim ausführen kommt der Fehler.
Hat jemand ne idee?
bummi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 1248
Erhaltene Danke: 187

XP - Server 2008R2
D2 - Delphi XE
BeitragVerfasst: Do 09.12.10 00:31 
Als was ist denn Buffer deklariert, wenn das Problem erst unter einer Unicodefähigen Version Auftritt vermute ich String, wenn dem so ist versuch es mal mit AnsiString.

_________________
Das Problem liegt üblicherweise zwischen den Ohren H₂♂
DRY DRY KISS
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10183
Erhaltene Danke: 1256

W10ent
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Do 09.12.10 00:31 
Moin!

Ich rate mal, dass das ein Unicode-Problem ist: deklarier mal den Buffer als array of AnsiChar, vielleicht reicht´s ja schon. Ansonsten ist das Tut einfach nicht Unicode-fähig. :nixweiss:

Sind user profile iconGausi´s MP3-Utils (hier im Forum zu haben) nicht unicode-fähig? Warum nimmst du nicht gleich die? ;)

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
gnomecoder Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 51
Erhaltene Danke: 5



BeitragVerfasst: Do 09.12.10 00:40 
DANKE!!!
Muss morgen schon fertig sein das Projekt, hätte nicht gedacht so schnell noch Hilfe zu bekommen.
funktioniert super!
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8548
Erhaltene Danke: 477

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Do 09.12.10 08:48 
Das mit dem Array of AnsiChar sollte reichen. Allerdings dürfte der Code aus dem Delphi-Treff bei sehr vielen mp3-Dateien eine falsche Dauer, Bitrate und Samplerate ermitteln, egal ob bei D7 oder XE. Der mp3hdr, aus dem diese Daten gewonnen werden, muss nämlich nicht am Anfang der Datei stehen - da steht bei den meisten mp3-Dateien erstmal der ID3v2-Tag. ;-)

_________________
We are, we were and will not be.
gnomecoder Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 51
Erhaltene Danke: 5



BeitragVerfasst: Do 09.12.10 14:44 
jap.. habe ich jetzt auch gemerkt. So ists leider nicht mehr zu gebrauchen. Ich werde mir wohl doch deine Mp3-utils anschauen. Damit sollte es funktnionieren?
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8548
Erhaltene Danke: 477

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Do 09.12.10 15:00 
Ja, damit sollte das klappen, und die Unit ist auch XE-kompatibel. Zumindest unter D2009 habe ich die auch in Benutzung, und zu XE hat sich bzgl. Unicode da afaik nichts mehr getan.

_________________
We are, we were and will not be.