Here is what i have done:
Private Sub writeMetaData(ByVal filePath As String, ByVal ObjectToSave As
clsSongInfo)
Try
Dim fsNewFile As New IO.FileStream(filePath, FileMode.Open,
IO.FileAccess.ReadWrite)
Dim binWriter As New BinaryWriter(fsNewFile)
binWriter.BaseStream.Seek(-129, SeekOrigin.End)
With ObjectToSave
Dim sTitle As String = pad(.Title, 30)
Dim sArtist As String = pad(.Artist, 30)
Dim sAlbum As String = pad(.Album, 30)
Dim sYear As String = pad(.Year, 4)
Dim sComments As String = pad(.Comments, 30)
binWriter.Write("TAG" & sTitle & sArtist & sAlbum & sYear &
sComments)
End With
binWriter.Flush()
binWriter.Close()
fsNewFile.Close()
Catch ex As Exception
handleErr(ex)
End Try
End Sub
clsSongInfo is a class designed to hold the attributes of the meta data file.
Hope this helps.
KiteOregon
"Xavier Valdés" wrote:
Hi all,
I wanted to add metadata in my wave file. I've read something about streams
but I don't know which is the common usage of them for my purpose. I wanted,
for example, to add the
lyric of a song in my wave file but I want to remain its compatibility with
wmplayer and other
players...
So, what about using streams?
Any good article about that (for my special purpose!)????
Thanks a lot,
Xavi