Bayt okutma

Delphi'de kod yazma ile ilgili sorularınızı bu foruma yazabilirsiniz.
Cevapla
Mustafa_Ucar
Üye
Mesajlar: 63
Kayıt: 03 Ara 2005 07:31

Bayt okutma

Mesaj gönderen Mustafa_Ucar »

MP3'lerin ID bilgilerini değiştirmek için bir program yazmak istiyorum. Bir programla bunu yaptım fakat Delphi kullanarak görselleştirmek ve daha kolay kullanılabilir hale getirmek istiyorum. ihtiyacım olan 2 komut var. ReadByte ve WriteByte. Nasıl yapabilirim?
Kullanıcı avatarı
rsimsek
Admin
Mesajlar: 4482
Kayıt: 10 Haz 2003 01:48
Konum: İstanbul

Mesaj gönderen rsimsek »

BlockRead(...) ve BlockWrite(...) işini görür, kullanımları için yazıp üzerinde F1 yapman yeterli :wink:
Bilgiyi paylaşarak artıralım! Hayatı kolaylaştıralım!!
Mustafa_Ucar
Üye
Mesajlar: 63
Kayıt: 03 Ara 2005 07:31

Mesaj gönderen Mustafa_Ucar »

Bu iki komutu çözmek benim için zor oldu. Kullanacak diğer arkadaşlar için de zor olmasın.

Kod: Tümünü seç

var
baytlar: Array [1..102400] Of byte;
dosya:File;
max_oku,okunan,i: integer;

begin
AssignFile(dosya,'C:\oku.txt');
Reset(dosya,1);
max_oku:=sizeof(baytlar);//max_oku=okunacak max bayt sayısı
blockread(dosya,baytlar,max_oku,okunan);//okunan=okunan bayt sayısı

For i:=1 to okunan Do
begin
 Memo1.Lines.Add(inttostr(baytlar[i]));
end;
end;
tek tek okutmak isterseniz;

Kod: Tümünü seç

var
bayt: byte;
dosya:File;
okunan,i: integer;

begin
AssignFile(dosya,'C:\oku.txt');
Reset(dosya,1);
repeat
 blockread(dosya,bayt,1,okunan);//Tek bayt okutmak için 3.değişkene 1 yazdık
 showmessage(inttostr(bayt))
until eof(dosya);
end;
Bilgisayarın suyunu çıkartmayı sevmiyorsanız, bu kodlar hiç bir işinize yaramaz. Ama bir bilgisayar manyağıysanız, bu kodlar çok hoşunuza gidecek.
rsimsek'e teşekkürler.
Kullanıcı avatarı
mege
Admin
Mesajlar: 2360
Kayıt: 05 Şub 2004 04:32
Konum: Beşiktaş
İletişim:

Mesaj gönderen mege »

http://www.id3.org/
Digital audio files can contain, in addition to the audio track, related text and/or graphical information. The information you're probably familiar with take the form of Song title, Artist name, Album name, Year and Genre. This is the information displayed when you playback a digital audio file on your computer or portable device.

The process of including information other than sound into these digital audio files is commonly referred to as "tagging" in which you "tag" the audio file with additional information that describes the audio file. The original standard for tagging digital files was developed in 1996 by Eric Kemp and he coined the term ID3. At that time ID3 simply meant "IDentify an MP3".

ID3.org receives one frequent question in various forms:

* What is the tagging format in my Windows Media File?
* What is the tagging format in my iTunes file?
* What is the tagging format in my ogg vorbis file?

Answer? All audio formats can, and most probably do, use the ID3 tag format. They do this because the ID3 tag standard is so wide spread and implementation libraries are readily available.

Those new to digital music may assume that only MP3 files have ID3 tags and that other audio formats (AAC, WMA, Ogg Vorbis, etc..) must therefore have some different tagging methodolgy. This confusion comes from ID3 being so closely associated to the MP3 audio compression format. The ID3 tagging standard gained wide acceptance because of the popularity of the MP3 file format and became the defacto standard way to tag audio files of any format.

ID3 is simply a prescribed method for storing information into a file, any file, but usually an audio file.

Read the Low Tech history for the full story.
http://www.id3.org/implement.html
Borland Delphi library
James Webb has made a Delphi libraray with which you can read and write ID3v2.3.0 and ID2.4.0.
ID3v2 Delphi Library
.-.-.-.-.-.-.-. ^_^
Cevapla