C# Class javazoom.jl.decoder.Bitstream

The Bistream class is responsible for parsing an MPEG audio bitstream. * REVIEW: much of the parsing currently occurs in the various decoders. This should be moved into this class and associated inner classes.
Inheritance: BitstreamErrors
Afficher le fichier Open project: RHY3756547/FreeSO Class Usage Examples

Méthodes publiques

Méthode Description
close ( ) : void
closeFrame ( ) : void
get_bits ( int number_of_bits ) : int

Read bits from buffer into the lower bits of an unsigned int. The LSB contains the latest read bit of the stream. (1 <= number_of_bits <= 16)

isSyncCurrentPosition ( int syncmode ) : bool

Determines if the next 4 bytes of the stream represent a frame header.

isSyncMark ( int headerstring, int syncmode, int word ) : bool
readBits ( int n ) : int
readCheckedBits ( int n ) : int
unreadFrame ( ) : void

Unreads the bytes read from the frame. @throws BitstreamException

Méthodes protégées

Méthode Description
newBitstreamException ( int errorcode ) : BitstreamException
newBitstreamException ( int errorcode, System throwable ) : BitstreamException

Private Methods

Méthode Description
Bitstream ( BackStream in_Renamed ) : System

Construct a IBitstream that reads data from a given InputStream. *

InitBlock ( ) : void
nextFrame ( ) : void

*

parse_frame ( ) : void

Parses the data previously read with read_frame_data().

readBytes ( sbyte b, int offs, int len ) : int

Simlar to readFully, but doesn't throw exception when EOF is reached.

readFrame ( ) : Header

Reads and parses the next frame from the input source.

readFully ( sbyte b, int offs, int len ) : void

Reads the exact number of bytes from the source input stream into a byte array. *

readNextFrame ( ) : Header
read_frame_data ( int bytesize ) : void

Reads the data for the next frame. The frame is not parsed until parse frame is called.

set_syncword ( int syncword0 ) : void

Set the word we want to sync the header to. In Big-Endian byte order

syncHeader ( sbyte syncmode ) : int

Get next 32 bits from bitstream. They are stored in the headerstring. syncmod allows Synchro flag ID The returned value is False at the end of stream.

Method Details

close() public méthode

public close ( ) : void
Résultat void

closeFrame() public méthode

public closeFrame ( ) : void
Résultat void

get_bits() public méthode

Read bits from buffer into the lower bits of an unsigned int. The LSB contains the latest read bit of the stream. (1 <= number_of_bits <= 16)
public get_bits ( int number_of_bits ) : int
number_of_bits int
Résultat int

isSyncCurrentPosition() public méthode

Determines if the next 4 bytes of the stream represent a frame header.
public isSyncCurrentPosition ( int syncmode ) : bool
syncmode int
Résultat bool

isSyncMark() public méthode

public isSyncMark ( int headerstring, int syncmode, int word ) : bool
headerstring int
syncmode int
word int
Résultat bool

newBitstreamException() protected méthode

protected newBitstreamException ( int errorcode ) : BitstreamException
errorcode int
Résultat BitstreamException

newBitstreamException() protected méthode

protected newBitstreamException ( int errorcode, System throwable ) : BitstreamException
errorcode int
throwable System
Résultat BitstreamException

readBits() public méthode

public readBits ( int n ) : int
n int
Résultat int

readCheckedBits() public méthode

public readCheckedBits ( int n ) : int
n int
Résultat int

unreadFrame() public méthode

Unreads the bytes read from the frame. @throws BitstreamException
public unreadFrame ( ) : void
Résultat void