Crosstales.NVorbis.Ogg.PacketReader Class Reference
Inheritance diagram for Crosstales.NVorbis.Ogg.PacketReader:
Crosstales.NVorbis.IPacketProvider

Public Member Functions

void Dispose ()
 
DataPacket GetNextPacket ()
 Retrieves the next packet in the stream. More...
 
DataPacket PeekNextPacket ()
 Retrieves the next packet in the stream but does not advance to the following packet. More...
 
int GetTotalPageCount ()
 Retrieves the total number of pages (or frames) this stream uses. More...
 
DataPacket GetPacket (int packetIndex)
 Retrieves the packet specified from the stream. More...
 
DataPacket FindPacket (long granulePos, Func< DataPacket, DataPacket, int > packetGranuleCountCallback)
 Finds the packet index to the granule position specified in the current stream. More...
 
void SeekToPacket (DataPacket packet, int preRoll)
 Sets the next packet to be returned, applying a pre-roll as necessary. More...
 
long GetGranuleCount ()
 Retrieves the total number of granules in this Vorbis stream. More...
 

Properties

int StreamSerial [get]
 
long ContainerBits [get, set]
 
bool CanSeek [get]
 
- Properties inherited from Crosstales.NVorbis.IPacketProvider
int StreamSerial [get]
 Gets the serial number associated with this stream. More...
 
bool CanSeek [get]
 Gets whether seeking is supported on this stream. More...
 
long ContainerBits [get]
 Gets the number of bits of overhead in this stream's container. More...
 

Events

EventHandler< ParameterChangeEventArgsParameterChange
 
- Events inherited from Crosstales.NVorbis.IPacketProvider
EventHandler< ParameterChangeEventArgsParameterChange
 Occurs when the stream is about to change parameters. More...
 

Member Function Documentation

◆ FindPacket()

DataPacket Crosstales.NVorbis.Ogg.PacketReader.FindPacket ( long  granulePos,
Func< DataPacket, DataPacket, int >  packetGranuleCountCallback 
)

Finds the packet index to the granule position specified in the current stream.

Parameters
granulePosThe granule position to seek to.
packetGranuleCountCallbackA callback method that takes the current and previous packets and returns the number of granules in the current packet.
Returns
The index of the packet that includes the specified granule position or -1 if none found.
Exceptions
ArgumentOutOfRangeExceptiongranulePos is less than 0 or is after the last granule.

Implements Crosstales.NVorbis.IPacketProvider.

◆ GetGranuleCount()

long Crosstales.NVorbis.Ogg.PacketReader.GetGranuleCount ( )

Retrieves the total number of granules in this Vorbis stream.

Returns
The number of samples
Exceptions
InvalidOperationExceptionCanSeek is False.

Implements Crosstales.NVorbis.IPacketProvider.

◆ GetNextPacket()

DataPacket Crosstales.NVorbis.Ogg.PacketReader.GetNextPacket ( )

Retrieves the next packet in the stream.

Returns
The next packet in the stream or null if no more packets.

Implements Crosstales.NVorbis.IPacketProvider.

◆ GetPacket()

DataPacket Crosstales.NVorbis.Ogg.PacketReader.GetPacket ( int  packetIndex)

Retrieves the packet specified from the stream.

Parameters
packetIndexThe index of the packet to retrieve.
Returns
The specified packet.
Exceptions
ArgumentOutOfRangeExceptionpacketIndex is less than 0 or past the end of the stream.
InvalidOperationExceptionCanSeek is False.

Implements Crosstales.NVorbis.IPacketProvider.

◆ GetTotalPageCount()

int Crosstales.NVorbis.Ogg.PacketReader.GetTotalPageCount ( )

Retrieves the total number of pages (or frames) this stream uses.

Returns
The page count.
Exceptions
InvalidOperationExceptionCanSeek is False.

Implements Crosstales.NVorbis.IPacketProvider.

◆ PeekNextPacket()

DataPacket Crosstales.NVorbis.Ogg.PacketReader.PeekNextPacket ( )

Retrieves the next packet in the stream but does not advance to the following packet.

Returns
The next packet in the stream or null if no more packets.

Implements Crosstales.NVorbis.IPacketProvider.

◆ SeekToPacket()

void Crosstales.NVorbis.Ogg.PacketReader.SeekToPacket ( DataPacket  packet,
int  preRoll 
)

Sets the next packet to be returned, applying a pre-roll as necessary.

Parameters
packetThe packet to key from.
preRollThe number of packets to return before the indicated packet.

Implements Crosstales.NVorbis.IPacketProvider.


The documentation for this class was generated from the following file:
  • C:/Users/slaub/Unity/assets/DJPro/DJPro/Assets/Plugins/crosstales/Common/Libraries/NVorbis/Ogg/OggPacketReader.cs