473,412 Members | 2,293 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 software developers and data experts.

appending information to wave files

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
Jul 21 '05 #1
2 1074
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

Jul 21 '05 #2
Oks, Kire. Thank you very much but...
What about if I want it to be a hidden information???
I mean... I do not want information to be saved on to the base stream but on
another stream!

I don't want to modify original file cause I just want to see my metadata
when I type that command :
"more<testfile:MyStreamName"

Any idea???
Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: webstar | last post by:
hi, could you please tell me how to play a small wave file if a button is pressed. or if there is another format that is easer then use that instead of wave. thanks matt
1
by: dmiller23462 | last post by:
Hey guys.... I put an error-handling in my page and have it posted at the complete end of the code, see below(when people were putting in 's I was getting the delimiter errors). Great, I...
4
by: vikram | last post by:
in a stereo type of wave file i want to know what is this left & right info in a wave file??? how do i read the left & right info from a .wav file to a buffer..
16
by: Michael | last post by:
I have a data application in a2k that I need to create two fixed width text files and then combine them to a single file The first file is header information and the second is transaction data. ...
2
by: Xavier Valdés | last post by:
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...
5
by: m.topczewski | last post by:
Hello, I'm a beginner in c++, i have to write a program that will take couple of segments from one wave file, and store them in another wave file to be played back later. Here's the code i have...
1
by: blitzme | last post by:
I created a PERL script to play a wave file using Win32::Sound All went well. So then I was trying to create an executable file with the wav files bound inside it using Activestate Dev kit...
3
by: rajasekar.karthik | last post by:
Hi Guys I need a php script which will merge two wave files as i have already done a script which will will join the two wave files and play one after the other, can anyone advice me...
1
by: homevista | last post by:
Part II: Wave file - How to read to a buffer Wave (or Wav) is the standard format for storing audio data on the PC. As software developers, we are interested in the internal structure of the file...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.