Crosstales.NVorbis.IPacketProvider Interface Reference

Provides packets on-demand for the Vorbis stream decoder. More...

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

Public Member Functions

int GetTotalPageCount ()
 Retrieves the total number of pages (or frames) this stream uses. More...
 
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...
 
DataPacket GetPacket (int packetIndex)
 Retrieves the packet specified from the stream. More...
 
long GetGranuleCount ()
 Retrieves the total number of granules in this Vorbis 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...
 

Properties

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
 Occurs when the stream is about to change parameters. More...
 

Detailed Description

Provides packets on-demand for the Vorbis stream decoder.

Member Function Documentation

◆ FindPacket()

DataPacket Crosstales.NVorbis.IPacketProvider.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.

Implemented in Crosstales.NVorbis.Ogg.PacketReader.

◆ GetGranuleCount()

long Crosstales.NVorbis.IPacketProvider.GetGranuleCount ( )

Retrieves the total number of granules in this Vorbis stream.

Returns
The number of samples
Exceptions
InvalidOperationExceptionCanSeek is False.

Implemented in Crosstales.NVorbis.Ogg.PacketReader.

◆ GetNextPacket()

DataPacket Crosstales.NVorbis.IPacketProvider.GetNextPacket ( )

Retrieves the next packet in the stream.

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

Implemented in Crosstales.NVorbis.Ogg.PacketReader.

◆ GetPacket()

DataPacket Crosstales.NVorbis.IPacketProvider.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.

Implemented in Crosstales.NVorbis.Ogg.PacketReader.

◆ GetTotalPageCount()

int Crosstales.NVorbis.IPacketProvider.GetTotalPageCount ( )

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

Returns
The page count.
Exceptions
InvalidOperationExceptionCanSeek is False.

Implemented in Crosstales.NVorbis.Ogg.PacketReader.

◆ PeekNextPacket()

DataPacket Crosstales.NVorbis.IPacketProvider.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.

Implemented in Crosstales.NVorbis.Ogg.PacketReader.

◆ SeekToPacket()

void Crosstales.NVorbis.IPacketProvider.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.

Implemented in Crosstales.NVorbis.Ogg.PacketReader.

Property Documentation

◆ CanSeek

bool Crosstales.NVorbis.IPacketProvider.CanSeek
get

Gets whether seeking is supported on this stream.

◆ ContainerBits

long Crosstales.NVorbis.IPacketProvider.ContainerBits
get

Gets the number of bits of overhead in this stream's container.

◆ StreamSerial

int Crosstales.NVorbis.IPacketProvider.StreamSerial
get

Gets the serial number associated with this stream.

Event Documentation

◆ ParameterChange

EventHandler<ParameterChangeEventArgs> Crosstales.NVorbis.IPacketProvider.ParameterChange

Occurs when the stream is about to change parameters.


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