C# Class MediaPortal.MusicPlayer.BASS.BassAudioEngine

Handles playback of Audio files and Internet streams via the BASS Audio Engine.
Inheritance: MediaPortal.Player.IPlayer
Afficher le fichier Open project: MediaPortal/MediaPortal-1 Class Usage Examples

Méthodes publiques

Свойство Type Description
_initialized bool

Méthodes publiques

Méthode Description
BASS_WASAPI_IsStarted ( ) : bool
BassAudioEngine ( ) : System
CanSeek ( ) : bool

Is Seeking enabled

Dispose ( ) : void

Release the Video Window

DisposeAndCleanUp ( ) : void

Dispose the BASS Audio engine. Free all BASS and Visualisation related resources

FreeBass ( ) : void

Free BASS, when not playing Audio content, as it might cause S/PDIF output stop working

GetChannelData ( int handle, float buffer, int lenght ) : int
GetDataFFT ( float buffer, int lenght ) : int
GetStreamTags ( ) : MediaPortal.TagReader.MusicTag

Returns the Tags of an AV Stream

InitBass ( ) : void

Init BASS, when a Audio file is to be played

NewMixerNeeded ( MediaPortal.MusicPlayer.BASS.MusicStream stream ) : bool

Checks, if a new Mixer would be needed, because of changes in Sample Rate or number of channels

Pause ( ) : void

Pause Playback

Play ( string filePath ) : bool

Starts Playback of the given file

Process ( ) : void

Process Method

RMS ( double &dbLevelL, double &dbLevelR ) : void

Return the dbLevel to be used by a VUMeter

SeekAbsolute ( double dTime ) : void

Seek Absoluet in the Stream

SeekAsolutePercentage ( int iPercentage ) : void

Seek Absolute Percentage

SeekForward ( int ms ) : bool

Seek Forward in the Stream

SeekRelative ( double dTime ) : void

Seek Relative in the Stream

SeekRelativePercentage ( int iPercentage ) : void

Seek Relative Percentage

SeekReverse ( int ms ) : bool

Seek Backwards within the stream

SeekToTimePosition ( int position ) : bool

Seek to a specific position in the stream

Stop ( ) : void

Stopping Playback

SwitchToDefaultPlaybackMode ( ) : void

Switch back to the default Playback Mode, whoch was saved before starting playback of a complete album

SwitchToGaplessPlaybackMode ( ) : void

Switches the Playback to Gapless Used, if playback of a complete Album is started

Private Methods

Méthode Description
ChannelIsActive ( int handle ) : BASSActive
ChannelPlay ( int handle, bool restart ) : bool
ChannelRemoveLink ( int handle, int chan ) : bool
ChannelSetLink ( int handle, int chan ) : bool
CommandThread ( ) : void
CreateCommandThread ( ) : void
GetCurrentStream ( ) : MediaPortal.MusicPlayer.BASS.MusicStream

Returns the Current Stream

GetSoundDevice ( ) : int

Get the Sound devive as set in the Configuartion

GetWasApiFormats ( ) : void

Detect the supported output formats for WASAPI

GetWasApiSpeakers ( ) : int

WASAPI doesnj't provide a way to ask the driver on the maximum of supported speakers. So we try to enumerate the channels and detect the attached speakers.

HandleBassError ( string methodName ) : void

Displays Information about a BASS Exception

HandleCueFile ( string &filePath, bool endOnly ) : bool

Parse the Cue file. Return a Fake Cue track and adjest the playback position within the file.

HandleSongEnded ( ) : void

Handle Stop of a song

InitAsio ( ) : bool

Initialises the Asio Device

InitDirectSoundDevice ( ) : bool

Initialise the DirectSound Device

InitWasapi ( ) : bool

Initialises the Wasapi Device

Initialize ( ) : void

Initialise the Visualisation Window and Load Decoder/DSP Plugins The BASS engine itself is not initialised at this stage, since it may cause S/PDIF for Movies not working on some systems.

OnAppFormDisposed ( object sender, EventArgs e ) : void

The Main Form is disposed, so dispose the player

OnMusicStreamMessage ( object sender, MediaPortal.MusicPlayer.BASS.MusicStream action ) : void

This Message is sent from a MusicStream

