0
0

Is there an ActiveX component that reads Ogg Tags(Artist, title,etc.)? My friend is working on an Ogg Site project. There will be dozens of Oggs. But we need this component[/b]

  • You must to post comments
0
0

I wrote a native 32 bits dll (not an activex or com object), if you are interessted, contact me ๐Ÿ˜‰

  • You must to post comments
0
0

I need additional info for .wav, wma, ogg, mp3 or so on…
I means not just “Artist, Album, Genre, …etc..”.( it standart info )

I need Add “StartDate, EndDate, Writer by…etc” HOW TO GET ??
the source, components or tricks… Delphi I like…

Thx keepIn:D

  • You must to post comments
0
0

Put that code in a module, that’s what I use in my player and it works great.

[b:2oth68el][u:2oth68el]It’s not my code[/u:2oth68el][/b:2oth68el] and I don’t remember where I took it.

[code:2oth68el]
Option Explicit

Public Type VorbisTag
Title As String
Artist As String
Album As String
Genre As String
Date As String
Comment As String
TrackNumber As Integer
EncodedUsing As String
Error As String
End Type

Public Function GetTag(filename) As VorbisTag
Dim phase As Integer
Dim filelength As Long
Dim fileremaining As Long
Dim fileopened As Long
Dim filehandle As Integer
Dim errmsg As String
Dim tmp As Integer
Dim tmp4 As Integer
Dim tmp2 As Integer
Dim tmp3 As Integer
Dim foundatag As Boolean
Dim s$
GetTag.Album = ""
GetTag.Artist = ""
GetTag.Comment = ""
GetTag.Date = ""
GetTag.EncodedUsing = ""
GetTag.Error = ""
GetTag.Genre = ""
GetTag.TrackNumber = 0
GetTag.Title = ""
foundatag = False
s$ = Space$(2048)
‘Phase is used so the error handler knows
‘what we are up to
On Error GoTo Errhandler
phase = 1
‘Phase 1: We’re trying to open the file.
filelength = FileLen(filename)
fileremaining = filelength
filehandle = FreeFile()
Open filename For Binary Access Read As filehandle

‘Phase 2: File open.. so it exists..
phase = 2
Do
Get filehandle, , s$
fileopened = fileopened + Len(s$)
fileremaining = fileremaining – Len(s$)
If fileremaining < 2048 Then
s$ = Space$(fileremaining)
End If
tmp = InStr(1, s$, "vorbis")
tmp2 = InStr(1, s$, "vorbis ")

If tmp <> 0 Then
If tmp2 < tmp Then
If tmp2 <> 0 Then
tmp = tmp2
End If
End If
Else
If tmp2 <> 0 Then
tmp = tmp2
End If
End If
If tmp <> 0 Then Exit Do
If fileremaining = 0 Then Exit Do
Loop
If tmp = 0 Then phase = 3: GoTo Errhandler
‘Ok, we’ve found the vorbis header.
‘Let’s get a big chunk of data
Get filehandle, tmp, s$
‘Ok, we’ve got 2kb of data after the header
‘lets find the header close
tmp = InStr(7, s$, "vorbis")
If tmp = 0 Then phase = 4: GoTo Errhandler

‘now we can get the required info

tmp = InStr(1, s$, "TITLE=")
If tmp <> 0 Then
foundatag = True
tmp2 = InStr(tmp, s$, Chr$(0) + Chr$(0) + Chr$(0))
tmp3 = InStr(tmp, s$, Chr$(1) + Chr$(5) + "vorbis")
If tmp3 < tmp2 Then tmp2 = tmp3 + 1
tmp2 = tmp2 – 1
GetTag.Title = Mid$(s$, tmp + 6, tmp2 – (tmp + 6))
End If

tmp = InStr(1, s$, "ARTIST=")
If tmp <> 0 Then
foundatag = True
tmp2 = InStr(tmp, s$, Chr$(0) + Chr$(0) + Chr$(0))
tmp3 = InStr(tmp, s$, Chr$(1) + Chr$(5) + "vorbis")
If tmp3 < tmp2 Then tmp2 = tmp3 + 1
tmp2 = tmp2 – 1
GetTag.Artist = Mid$(s$, tmp + 7, tmp2 – (tmp + 7))
End If

tmp = InStr(1, s$, "COMMENT=")
If tmp <> 0 Then
foundatag = True
tmp2 = InStr(tmp, s$, Chr$(0) + Chr$(0) + Chr$(0))
tmp3 = InStr(tmp, s$, Chr$(1) + Chr$(5) + "vorbis")
If tmp3 < tmp2 Then tmp2 = tmp3 + 1
tmp2 = tmp2 – 1
GetTag.Comment = Mid$(s$, tmp + 8, tmp2 – (tmp + 8))
End If

tmp = InStr(1, s$, "ALBUM=")
If tmp <> 0 Then
foundatag = True
tmp2 = InStr(tmp, s$, Chr$(0) + Chr$(0) + Chr$(0))
tmp3 = InStr(tmp, s$, Chr$(1) + Chr$(5) + "vorbis")
If tmp3 < tmp2 Then tmp2 = tmp3 + 1
tmp2 = tmp2 – 1
GetTag.Album = Mid$(s$, tmp + 6, tmp2 – (tmp + 6))
End If

tmp = InStr(1, s$, "DATE=")
If tmp <> 0 Then
foundatag = True
tmp2 = InStr(tmp, s$, Chr$(0) + Chr$(0) + Chr$(0))
tmp3 = InStr(tmp, s$, Chr$(1) + Chr$(5) + "vorbis")
If tmp3 < tmp2 Then tmp2 = tmp3 + 1
tmp2 = tmp2 – 1
GetTag.Date = Mid$(s$, tmp + 5, tmp2 – (tmp + 5))
End If

