本文整理汇总了C#中Comment.getComment方法的典型用法代码示例。如果您正苦于以下问题:C# Comment.getComment方法的具体用法?C# Comment.getComment怎么用?C# Comment.getComment使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Comment
的用法示例。
在下文中一共展示了Comment.getComment方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OggToWav
//.........这里部分代码省略.........
// We can't tolerate that in a header. Die.
s_err.WriteLine("Corrupt secondary header. Exiting.");
}
vi.synthesis_headerin(vc, op);
i++;
}
}
}
// no harm in not checking before adding more
index = oy.buffer(4096);
buffer = oy.data;
try
{
bytes = input.Read(buffer, index, 4096);
}
catch (Exception e)
{
s_err.WriteLine(e);
}
if (bytes == 0 && i < 2)
{
s_err.WriteLine("End of file before finding all Vorbis headers!");
}
oy.wrote(bytes);
}
// Throw the comments plus a few lines about the bitstream we're
// decoding
{
byte[][] ptr = vc.user_comments;
for (int j = 0; j < vc.user_comments.Length; j++)
{
if (ptr[j] == null) break;
s_err.WriteLine(vc.getComment(j));
}
s_err.WriteLine("\nBitstream is " + vi.channels + " channel, " + vi.rate + "Hz");
s_err.WriteLine("Encoded by: " + vc.getVendor() + "\n");
sample.Channels = vi.channels;
sample.Rate = vi.rate;
}
convsize = 4096 / vi.channels;
// OK, got and parsed all three headers. Initialize the Vorbis
// packet->PCM decoder.
vd.synthesis_init(vi); // central decode state
vb.init(vd); // local state for most of the decode
// so multiple block decodes can
// proceed in parallel. We could init
// multiple vorbis_block structures
// for vd here
float[][][] _pcm = new float[1][][];
int[] _index = new int[vi.channels];
// The rest is just a straight decode loop until end of stream
while (eos == 0)
{
while (eos == 0)
{
int result = oy.pageout(og);
if (result == 0) break; // need more data
if (result == -1)
{ // missing or corrupt data at this page position
s_err.WriteLine("Corrupt or missing data in bitstream; continuing...");