示例#1
0
文件: WmaWriter.cs 项目: pclancy/yeti
 /// <summary>
 /// Create the writer from information stored in <see cref="WmaWriterConfig"/>
 /// </summary>
 /// <param name="output"><see cref="System.IO.Stream"/> Where resulting WMA string will be written</param>
 /// <param name="config"><see cref="WmaWriterConfig"/> instance from where IWMProfile and WaveFormat will be taken to construct the writer</param>
 public WmaWriter(Stream output, WmaWriterConfig config)
     : this(output, config.Format, config.Profile, null)
 {
 }
示例#2
0
文件: WmaWriter.cs 项目: 4dvn/yeti
 /// <summary>
 /// Create the writer from information stored in <see cref="WmaWriterConfig"/>
 /// </summary>
 /// <param name="output"><see cref="System.IO.Stream"/> Where resulting WMA string will be written</param>
 /// <param name="config"><see cref="WmaWriterConfig"/> instance from where IWMProfile and WaveFormat will be taken to construct the writer</param>
 public WmaWriter(Stream output, WmaWriterConfig config)
     : this(output, config.Format, config.Profile, null)
 {
 }
示例#3
0
 public static void WmaToWma(
     string wmafilePath, Stream outputStream, WmaWriterConfig wmaFormat, int bufferMultiplier)
 {
     using (var wmaStream = new WmaStreamReader(wmafilePath))
     {
         var writer = new WmaWriter(outputStream, wmaFormat);
         var buffer = new byte[writer.OptimalBufferSize*bufferMultiplier];
         WriteToStream(writer, wmaStream, buffer);
     }
 }
示例#4
0
 public static void WmaToWma(string wmafilePath, Stream outputStream, WmaWriterConfig wmaFormat)
 {
     WmaToWma(wmafilePath, outputStream, wmaFormat, 1);
 }
示例#5
0
 public static void WmaToWma(
     string wmafilePath, string outputPath, WmaWriterConfig wmaFormat, int bufferMultiplier)
 {
     WmaToWma(wmafilePath, new FileStream(outputPath, FileMode.Create), wmaFormat, bufferMultiplier);
 }
示例#6
0
 public static void WmaToWma(string wmafilePath, string outputPath, WmaWriterConfig wmaFormat)
 {
     WmaToWma(wmafilePath, new FileStream(outputPath, FileMode.Create), wmaFormat, 1);
 }