tmp = InStr(1, s$, "TRACKNUMBER=")
If tmp <> 0 Then
foundatag = True
tmp2 = InStr(tmp, s$, Chr$(0) + Chr$(0) + Chr$(0))
tmp3 = InStr(tmp, s$, Chr$(1) + Chr$(5) + "vorbis")
If tmp3 < tmp2 Then tmp2 = tmp3 + 1
tmp2 = tmp2 – 1
GetTag.TrackNumber = Val(Mid$(s$, tmp + 12, tmp2 – (tmp + 12)))
End If

tmp = InStr(1, s$, "GENRE=")
If tmp <> 0 Then
foundatag = True
tmp2 = InStr(tmp, s$, Chr$(0) + Chr$(0) + Chr$(0))
tmp3 = InStr(tmp, s$, Chr$(1) + Chr$(5) + "vorbis")
If tmp3 < tmp2 Then tmp2 = tmp3 + 1
tmp2 = tmp2 – 1
GetTag.Genre = Mid$(s$, tmp + 6, tmp2 – (tmp + 6))
End If

tmp = InStr(1, s$, "ENCODED_USING=")
If tmp <> 0 Then
foundatag = True
tmp2 = InStr(tmp, s$, Chr$(0) + Chr$(0) + Chr$(0))
tmp3 = InStr(tmp, s$, Chr$(1) + Chr$(5) + "vorbis")
If tmp3 < tmp2 Then tmp2 = tmp3 + 1
tmp2 = tmp2 – 1
GetTag.EncodedUsing = Mid$(s$, tmp + 14, tmp2 – (tmp + 14))
End If
If foundatag = False Then phase = 5: GoTo Errhandler
Exit Function
Errhandler:
Close filehandle
If phase = 1 Then errmsg = "Error opening file! Not found? Already in use, perhaps?"
If phase = 2 Then errmsg = "Error processing file. Ouchage."
If phase = 3 Then errmsg = "Vorbis header not found?!"
If phase = 4 Then errmsg = "Vorbis header not closed!"
If phase = 5 Then errmsg = "I found a vorbis header, but no tag information seems to exist.."

GetTag.Error = "ERR:" + errmsg
Exit Function
End Function
[/code:2oth68el]

  • You must to post comments
0
0

Sorry Guys,

I means it can write and read the Audiofile

Thx keepIn:D

  • You must to post comments
0
0

Thank you a lot

  • You must to post comments
0
0

I took the code above for the Ogg Tags and I made you a DLL. But this is an ActiveX DLL, so Im not sure if that is what you were looking for.

Download here:
[url:10g6d4l6]http://members.aol.com/libertyed1986/vorbistag.dll[/url:10g6d4l6]

All you have to do is reference it in Vb under the project menu and then put this code at the top of your form:

[code:10g6d4l6]
Private Withevents VorbisTag as clsVorbis
[/code:10g6d4l6]

Then use VorbisTag to get the info from the DLL.

Hope it helps!

  • You must to post comments
0
0

Hi again.. I have some problems: I put the codes into a module but I couldn’t make it dll. So I put the codes into Class Module. I made dll but i couldn’t run it on PWS(or IIS)

Do these codes need any other component?

  • You must to post comments
0
0

In VB may use code like

” Private Withevents VorbisTag as clsVorbis “

If in Delphi , How I call a ‘vorbistag.dll’… and Little sample..?

Tell me How…???

StayOn Ur;-)

  • You must to post comments
0
0

Why making a dll?

  • You must to post comments
0
0

I dont know if you could, it is a vb active-x dll, so Im not sure about Delphi since I dont know anything about it.

  • You must to post comments
0
0

Because We must run it on ISS(asp) so it must be a dll

Thanks for paying attention

  • You must to post comments
0
0

I think converting the DLL ActiveX to an OCX will help ๐Ÿ˜†

  • You must to post comments
0
0

I never compiled a dll so I can’t help you on that, sorry.

Hope an other will help you.

  • You must to post comments
0
0

You go to the menu -Project -> import type library, button “add”, select the dll, and button “create unit” then you get the activeX wrapped to a normal Delphi class.

probably the class will be named TclsVorbis but you can see the exact name in the unit that was created..

else you can use it directly as a COM object but that involves CreateComObj() and CoInitialize; and some more knowledge about COM, so the first way is simple enough to use.

  • You must to post comments
0
0

I never compiled a dll so I can’t help you on that, sorry.

Hope an other will help you.

  • You must to post comments
0
0

I use these components: Audio Tools Library

ATL 1.9 – programming tools for Borland Delphi 3,4,5,6
The pack includes several components described below:

MPEGaudio 1.7 – for manipulating with MPEG audio file information
ID3v1 1.0 – for manipulating with ID3v1 tags
ID3v2 1.7 – for manipulating with ID3v2 tags
WAVFile 1.2 – for extracting information from WAV file header
OggVorbis 1.6 – for manipulating with Ogg Vorbis file information
MPEGplus 1.6 – for manipulating with MPEGplus file information
TwinVQ 1.1 – for extracting information from TwinVQ file header
Monkey 1.4 – for manipulating with Monkey’s Audio file information
APEtag 1.0 – for manipulating with APE tags
WMAfile 1.0 – for extracting information from WMA file header
FLACfile 1.0 – for manipulating with FLAC file information
AACfile 1.0 – for manipulating with AAC file information
CDAtrack 1.0 – for getting information for CDA track

You can:
Download source…
Download compiled examples…

here: [url:2fkwxop0]http://j-faul.virtualave.net/atl/index.html[/url:2fkwxop0]

Good Luck

cmstein

  • You must to post comments
0
0

Thank you all… I’ll try

  • You must to post comments
Showing 17 results
Your Answer

Please first to submit.