OnNewAction ( MediaPortal.GUI.Library.Action action ) : void
PlayInternal ( string filePath ) : bool

Called to start playback of next files internally, without makinbg use of g_player. This gives us the capability to achieve gapless playback.

SetCueTrackEndPosition ( MediaPortal.MusicPlayer.BASS.MusicStream stream, bool endOnly ) : void

Sets the End Position for the CUE Track

StopCommand ( ) : void
StreamCreate ( int freq, int chans, BASSFlag Flags, STREAMPROC proc, IntPtr user ) : int
StreamFree ( int handle ) : bool

Method Details

BASS_WASAPI_IsStarted() public méthode

public BASS_WASAPI_IsStarted ( ) : bool
Résultat bool

BassAudioEngine() public méthode

public BassAudioEngine ( ) : System
Résultat System

CanSeek() public méthode

Is Seeking enabled
public CanSeek ( ) : bool
Résultat bool

Dispose() public méthode

Release the Video Window
public Dispose ( ) : void
Résultat void

DisposeAndCleanUp() public méthode

Dispose the BASS Audio engine. Free all BASS and Visualisation related resources
public DisposeAndCleanUp ( ) : void
Résultat void

FreeBass() public méthode

Free BASS, when not playing Audio content, as it might cause S/PDIF output stop working
public FreeBass ( ) : void
Résultat void

GetChannelData() public méthode

public GetChannelData ( int handle, float buffer, int lenght ) : int
handle int
buffer float
lenght int
Résultat int

GetDataFFT() public méthode

public GetDataFFT ( float buffer, int lenght ) : int
buffer float
lenght int
Résultat int

GetStreamTags() public méthode

Returns the Tags of an AV Stream
public GetStreamTags ( ) : MediaPortal.TagReader.MusicTag
Résultat MediaPortal.TagReader.MusicTag

InitBass() public méthode

Init BASS, when a Audio file is to be played
public InitBass ( ) : void
Résultat void

NewMixerNeeded() public méthode

Checks, if a new Mixer would be needed, because of changes in Sample Rate or number of channels
public NewMixerNeeded ( MediaPortal.MusicPlayer.BASS.MusicStream stream ) : bool
stream MediaPortal.MusicPlayer.BASS.MusicStream
Résultat bool

Pause() public méthode

Pause Playback
public Pause ( ) : void
Résultat void

Play() public méthode

Starts Playback of the given file
public Play ( string filePath ) : bool
filePath string
Résultat bool

Process() public méthode

Process Method
public Process ( ) : void
Résultat void

RMS() public méthode

Return the dbLevel to be used by a VUMeter
public RMS ( double &dbLevelL, double &dbLevelR ) : void
dbLevelL double
dbLevelR double
Résultat void

SeekAbsolute() public méthode

Seek Absoluet in the Stream
public SeekAbsolute ( double dTime ) : void
dTime double
Résultat void

SeekAsolutePercentage() public méthode

Seek Absolute Percentage
public SeekAsolutePercentage ( int iPercentage ) : void
iPercentage int
Résultat void

SeekForward() public méthode

Seek Forward in the Stream
public SeekForward ( int ms ) : bool
ms int
Résultat bool

SeekRelative() public méthode

Seek Relative in the Stream
public SeekRelative ( double dTime ) : void
dTime double
Résultat void

SeekRelativePercentage() public méthode

Seek Relative Percentage
public SeekRelativePercentage ( int iPercentage ) : void
iPercentage int
Résultat void

SeekReverse() public méthode

Seek Backwards within the stream
public SeekReverse ( int ms ) : bool
ms int
Résultat bool

SeekToTimePosition() public méthode

Seek to a specific position in the stream
public SeekToTimePosition ( int position ) : bool
position int
Résultat bool

Stop() public méthode

Stopping Playback
public Stop ( ) : void
Résultat void

SwitchToDefaultPlaybackMode() public méthode

Switch back to the default Playback Mode, whoch was saved before starting playback of a complete album
public SwitchToDefaultPlaybackMode ( ) : void
Résultat void

SwitchToGaplessPlaybackMode() public méthode

Switches the Playback to Gapless Used, if playback of a complete Album is started
public SwitchToGaplessPlaybackMode ( ) : void
Résultat void

Property Details

_initialized public_oe static_oe property

public static bool _initialized
Résultat bool