int pack(csBuffer opb)
{
String temp="Xiphophorus libVorbis I 20000508";
Encoding AE = Encoding.UTF8;
byte[] temp_byt = AE.GetBytes(temp);
byte[] _vorbis_byt = AE.GetBytes(_vorbis);
// preamble
opb.write(0x03,8);
opb.write(_vorbis_byt);
// vendor
opb.write(temp.Length,32);
opb.write(temp_byt);
// comments
opb.write(comments,32);
if(comments!=0)
{
for(int i=0;i<comments;i++)
{
if(user_comments[i]!=null)
{
opb.write(comment_lengths[i],32);
opb.write(user_comments[i]);
}
else
{
opb.write(0,32);
}
}
}
opb.write(1,1);
return(0);
}