mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-30 17:05:37 +08:00
added audio playback support.
This commit is contained in:
parent
07ea1b9af7
commit
bcce7da22b
@ -83,6 +83,9 @@
|
|||||||
<Reference Include="Microsoft.WindowsAPICodePack.Shell">
|
<Reference Include="Microsoft.WindowsAPICodePack.Shell">
|
||||||
<HintPath>packages\WindowsAPICodePack-Shell.1.1\lib\Microsoft.WindowsAPICodePack.Shell.dll</HintPath>
|
<HintPath>packages\WindowsAPICodePack-Shell.1.1\lib\Microsoft.WindowsAPICodePack.Shell.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="NAudio">
|
||||||
|
<HintPath>packages\NAudio.1.7.1\lib\net35\NAudio.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="Ookii.Dialogs.Wpf, Version=1.0.0.0, Culture=neutral, PublicKeyToken=0c15020868fd6249, processorArchitecture=MSIL">
|
<Reference Include="Ookii.Dialogs.Wpf, Version=1.0.0.0, Culture=neutral, PublicKeyToken=0c15020868fd6249, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>packages\Ookii.Dialogs.1.0\lib\net35\Ookii.Dialogs.Wpf.dll</HintPath>
|
<HintPath>packages\Ookii.Dialogs.1.0\lib\net35\Ookii.Dialogs.Wpf.dll</HintPath>
|
||||||
@ -141,6 +144,7 @@
|
|||||||
<Compile Include="ImagePreview.cs" />
|
<Compile Include="ImagePreview.cs" />
|
||||||
<Compile Include="ListViewEx.cs" />
|
<Compile Include="ListViewEx.cs" />
|
||||||
<Compile Include="ModalWindow.cs" />
|
<Compile Include="ModalWindow.cs" />
|
||||||
|
<Compile Include="NAudio.cs" />
|
||||||
<Compile Include="Settings.cs" />
|
<Compile Include="Settings.cs" />
|
||||||
<Compile Include="Shell.cs" />
|
<Compile Include="Shell.cs" />
|
||||||
<Compile Include="Strings\guiStrings.Designer.cs">
|
<Compile Include="Strings\guiStrings.Designer.cs">
|
||||||
|
@ -44,6 +44,7 @@ using Rnd.Windows;
|
|||||||
using System.Collections.Specialized;
|
using System.Collections.Specialized;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using Microsoft.Win32;
|
using Microsoft.Win32;
|
||||||
|
using NAudio.Wave;
|
||||||
|
|
||||||
namespace GARbro.GUI
|
namespace GARbro.GUI
|
||||||
{
|
{
|
||||||
@ -98,6 +99,11 @@ namespace GARbro.GUI
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
protected override void OnClosing (CancelEventArgs e)
|
protected override void OnClosing (CancelEventArgs e)
|
||||||
{
|
{
|
||||||
|
if (null != m_audio)
|
||||||
|
{
|
||||||
|
m_audio.Dispose();
|
||||||
|
m_audio = null;
|
||||||
|
}
|
||||||
SaveSettings();
|
SaveSettings();
|
||||||
base.OnClosing (e);
|
base.OnClosing (e);
|
||||||
}
|
}
|
||||||
@ -707,6 +713,11 @@ namespace GARbro.GUI
|
|||||||
var vm = ViewModel;
|
var vm = ViewModel;
|
||||||
if (null == vm)
|
if (null == vm)
|
||||||
return;
|
return;
|
||||||
|
if ("audio" == entry.Type)
|
||||||
|
{
|
||||||
|
PlayFile (entry.Source);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (vm.IsArchive) // tried to open file inside archive
|
if (vm.IsArchive) // tried to open file inside archive
|
||||||
{
|
{
|
||||||
var arc_vm = vm as ArchiveViewModel;
|
var arc_vm = vm as ArchiveViewModel;
|
||||||
@ -771,6 +782,53 @@ namespace GARbro.GUI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Stream OpenEntry (Entry entry)
|
||||||
|
{
|
||||||
|
var vm = ViewModel;
|
||||||
|
if (vm.IsArchive)
|
||||||
|
return m_app.CurrentArchive.OpenEntry (entry);
|
||||||
|
else
|
||||||
|
return File.OpenRead (Path.Combine (vm.Path, entry.Name));
|
||||||
|
}
|
||||||
|
|
||||||
|
WaveOutEvent m_audio;
|
||||||
|
|
||||||
|
private void PlayFile (Entry entry)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
using (var input = OpenEntry (entry))
|
||||||
|
{
|
||||||
|
var sound = AudioFormat.Read (input);
|
||||||
|
if (null == sound)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (m_audio != null)
|
||||||
|
{
|
||||||
|
m_audio.PlaybackStopped -= OnPlaybackStopped;
|
||||||
|
m_audio.Dispose();
|
||||||
|
}
|
||||||
|
var wave_stream = new WaveStreamImpl (sound);
|
||||||
|
m_audio = new WaveOutEvent();
|
||||||
|
m_audio.Init (wave_stream);
|
||||||
|
m_audio.PlaybackStopped += OnPlaybackStopped;
|
||||||
|
m_audio.Play();
|
||||||
|
var fmt = wave_stream.WaveFormat;
|
||||||
|
SetStatusText (string.Format ("Playing {0} / {2}bps / {1}Hz", entry.Name,
|
||||||
|
fmt.SampleRate, sound.SourceBitrate / 1000));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception X)
|
||||||
|
{
|
||||||
|
SetStatusText (X.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnPlaybackStopped (object sender, StoppedEventArgs e)
|
||||||
|
{
|
||||||
|
SetStatusText ("");
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Launch specified file.
|
/// Launch specified file.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
83
NAudio.cs
Normal file
83
NAudio.cs
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
//! \file NAudio.cs
|
||||||
|
//! \date Thu Nov 06 23:27:00 2014
|
||||||
|
//! \brief NAudio wrappers for GameRes audio resources.
|
||||||
|
//
|
||||||
|
// Copyright (C) 2014 by morkt
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
// of this software and associated documentation files (the "Software"), to
|
||||||
|
// deal in the Software without restriction, including without limitation the
|
||||||
|
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||||
|
// sell copies of the Software, and to permit persons to whom the Software is
|
||||||
|
// furnished to do so, subject to the following conditions:
|
||||||
|
//
|
||||||
|
// The above copyright notice and this permission notice shall be included in
|
||||||
|
// all copies or substantial portions of the Software.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||||
|
// IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
using NAudio.Wave;
|
||||||
|
|
||||||
|
namespace GARbro
|
||||||
|
{
|
||||||
|
public class WaveStreamImpl : WaveStream
|
||||||
|
{
|
||||||
|
GameRes.SoundInput m_input;
|
||||||
|
WaveFormat m_format;
|
||||||
|
|
||||||
|
public override WaveFormat WaveFormat { get { return m_format; } }
|
||||||
|
|
||||||
|
public override long Position
|
||||||
|
{
|
||||||
|
get { return m_input.Position; }
|
||||||
|
set { m_input.Position = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public override long Length { get { return m_input.Length; } }
|
||||||
|
|
||||||
|
public WaveStreamImpl (GameRes.SoundInput input)
|
||||||
|
{
|
||||||
|
m_input = input;
|
||||||
|
var format = m_input.Format;
|
||||||
|
m_format = WaveFormat.CreateCustomFormat ((WaveFormatEncoding)format.FormatTag,
|
||||||
|
(int)format.SamplesPerSecond,
|
||||||
|
format.Channels,
|
||||||
|
(int)format.AverageBytesPerSecond,
|
||||||
|
format.BlockAlign,
|
||||||
|
format.BitsPerSample);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int Read (byte[] buffer, int offset, int count)
|
||||||
|
{
|
||||||
|
return m_input.Read (buffer, offset, count);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int ReadByte ()
|
||||||
|
{
|
||||||
|
return m_input.ReadByte();
|
||||||
|
}
|
||||||
|
|
||||||
|
#region IDisposable Members
|
||||||
|
bool disposed = false;
|
||||||
|
protected override void Dispose (bool disposing)
|
||||||
|
{
|
||||||
|
if (!disposed)
|
||||||
|
{
|
||||||
|
if (disposing)
|
||||||
|
{
|
||||||
|
m_input.Dispose();
|
||||||
|
}
|
||||||
|
disposed = true;
|
||||||
|
base.Dispose (disposing);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
@ -1,5 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
|
<package id="NAudio" version="1.7.1" targetFramework="net45" />
|
||||||
<package id="Ookii.Dialogs" version="1.0" targetFramework="net45" />
|
<package id="Ookii.Dialogs" version="1.0" targetFramework="net45" />
|
||||||
<package id="WindowsAPICodePack-Core" version="1.1" targetFramework="net45" />
|
<package id="WindowsAPICodePack-Core" version="1.1" targetFramework="net45" />
|
||||||
<package id="WindowsAPICodePack-Shell" version="1.1" targetFramework="net45" />
|
<package id="WindowsAPICodePack-Shell" version="1.1" targetFramework="net45" />
|
||||||
|
BIN
packages/NAudio.1.7.1/NAudio.1.7.1.nupkg
vendored
Normal file
BIN
packages/NAudio.1.7.1/NAudio.1.7.1.nupkg
vendored
Normal file
Binary file not shown.
14
packages/NAudio.1.7.1/NAudio.1.7.1.nuspec
vendored
Normal file
14
packages/NAudio.1.7.1/NAudio.1.7.1.nuspec
vendored
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||||
|
<metadata>
|
||||||
|
<id>NAudio</id>
|
||||||
|
<version>1.7.1</version>
|
||||||
|
<authors>Mark Heath</authors>
|
||||||
|
<owners>Mark Heath</owners>
|
||||||
|
<licenseUrl>http://naudio.codeplex.com/license</licenseUrl>
|
||||||
|
<projectUrl>http://naudio.codeplex.com/</projectUrl>
|
||||||
|
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||||
|
<description>NAudio, an audio library for .NET</description>
|
||||||
|
<tags>C# .NET audio sound</tags>
|
||||||
|
</metadata>
|
||||||
|
</package>
|
20853
packages/NAudio.1.7.1/lib/net35/NAudio.XML
vendored
Normal file
20853
packages/NAudio.1.7.1/lib/net35/NAudio.XML
vendored
Normal file
File diff suppressed because it is too large
Load Diff
12401
packages/NAudio.1.7.1/lib/windows8/NAudio.Win8.XML
vendored
Normal file
12401
packages/NAudio.1.7.1/lib/windows8/NAudio.Win8.XML
vendored
Normal file
File diff suppressed because it is too large
Load Diff
31
packages/NAudio.1.7.1/license.txt
vendored
Normal file
31
packages/NAudio.1.7.1/license.txt
vendored
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
Microsoft Public License (Ms-PL)
|
||||||
|
|
||||||
|
This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software.
|
||||||
|
|
||||||
|
1. Definitions
|
||||||
|
|
||||||
|
The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law.
|
||||||
|
|
||||||
|
A "contribution" is the original software, or any additions or changes to the software.
|
||||||
|
|
||||||
|
A "contributor" is any person that distributes its contribution under this license.
|
||||||
|
|
||||||
|
"Licensed patents" are a contributor's patent claims that read directly on its contribution.
|
||||||
|
|
||||||
|
2. Grant of Rights
|
||||||
|
|
||||||
|
(A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create.
|
||||||
|
|
||||||
|
(B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software.
|
||||||
|
|
||||||
|
3. Conditions and Limitations
|
||||||
|
|
||||||
|
(A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
|
||||||
|
|
||||||
|
(B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically.
|
||||||
|
|
||||||
|
(C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.
|
||||||
|
|
||||||
|
(D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.
|
||||||
|
|
||||||
|
(E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement.
|
72
packages/NAudio.1.7.1/readme.txt
vendored
Normal file
72
packages/NAudio.1.7.1/readme.txt
vendored
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
NAudio is an open source .NET audio library written by Mark Heath (mark.heath@gmail.com)
|
||||||
|
For more information, visit http://naudio.codeplex.com
|
||||||
|
|
||||||
|
THANKS
|
||||||
|
======
|
||||||
|
The following list includes some of the people who have contributed in various ways to NAudio, such as code contributions,
|
||||||
|
bug fixes, documentation, helping out on the forums and even donations. I haven't finished compiling this list yet, so
|
||||||
|
if your name should be on it but isn't please let me know and I will include it. Also, some people I only know by their forum
|
||||||
|
id, so if you want me to put your full name here, please also get in touch.
|
||||||
|
|
||||||
|
in alphabetical order:
|
||||||
|
Alexandre Mutel
|
||||||
|
Alexander Binkert
|
||||||
|
AmandaTarafaMas
|
||||||
|
balistof
|
||||||
|
biermeester
|
||||||
|
borman11
|
||||||
|
bradb
|
||||||
|
Brandon Hansen (kg6ypi)
|
||||||
|
csechet
|
||||||
|
ChunkWare Music Software
|
||||||
|
CKing
|
||||||
|
DaMacc
|
||||||
|
eejake52
|
||||||
|
Florian Rosmann (filoe)
|
||||||
|
Giawa
|
||||||
|
Hfuy
|
||||||
|
Iain McCowan
|
||||||
|
Idael Cardaso
|
||||||
|
ioctlLR
|
||||||
|
Jamie Michael Ewins
|
||||||
|
jannera
|
||||||
|
jbaker8935
|
||||||
|
jcameron23
|
||||||
|
jonahoffmann
|
||||||
|
jontdelorme
|
||||||
|
Justin Frankel
|
||||||
|
K24A3
|
||||||
|
Kassoul
|
||||||
|
kevinxxx
|
||||||
|
Lustild
|
||||||
|
Lucian Wischik (ljw1004)
|
||||||
|
ManuN
|
||||||
|
MeelMarcel
|
||||||
|
Michael Feld
|
||||||
|
Michael J
|
||||||
|
Michael Lehenbauer
|
||||||
|
Nigel Redmon
|
||||||
|
Nikolaos Georgiou
|
||||||
|
Owen Skriloff
|
||||||
|
owoudenb
|
||||||
|
painmailer
|
||||||
|
PPavan
|
||||||
|
Pygmy
|
||||||
|
Ray Molenkamp
|
||||||
|
Robert Bristow-Johnson
|
||||||
|
Scott Fleischman
|
||||||
|
Sirish Bajpai
|
||||||
|
sporn
|
||||||
|
Steve Underwood
|
||||||
|
Ted Murphy
|
||||||
|
Tiny Simple Tools
|
||||||
|
Tobias Fleming
|
||||||
|
Tony Cabello
|
||||||
|
Tony Sistemas
|
||||||
|
TuneBlade
|
||||||
|
topher3683
|
||||||
|
Vladimir Rokovanov
|
||||||
|
Ville Koskinen
|
||||||
|
Wyatt Rice
|
||||||
|
Yuval Naveh
|
||||||
|
Zsb
|
20
packages/NVorbis.0.8.3.0/COPYING
vendored
Normal file
20
packages/NVorbis.0.8.3.0/COPYING
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
Copyright (c) 2012 Andrew Ward, Ms-PL
|
||||||
|
|
||||||
|
Microsoft Public License (Ms-PL)
|
||||||
|
|
||||||
|
This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software.
|
||||||
|
|
||||||
|
Definitions
|
||||||
|
The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law.
|
||||||
|
A "contribution" is the original software, or any additions or changes to the software.
|
||||||
|
A "contributor" is any person that distributes its contribution under this license.
|
||||||
|
"Licensed patents" are a contributor's patent claims that read directly on its contribution.
|
||||||
|
Grant of Rights
|
||||||
|
(A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create.
|
||||||
|
(B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software.
|
||||||
|
Conditions and Limitations
|
||||||
|
(A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
|
||||||
|
(B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically.
|
||||||
|
(C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.
|
||||||
|
(D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.
|
||||||
|
(E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees, or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement.
|
BIN
packages/NVorbis.0.8.3.0/NVorbis.0.8.3.0.nupkg
vendored
Normal file
BIN
packages/NVorbis.0.8.3.0/NVorbis.0.8.3.0.nupkg
vendored
Normal file
Binary file not shown.
20
packages/NVorbis.0.8.3.0/NVorbis.0.8.3.0.nuspec
vendored
Normal file
20
packages/NVorbis.0.8.3.0/NVorbis.0.8.3.0.nuspec
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
||||||
|
<metadata>
|
||||||
|
<id>NVorbis</id>
|
||||||
|
<version>0.8.3.0</version>
|
||||||
|
<authors>Andrew Ward</authors>
|
||||||
|
<owners>Andrew Ward</owners>
|
||||||
|
<licenseUrl>http://nvorbis.codeplex.com/license</licenseUrl>
|
||||||
|
<projectUrl>http://nvorbis.codeplex.com/</projectUrl>
|
||||||
|
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||||
|
<description>A fully managed implementation of a Xiph.org Foundation Ogg Vorbis decoder.</description>
|
||||||
|
<summary>A managed Xiph.org Foundation Ogg Vorbis decoder</summary>
|
||||||
|
<releaseNotes>- BugFix: Don't set the end of stream flag until the last packet of the page</releaseNotes>
|
||||||
|
<language>en-US</language>
|
||||||
|
<tags>ogg vorbis xiph audio c# sound .NET</tags>
|
||||||
|
<frameworkAssemblies>
|
||||||
|
<frameworkAssembly assemblyName="System" targetFramework="" />
|
||||||
|
</frameworkAssemblies>
|
||||||
|
</metadata>
|
||||||
|
</package>
|
120
packages/NVorbis.0.8.3.0/README
vendored
Normal file
120
packages/NVorbis.0.8.3.0/README
vendored
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
NVorbis
|
||||||
|
-------
|
||||||
|
|
||||||
|
NVorbis is a .Net library for decoding Xiph.org Vorbis files. It is purely
|
||||||
|
managed code, and should run correctly in partial-trust environments.
|
||||||
|
|
||||||
|
This implementation is based on the Vorbis specification found on xiph.org.
|
||||||
|
The MDCT and Huffman codeword generator were borrowed from public domain
|
||||||
|
implementations at http://nothings.org/stb_vorbis/.
|
||||||
|
|
||||||
|
Currently the only container supported is Xiph.org Ogg. Matroska and RTP
|
||||||
|
are planned.
|
||||||
|
|
||||||
|
To use:
|
||||||
|
|
||||||
|
- Create an instance of NVorbis.VorbisReader (pass the Ogg Vorbis filename in)
|
||||||
|
- Use these properties to gather data about the logical stream:
|
||||||
|
- Channels
|
||||||
|
- SampleRate
|
||||||
|
- TotalTime - A TimeSpan indicating the total length of the audio data
|
||||||
|
- DecodedTime - A TimeSpan indicating the last returned sample's timestamp
|
||||||
|
- NominalBitrate, UpperBitrate, and LowerBitrate
|
||||||
|
- These are the encoder's reported bitrates
|
||||||
|
- Vendor - The encoder's vendor string
|
||||||
|
- Comments - An array of comments in the file (usually tags)
|
||||||
|
- Call "int ReadSamples(float[], int, int)" to retrieve the next batch of
|
||||||
|
samples. It will return 0 when the logical Vorbis stream is done.
|
||||||
|
|
||||||
|
|
||||||
|
- For NAudio support:
|
||||||
|
- Reference NVorbis.NAudioSupport.dll
|
||||||
|
- Create an instance of NVorbis.NAudioSupport.VorbisWaveReader
|
||||||
|
- VorbisWaveReader implements NAudio.Wave.WaveStream.
|
||||||
|
|
||||||
|
History
|
||||||
|
-------
|
||||||
|
0.1 - 08/03/2012
|
||||||
|
* Initial Release
|
||||||
|
0.2 - 08/07/2012
|
||||||
|
* Swapped out LGPL code for public domain implementations
|
||||||
|
* Relicensed under Ms-PL
|
||||||
|
* Added NAudio support project
|
||||||
|
* Added test files & app
|
||||||
|
* Performance improvements
|
||||||
|
0.3 - 08/08/2012
|
||||||
|
* Fixed Page / Packet decode (packets overlapping 2 pages)
|
||||||
|
* Fixed "no energy" packet handling
|
||||||
|
* Fixed packet reader not merging when unsolicited packets are added
|
||||||
|
* Added .gitignore
|
||||||
|
* Added initial multi-stream support
|
||||||
|
* Added statistics (see VorbisReader.Stats)
|
||||||
|
0.4 - 08/14/2012
|
||||||
|
* Refactoring to clean up code and make room for later improvements
|
||||||
|
* Changed lapping algorithm to be simpler
|
||||||
|
* Switched to higher-performance clipping algorithm
|
||||||
|
* Some cleanup
|
||||||
|
0.4.1 - 09/11/2012
|
||||||
|
* Fixed a couple Ogg container bugs
|
||||||
|
* Optimized memory allocations for better performance / memory usage
|
||||||
|
0.5 - 09/20/2012
|
||||||
|
* Added seeking support
|
||||||
|
* Changed OggPacketReader to use a doubly-linked list for the packet queue / history
|
||||||
|
* Changed OggPacketReader.GetTotalPageCount() to count pages directly instead of making .AddPacket(...) keep a list
|
||||||
|
* Fixed a few bugs (mostly race conditions in multi-threaded playback scenarios)
|
||||||
|
* Added multi-stream support to VorbisWaveReader
|
||||||
|
* Added several info properties to VorbisWaveReader
|
||||||
|
0.5.5 - 11/15/2012
|
||||||
|
* Added OpenTK support
|
||||||
|
* Added makefiles for Mono
|
||||||
|
* Added constructor to NAudioSupport for already opened Stream instances
|
||||||
|
* Made Ogg container logic thread-safe
|
||||||
|
* Cleanup & Optimization
|
||||||
|
0.6.0 - 06/27/2013
|
||||||
|
* Remove ACache from project
|
||||||
|
* Make clipping optional (default: on)
|
||||||
|
* Set clipping to clamp at +/-.99999994 instead of +/-1 as a courtesy to those not outputing float samples
|
||||||
|
* Performance improvements for RingBuffer
|
||||||
|
* Performance improvements in ThreadSafeStream
|
||||||
|
0.7.0 - 07/15/2013
|
||||||
|
* Rewrite Ogg Reader buffering logic to vastly improve memory usage
|
||||||
|
* Reorganize to more easily support other container types / work with other Ogg stream decoders
|
||||||
|
* Exposed Ogg reading types
|
||||||
|
* Performance improvements
|
||||||
|
* Bugfix: Don't throw on Vorbis streams that only have a single mode
|
||||||
|
0.7.1 - 07/18/2013
|
||||||
|
* Removed use of generics & lambda from Huffman decoder
|
||||||
|
* Reduced computation by only processing samples that are required for output
|
||||||
|
* Bugfix: Seeking now works again
|
||||||
|
* Bugfix: OpenTKSupport.OggStream now only queues as many source buffers as it filled
|
||||||
|
0.7.2 - 07/22/2013
|
||||||
|
* Bugfix: Floor 0 implementation is now correct
|
||||||
|
* Bugfix: Residue 0 & 1 implementation is now correct
|
||||||
|
* Bugfix: Seeking back less than the current buffer size no longer corrupts the read buffer
|
||||||
|
0.7.3 - 08/02/2013
|
||||||
|
* Bugfix: Fix residue 1
|
||||||
|
0.7.4 - 09/16/2013
|
||||||
|
* Bugfix: Some stereo files with sound on only one channel decoded noise on the silent channel.
|
||||||
|
0.8.0test1 - 09/16/2013
|
||||||
|
* Rebuilt container reading infrastructure so it is properly decoupled from the decoder
|
||||||
|
* Added unit tests for the packet reader, Ogg container reader
|
||||||
|
0.8.0 - 01/16/2014
|
||||||
|
* Minor bugfixing to test1
|
||||||
|
* Replaces 0.7.4 as recommended release
|
||||||
|
0.8.1 - 02/24/2014
|
||||||
|
* Bugfix: Threading issues in Ogg reader
|
||||||
|
* Rewrite StreamReadBuffer (again) for simplicity and correctness
|
||||||
|
* Add "saved buffer" concept to StreamReadBuffer for multi-threaded performance
|
||||||
|
* Reduce Ogg reader memory usage
|
||||||
|
* Add locking for multi-threading support in Ogg reader
|
||||||
|
* Remove exception-based logic where possible for better performance
|
||||||
|
0.8.2 - 03/19/2014
|
||||||
|
* BugFix: Don't try to copy StreamReadBuffer data when offset is bigger than source
|
||||||
|
* Add parameter change event to packet provider interface
|
||||||
|
* Refactored decoder setup so parameter change can be handled
|
||||||
|
* Rewrote packet peek / get logic for simplicity
|
||||||
|
* Refactored locking in OggPacketReader / OggContainerReader
|
||||||
|
* Improved Ogg end of stream handling
|
||||||
|
* Changed container seek API to use packets instead of indexes to reduce linked list traversals
|
||||||
|
0.8.3 - 04/29/2014
|
||||||
|
* BugFix: Don't set the end of stream flag until the last packet of the page
|
672
packages/NVorbis.0.8.3.0/lib/NVorbis.XML
vendored
Normal file
672
packages/NVorbis.0.8.3.0/lib/NVorbis.XML
vendored
Normal file
@ -0,0 +1,672 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<doc>
|
||||||
|
<assembly>
|
||||||
|
<name>NVorbis</name>
|
||||||
|
</assembly>
|
||||||
|
<members>
|
||||||
|
<member name="T:NVorbis.Ogg.ContainerReader">
|
||||||
|
<summary>
|
||||||
|
Provides an <see cref="T:NVorbis.IContainerReader"/> implementation for basic Ogg files.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:NVorbis.IContainerReader">
|
||||||
|
<summary>
|
||||||
|
Provides a interface for a Vorbis logical stream container.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:NVorbis.IContainerReader.Init">
|
||||||
|
<summary>
|
||||||
|
Initializes the container and finds the first stream.
|
||||||
|
</summary>
|
||||||
|
<returns><c>True</c> if a valid logical stream is found, otherwise <c>False</c>.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:NVorbis.IContainerReader.FindNextStream">
|
||||||
|
<summary>
|
||||||
|
Finds the next new stream in the container.
|
||||||
|
</summary>
|
||||||
|
<returns><c>True</c> if a new stream was found, otherwise <c>False</c>.</returns>
|
||||||
|
<exception cref="T:System.InvalidOperationException"><see cref="P:NVorbis.IContainerReader.CanSeek"/> is <c>False</c>.</exception>
|
||||||
|
</member>
|
||||||
|
<member name="M:NVorbis.IContainerReader.GetTotalPageCount">
|
||||||
|
<summary>
|
||||||
|
Retrieves the total number of pages in the container.
|
||||||
|
</summary>
|
||||||
|
<returns>The total number of pages.</returns>
|
||||||
|
<exception cref="T:System.InvalidOperationException"><see cref="P:NVorbis.IContainerReader.CanSeek"/> is <c>False</c>.</exception>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.IContainerReader.StreamSerials">
|
||||||
|
<summary>
|
||||||
|
Gets the list of stream serials found in the container so far.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.IContainerReader.CanSeek">
|
||||||
|
<summary>
|
||||||
|
Gets whether the container supports seeking.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.IContainerReader.WasteBits">
|
||||||
|
<summary>
|
||||||
|
Gets the number of bits in the container that are not associated with a logical stream.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.IContainerReader.PagesRead">
|
||||||
|
<summary>
|
||||||
|
Gets the number of pages that have been read in the container.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="E:NVorbis.IContainerReader.NewStream">
|
||||||
|
<summary>
|
||||||
|
Event raised when a new logical stream is found in the container.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:NVorbis.Ogg.ContainerReader.#ctor(System.String)">
|
||||||
|
<summary>
|
||||||
|
Creates a new instance with the specified file.
|
||||||
|
</summary>
|
||||||
|
<param name="path">The full path to the file.</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:NVorbis.Ogg.ContainerReader.#ctor(System.IO.Stream,System.Boolean)">
|
||||||
|
<summary>
|
||||||
|
Creates a new instance with the specified stream. Optionally sets to close the stream when disposed.
|
||||||
|
</summary>
|
||||||
|
<param name="stream">The stream to read.</param>
|
||||||
|
<param name="closeOnDispose"><c>True</c> to close the stream when <see cref="M:NVorbis.Ogg.ContainerReader.Dispose"/> is called, otherwise <c>False</c>.</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:NVorbis.Ogg.ContainerReader.Init">
|
||||||
|
<summary>
|
||||||
|
Initializes the container and finds the first stream.
|
||||||
|
</summary>
|
||||||
|
<returns><c>True</c> if a valid logical stream is found, otherwise <c>False</c>.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:NVorbis.Ogg.ContainerReader.Dispose">
|
||||||
|
<summary>
|
||||||
|
Disposes this instance.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:NVorbis.Ogg.ContainerReader.GetStream(System.Int32)">
|
||||||
|
<summary>
|
||||||
|
Gets the <see cref="T:NVorbis.IPacketProvider"/> instance for the specified stream serial.
|
||||||
|
</summary>
|
||||||
|
<param name="streamSerial">The stream serial to look for.</param>
|
||||||
|
<returns>An <see cref="T:NVorbis.IPacketProvider"/> instance.</returns>
|
||||||
|
<exception cref="T:System.ArgumentOutOfRangeException">The specified stream serial was not found.</exception>
|
||||||
|
</member>
|
||||||
|
<member name="M:NVorbis.Ogg.ContainerReader.FindNextStream">
|
||||||
|
<summary>
|
||||||
|
Finds the next new stream in the container.
|
||||||
|
</summary>
|
||||||
|
<returns><c>True</c> if a new stream was found, otherwise <c>False</c>.</returns>
|
||||||
|
<exception cref="T:System.InvalidOperationException"><see cref="P:NVorbis.Ogg.ContainerReader.CanSeek"/> is <c>False</c>.</exception>
|
||||||
|
</member>
|
||||||
|
<member name="M:NVorbis.Ogg.ContainerReader.GetTotalPageCount">
|
||||||
|
<summary>
|
||||||
|
Retrieves the total number of pages in the container.
|
||||||
|
</summary>
|
||||||
|
<returns>The total number of pages.</returns>
|
||||||
|
<exception cref="T:System.InvalidOperationException"><see cref="P:NVorbis.Ogg.ContainerReader.CanSeek"/> is <c>False</c>.</exception>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.Ogg.ContainerReader.StreamSerials">
|
||||||
|
<summary>
|
||||||
|
Gets the list of stream serials found in the container so far.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="E:NVorbis.Ogg.ContainerReader.NewStream">
|
||||||
|
<summary>
|
||||||
|
Event raised when a new logical stream is found in the container.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.Ogg.ContainerReader.PagesRead">
|
||||||
|
<summary>
|
||||||
|
Gets the number of pages that have been read in the container.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.Ogg.ContainerReader.CanSeek">
|
||||||
|
<summary>
|
||||||
|
Gets whether the container supports seeking.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.Ogg.ContainerReader.WasteBits">
|
||||||
|
<summary>
|
||||||
|
Gets the number of bits in the container that are not associated with a logical stream.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:NVorbis.BufferedReadStream">
|
||||||
|
<summary>
|
||||||
|
A thread-safe, read-only, buffering stream wrapper.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:NVorbis.IVorbisStreamStatus.ResetStats">
|
||||||
|
<summary>
|
||||||
|
Gets the counters for latency and bitrate calculations, as well as overall bit counts
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.IVorbisStreamStatus.EffectiveBitRate">
|
||||||
|
<summary>
|
||||||
|
Gets the calculated bit rate of audio stream data for the everything decoded so far
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.IVorbisStreamStatus.InstantBitRate">
|
||||||
|
<summary>
|
||||||
|
Gets the calculated bit rate for the last ~1 second of audio
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.IVorbisStreamStatus.PageLatency">
|
||||||
|
<summary>
|
||||||
|
Gets the calculated latency per page
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.IVorbisStreamStatus.PacketLatency">
|
||||||
|
<summary>
|
||||||
|
Gets the calculated latency per packet
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.IVorbisStreamStatus.SecondLatency">
|
||||||
|
<summary>
|
||||||
|
Gets the calculated latency per second of output
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.IVorbisStreamStatus.OverheadBits">
|
||||||
|
<summary>
|
||||||
|
Gets the number of bits read that do not contribute to the output audio
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.IVorbisStreamStatus.AudioBits">
|
||||||
|
<summary>
|
||||||
|
Gets the number of bits read that contribute to the output audio
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.IVorbisStreamStatus.PagesRead">
|
||||||
|
<summary>
|
||||||
|
Gets the number of pages read so far in the current stream
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.IVorbisStreamStatus.TotalPages">
|
||||||
|
<summary>
|
||||||
|
Gets the total number of pages in the current stream
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.IVorbisStreamStatus.Clipped">
|
||||||
|
<summary>
|
||||||
|
Gets whether the stream has been clipped since the last reset
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:NVorbis.IPacketProvider">
|
||||||
|
<summary>
|
||||||
|
Provides packets on-demand for the Vorbis stream decoder.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:NVorbis.IPacketProvider.GetTotalPageCount">
|
||||||
|
<summary>
|
||||||
|
Retrieves the total number of pages (or frames) this stream uses.
|
||||||
|
</summary>
|
||||||
|
<returns>The page count.</returns>
|
||||||
|
<exception cref="T:System.InvalidOperationException"><see cref="P:NVorbis.IPacketProvider.CanSeek"/> is <c>False</c>.</exception>
|
||||||
|
</member>
|
||||||
|
<member name="M:NVorbis.IPacketProvider.GetNextPacket">
|
||||||
|
<summary>
|
||||||
|
Retrieves the next packet in the stream.
|
||||||
|
</summary>
|
||||||
|
<returns>The next packet in the stream or <c>null</c> if no more packets.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:NVorbis.IPacketProvider.PeekNextPacket">
|
||||||
|
<summary>
|
||||||
|
Retrieves the next packet in the stream but does not advance to the following packet.
|
||||||
|
</summary>
|
||||||
|
<returns>The next packet in the stream or <c>null</c> if no more packets.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:NVorbis.IPacketProvider.GetPacket(System.Int32)">
|
||||||
|
<summary>
|
||||||
|
Retrieves the packet specified from the stream.
|
||||||
|
</summary>
|
||||||
|
<param name="packetIndex">The index of the packet to retrieve.</param>
|
||||||
|
<returns>The specified packet.</returns>
|
||||||
|
<exception cref="T:System.ArgumentOutOfRangeException"><paramref name="packetIndex"/> is less than 0 or past the end of the stream.</exception>
|
||||||
|
<exception cref="T:System.InvalidOperationException"><see cref="P:NVorbis.IPacketProvider.CanSeek"/> is <c>False</c>.</exception>
|
||||||
|
</member>
|
||||||
|
<member name="M:NVorbis.IPacketProvider.GetGranuleCount">
|
||||||
|
<summary>
|
||||||
|
Retrieves the total number of granules in this Vorbis stream.
|
||||||
|
</summary>
|
||||||
|
<returns>The number of samples</returns>
|
||||||
|
<exception cref="T:System.InvalidOperationException"><see cref="P:NVorbis.IPacketProvider.CanSeek"/> is <c>False</c>.</exception>
|
||||||
|
</member>
|
||||||
|
<member name="M:NVorbis.IPacketProvider.FindPacket(System.Int64,System.Func{NVorbis.DataPacket,NVorbis.DataPacket,System.Int32})">
|
||||||
|
<summary>
|
||||||
|
Finds the packet index to the granule position specified in the current stream.
|
||||||
|
</summary>
|
||||||
|
<param name="granulePos">The granule position to seek to.</param>
|
||||||
|
<param name="packetGranuleCountCallback">A callback method that takes the current and previous packets and returns the number of granules in the current packet.</param>
|
||||||
|
<returns>The index of the packet that includes the specified granule position or -1 if none found.</returns>
|
||||||
|
<exception cref="T:System.ArgumentOutOfRangeException"><paramref name="granulePos"/> is less than 0 or is after the last granule.</exception>
|
||||||
|
</member>
|
||||||
|
<member name="M:NVorbis.IPacketProvider.SeekToPacket(NVorbis.DataPacket,System.Int32)">
|
||||||
|
<summary>
|
||||||
|
Sets the next packet to be returned, applying a pre-roll as necessary.
|
||||||
|
</summary>
|
||||||
|
<param name="packet">The packet to key from.</param>
|
||||||
|
<param name="preRoll">The number of packets to return before the indicated packet.</param>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.IPacketProvider.StreamSerial">
|
||||||
|
<summary>
|
||||||
|
Gets the serial number associated with this stream.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.IPacketProvider.CanSeek">
|
||||||
|
<summary>
|
||||||
|
Gets whether seeking is supported on this stream.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.IPacketProvider.ContainerBits">
|
||||||
|
<summary>
|
||||||
|
Gets the number of bits of overhead in this stream's container.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="E:NVorbis.IPacketProvider.ParameterChange">
|
||||||
|
<summary>
|
||||||
|
Occurs when the stream is about to change parameters.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:NVorbis.DataPacket">
|
||||||
|
<summary>
|
||||||
|
A single data packet from a logical Vorbis stream.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:NVorbis.DataPacket.GetFlag(NVorbis.DataPacket.PacketFlags)">
|
||||||
|
<summary>
|
||||||
|
Gets the value of the specified flag.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:NVorbis.DataPacket.SetFlag(NVorbis.DataPacket.PacketFlags,System.Boolean)">
|
||||||
|
<summary>
|
||||||
|
Sets the value of the specified flag.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:NVorbis.DataPacket.#ctor(System.Int32)">
|
||||||
|
<summary>
|
||||||
|
Creates a new instance with the specified length.
|
||||||
|
</summary>
|
||||||
|
<param name="length">The length of the packet.</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:NVorbis.DataPacket.ReadNextByte">
|
||||||
|
<summary>
|
||||||
|
Reads the next byte of the packet.
|
||||||
|
</summary>
|
||||||
|
<returns>The next byte if available, otherwise -1.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:NVorbis.DataPacket.Done">
|
||||||
|
<summary>
|
||||||
|
Indicates that the packet has been read and its data is no longer needed.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:NVorbis.DataPacket.TryPeekBits(System.Int32,System.Int32@)">
|
||||||
|
<summary>
|
||||||
|
Attempts to read the specified number of bits from the packet, but may return fewer. Does not advance the position counter.
|
||||||
|
</summary>
|
||||||
|
<param name="count">The number of bits to attempt to read.</param>
|
||||||
|
<param name="bitsRead">The number of bits actually read.</param>
|
||||||
|
<returns>The value of the bits read.</returns>
|
||||||
|
<exception cref="T:System.ArgumentOutOfRangeException"><paramref name="count"/> is not between 0 and 64.</exception>
|
||||||
|
</member>
|
||||||
|
<member name="M:NVorbis.DataPacket.SkipBits(System.Int32)">
|
||||||
|
<summary>
|
||||||
|
Advances the position counter by the specified number of bits.
|
||||||
|
</summary>
|
||||||
|
<param name="count">The number of bits to advance.</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:NVorbis.DataPacket.ResetBitReader">
|
||||||
|
<summary>
|
||||||
|
Resets the bit reader.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:NVorbis.DataPacket.ReadBits(System.Int32)">
|
||||||
|
<summary>
|
||||||
|
Reads the specified number of bits from the packet and advances the position counter.
|
||||||
|
</summary>
|
||||||
|
<param name="count">The number of bits to read.</param>
|
||||||
|
<returns>The value of the bits read.</returns>
|
||||||
|
<exception cref="T:System.ArgumentOutOfRangeException">The number of bits specified is not between 0 and 64.</exception>
|
||||||
|
</member>
|
||||||
|
<member name="M:NVorbis.DataPacket.PeekByte">
|
||||||
|
<summary>
|
||||||
|
Reads the next byte from the packet. Does not advance the position counter.
|
||||||
|
</summary>
|
||||||
|
<returns>The byte read from the packet.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:NVorbis.DataPacket.ReadByte">
|
||||||
|
<summary>
|
||||||
|
Reads the next byte from the packet and advances the position counter.
|
||||||
|
</summary>
|
||||||
|
<returns>The byte read from the packet.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:NVorbis.DataPacket.ReadBytes(System.Int32)">
|
||||||
|
<summary>
|
||||||
|
Reads the specified number of bytes from the packet and advances the position counter.
|
||||||
|
</summary>
|
||||||
|
<param name="count">The number of bytes to read.</param>
|
||||||
|
<returns>A byte array holding the data read.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:NVorbis.DataPacket.Read(System.Byte[],System.Int32,System.Int32)">
|
||||||
|
<summary>
|
||||||
|
Reads the specified number of bytes from the packet into the buffer specified and advances the position counter.
|
||||||
|
</summary>
|
||||||
|
<param name="buffer">The buffer to read into.</param>
|
||||||
|
<param name="index">The index into the buffer to start placing the read data.</param>
|
||||||
|
<param name="count">The number of bytes to read.</param>
|
||||||
|
<returns>The number of bytes read.</returns>
|
||||||
|
<exception cref="T:System.ArgumentOutOfRangeException"><paramref name="index"/> is less than 0 or <paramref name="index"/> + <paramref name="count"/> is past the end of <paramref name="buffer"/>.</exception>
|
||||||
|
</member>
|
||||||
|
<member name="M:NVorbis.DataPacket.ReadBit">
|
||||||
|
<summary>
|
||||||
|
Reads the next bit from the packet and advances the position counter.
|
||||||
|
</summary>
|
||||||
|
<returns>The value of the bit read.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:NVorbis.DataPacket.ReadInt16">
|
||||||
|
<summary>
|
||||||
|
Retrieves the next 16 bits from the packet as a <see cref="T:System.Int16"/> and advances the position counter.
|
||||||
|
</summary>
|
||||||
|
<returns>The value of the next 16 bits.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:NVorbis.DataPacket.ReadInt32">
|
||||||
|
<summary>
|
||||||
|
Retrieves the next 32 bits from the packet as a <see cref="T:System.Int32"/> and advances the position counter.
|
||||||
|
</summary>
|
||||||
|
<returns>The value of the next 32 bits.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:NVorbis.DataPacket.ReadInt64">
|
||||||
|
<summary>
|
||||||
|
Retrieves the next 64 bits from the packet as a <see cref="T:System.Int64"/> and advances the position counter.
|
||||||
|
</summary>
|
||||||
|
<returns>The value of the next 64 bits.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:NVorbis.DataPacket.ReadUInt16">
|
||||||
|
<summary>
|
||||||
|
Retrieves the next 16 bits from the packet as a <see cref="T:System.UInt16"/> and advances the position counter.
|
||||||
|
</summary>
|
||||||
|
<returns>The value of the next 16 bits.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:NVorbis.DataPacket.ReadUInt32">
|
||||||
|
<summary>
|
||||||
|
Retrieves the next 32 bits from the packet as a <see cref="T:System.UInt32"/> and advances the position counter.
|
||||||
|
</summary>
|
||||||
|
<returns>The value of the next 32 bits.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:NVorbis.DataPacket.ReadUInt64">
|
||||||
|
<summary>
|
||||||
|
Retrieves the next 64 bits from the packet as a <see cref="T:System.UInt64"/> and advances the position counter.
|
||||||
|
</summary>
|
||||||
|
<returns>The value of the next 64 bits.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:NVorbis.DataPacket.SkipBytes(System.Int32)">
|
||||||
|
<summary>
|
||||||
|
Advances the position counter by the specified number of bytes.
|
||||||
|
</summary>
|
||||||
|
<param name="count">The number of bytes to advance.</param>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.DataPacket.IsResync">
|
||||||
|
<summary>
|
||||||
|
Gets whether the packet was found after a stream resync.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.DataPacket.GranulePosition">
|
||||||
|
<summary>
|
||||||
|
Gets the position of the last granule in the packet.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.DataPacket.PageGranulePosition">
|
||||||
|
<summary>
|
||||||
|
Gets the position of the last granule in the page the packet is in.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.DataPacket.Length">
|
||||||
|
<summary>
|
||||||
|
Gets the length of the packet.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.DataPacket.IsEndOfStream">
|
||||||
|
<summary>
|
||||||
|
Gets whether the packet is the last one in the logical stream.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.DataPacket.BitsRead">
|
||||||
|
<summary>
|
||||||
|
Gets the number of bits read from the packet.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.DataPacket.GranuleCount">
|
||||||
|
<summary>
|
||||||
|
Gets the number of granules in the packet. If <c>null</c>, the packet has not been decoded yet.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:NVorbis.DataPacket.PacketFlags">
|
||||||
|
<summary>
|
||||||
|
Defines flags to apply to the current packet
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:NVorbis.DataPacket.PacketFlags.IsResync">
|
||||||
|
<summary>
|
||||||
|
Packet is first since reader had to resync with stream.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:NVorbis.DataPacket.PacketFlags.IsEndOfStream">
|
||||||
|
<summary>
|
||||||
|
Packet is the last in the logical stream.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:NVorbis.DataPacket.PacketFlags.IsShort">
|
||||||
|
<summary>
|
||||||
|
Packet does not have all its data available.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:NVorbis.DataPacket.PacketFlags.HasGranuleCount">
|
||||||
|
<summary>
|
||||||
|
Packet has a granule count defined.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:NVorbis.DataPacket.PacketFlags.User1">
|
||||||
|
<summary>
|
||||||
|
Flag for use by inheritors.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:NVorbis.DataPacket.PacketFlags.User2">
|
||||||
|
<summary>
|
||||||
|
Flag for use by inheritors.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:NVorbis.DataPacket.PacketFlags.User3">
|
||||||
|
<summary>
|
||||||
|
Flag for use by inheritors.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:NVorbis.DataPacket.PacketFlags.User4">
|
||||||
|
<summary>
|
||||||
|
Flag for use by inheritors.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:NVorbis.VorbisReader.ReadSamples(System.Single[],System.Int32,System.Int32)">
|
||||||
|
<summary>
|
||||||
|
Reads decoded samples from the current logical stream
|
||||||
|
</summary>
|
||||||
|
<param name="buffer">The buffer to write the samples to</param>
|
||||||
|
<param name="offset">The offset into the buffer to write the samples to</param>
|
||||||
|
<param name="count">The number of samples to write</param>
|
||||||
|
<returns>The number of samples written</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:NVorbis.VorbisReader.ClearParameterChange">
|
||||||
|
<summary>
|
||||||
|
Clears the parameter change flag so further samples can be requested.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:NVorbis.VorbisReader.FindNextStream">
|
||||||
|
<summary>
|
||||||
|
Searches for the next stream in a concatenated file
|
||||||
|
</summary>
|
||||||
|
<returns><c>True</c> if a new stream was found, otherwise <c>false</c>.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:NVorbis.VorbisReader.SwitchStreams(System.Int32)">
|
||||||
|
<summary>
|
||||||
|
Switches to an alternate logical stream.
|
||||||
|
</summary>
|
||||||
|
<param name="index">The logical stream index to switch to</param>
|
||||||
|
<returns><c>True</c> if the properties of the logical stream differ from those of the one previously being decoded. Otherwise, <c>False</c>.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.VorbisReader.Channels">
|
||||||
|
<summary>
|
||||||
|
Gets the number of channels in the current selected Vorbis stream
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.VorbisReader.SampleRate">
|
||||||
|
<summary>
|
||||||
|
Gets the sample rate of the current selected Vorbis stream
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.VorbisReader.UpperBitrate">
|
||||||
|
<summary>
|
||||||
|
Gets the encoder's upper bitrate of the current selected Vorbis stream
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.VorbisReader.NominalBitrate">
|
||||||
|
<summary>
|
||||||
|
Gets the encoder's nominal bitrate of the current selected Vorbis stream
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.VorbisReader.LowerBitrate">
|
||||||
|
<summary>
|
||||||
|
Gets the encoder's lower bitrate of the current selected Vorbis stream
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.VorbisReader.Vendor">
|
||||||
|
<summary>
|
||||||
|
Gets the encoder's vendor string for the current selected Vorbis stream
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.VorbisReader.Comments">
|
||||||
|
<summary>
|
||||||
|
Gets the comments in the current selected Vorbis stream
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.VorbisReader.IsParameterChange">
|
||||||
|
<summary>
|
||||||
|
Gets whether the previous short sample count was due to a parameter change in the stream.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.VorbisReader.ContainerOverheadBits">
|
||||||
|
<summary>
|
||||||
|
Gets the number of bits read that are related to framing and transport alone
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.VorbisReader.ClipSamples">
|
||||||
|
<summary>
|
||||||
|
Gets or sets whether to automatically apply clipping to samples returned by <see cref="M:NVorbis.VorbisReader.ReadSamples(System.Single[],System.Int32,System.Int32)"/>.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.VorbisReader.Stats">
|
||||||
|
<summary>
|
||||||
|
Gets stats from each decoder stream available
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.VorbisReader.StreamIndex">
|
||||||
|
<summary>
|
||||||
|
Gets the currently-selected stream's index
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.VorbisReader.StreamCount">
|
||||||
|
<summary>
|
||||||
|
Returns the number of logical streams found so far in the physical container
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.VorbisReader.DecodedTime">
|
||||||
|
<summary>
|
||||||
|
Gets or Sets the current timestamp of the decoder. Is the timestamp before the next sample to be decoded
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.VorbisReader.DecodedPosition">
|
||||||
|
<summary>
|
||||||
|
Gets or Sets the current position of the next sample to be decoded.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.VorbisReader.TotalTime">
|
||||||
|
<summary>
|
||||||
|
Gets the total length of the current logical stream
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:NVorbis.NewStreamEventArgs">
|
||||||
|
<summary>
|
||||||
|
Event data for when a new logical stream is found in a container.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:NVorbis.NewStreamEventArgs.#ctor(NVorbis.IPacketProvider)">
|
||||||
|
<summary>
|
||||||
|
Creates a new instance of <see cref="T:NVorbis.NewStreamEventArgs"/> with the specified <see cref="T:NVorbis.IPacketProvider"/>.
|
||||||
|
</summary>
|
||||||
|
<param name="packetProvider">An <see cref="T:NVorbis.IPacketProvider"/> instance.</param>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.NewStreamEventArgs.PacketProvider">
|
||||||
|
<summary>
|
||||||
|
Gets new the <see cref="T:NVorbis.IPacketProvider"/> instance.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.NewStreamEventArgs.IgnoreStream">
|
||||||
|
<summary>
|
||||||
|
Gets or sets whether to ignore the logical stream associated with the packet provider.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:NVorbis.StreamReadBuffer.Read(System.Int64,System.Byte[],System.Int32,System.Int32)">
|
||||||
|
<summary>
|
||||||
|
Reads the number of bytes specified into the buffer given, starting with the offset indicated.
|
||||||
|
</summary>
|
||||||
|
<param name="offset">The offset into the stream to start reading.</param>
|
||||||
|
<param name="buffer">The buffer to read to.</param>
|
||||||
|
<param name="index">The index into the buffer to start writing to.</param>
|
||||||
|
<param name="count">The number of bytes to read.</param>
|
||||||
|
<returns>The number of bytes read.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:NVorbis.StreamReadBuffer.DiscardThrough(System.Int64)">
|
||||||
|
<summary>
|
||||||
|
Tells the buffer that it no longer needs to maintain any bytes before the indicated offset.
|
||||||
|
</summary>
|
||||||
|
<param name="offset">The offset to discard through.</param>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.StreamReadBuffer.MinimalRead">
|
||||||
|
<summary>
|
||||||
|
Gets or Sets whether to limit reads to the smallest size possible.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.StreamReadBuffer.MaxSize">
|
||||||
|
<summary>
|
||||||
|
Gets or Sets the maximum size of the buffer. This is not a hard limit.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.StreamReadBuffer.BaseOffset">
|
||||||
|
<summary>
|
||||||
|
Gets the offset of the start of the buffered data. Reads to offsets before this are likely to require a seek.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.StreamReadBuffer.BytesFilled">
|
||||||
|
<summary>
|
||||||
|
Gets the number of bytes currently buffered.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.StreamReadBuffer.Length">
|
||||||
|
<summary>
|
||||||
|
Gets the number of bytes the buffer can hold.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:NVorbis.ParameterChangeEventArgs">
|
||||||
|
<summary>
|
||||||
|
Event data for when a logical stream has a parameter change.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:NVorbis.ParameterChangeEventArgs.#ctor(NVorbis.DataPacket)">
|
||||||
|
<summary>
|
||||||
|
Creates a new instance of <see cref="T:NVorbis.ParameterChangeEventArgs"/>.
|
||||||
|
</summary>
|
||||||
|
<param name="firstPacket">The first packet after the parameter change.</param>
|
||||||
|
</member>
|
||||||
|
<member name="P:NVorbis.ParameterChangeEventArgs.FirstPacket">
|
||||||
|
<summary>
|
||||||
|
Gets the first packet after the parameter change. This would typically be the parameters packet.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
</members>
|
||||||
|
</doc>
|
Loading…
Reference in New Issue
Block a user