当前位置: 首页>>代码示例>>C#>>正文


C# Comment.getComment方法代码示例

本文整理汇总了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...");
开发者ID:MagistrAVSH,项目名称:manicdigger,代码行数:67,代码来源:OggDecoder.cs


注:本文中的Comment.getComment方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。