C# 클래스 MediaPortal.MusicPlayer.BASS.BassAudioEngine

Handles playback of Audio files and Internet streams via the BASS Audio Engine.
상속: MediaPortal.Player.IPlayer
파일 보기 프로젝트 열기: MediaPortal/MediaPortal-1 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
_initialized bool

공개 메소드들

메소드 설명
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

비공개 메소드들

메소드 설명
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

메소드 상세

BASS_WASAPI_IsStarted() 공개 메소드

public BASS_WASAPI_IsStarted ( ) : bool
리턴 bool

BassAudioEngine() 공개 메소드

public BassAudioEngine ( ) : System
리턴 System

CanSeek() 공개 메소드

Is Seeking enabled
public CanSeek ( ) : bool
리턴 bool

Dispose() 공개 메소드

Release the Video Window
public Dispose ( ) : void
리턴 void

DisposeAndCleanUp() 공개 메소드

Dispose the BASS Audio engine. Free all BASS and Visualisation related resources
public DisposeAndCleanUp ( ) : void
리턴 void

FreeBass() 공개 메소드

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

GetChannelData() 공개 메소드

public GetChannelData ( int handle, float buffer, int lenght ) : int
handle int
buffer float
lenght int
리턴 int

GetDataFFT() 공개 메소드

public GetDataFFT ( float buffer, int lenght ) : int
buffer float
lenght int
리턴 int

GetStreamTags() 공개 메소드

Returns the Tags of an AV Stream
public GetStreamTags ( ) : MediaPortal.TagReader.MusicTag
리턴 MediaPortal.TagReader.MusicTag

InitBass() 공개 메소드

Init BASS, when a Audio file is to be played
public InitBass ( ) : void
리턴 void

NewMixerNeeded() 공개 메소드

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
리턴 bool

Pause() 공개 메소드

Pause Playback
public Pause ( ) : void
리턴 void

Play() 공개 메소드

Starts Playback of the given file
public Play ( string filePath ) : bool
filePath string
리턴 bool

Process() 공개 메소드

Process Method
public Process ( ) : void
리턴 void

RMS() 공개 메소드

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

SeekAbsolute() 공개 메소드

Seek Absoluet in the Stream
public SeekAbsolute ( double dTime ) : void
dTime double
리턴 void

SeekAsolutePercentage() 공개 메소드

Seek Absolute Percentage
public SeekAsolutePercentage ( int iPercentage ) : void
iPercentage int
리턴 void

SeekForward() 공개 메소드

Seek Forward in the Stream
public SeekForward ( int ms ) : bool
ms int
리턴 bool

SeekRelative() 공개 메소드

Seek Relative in the Stream
public SeekRelative ( double dTime ) : void
dTime double
리턴 void

SeekRelativePercentage() 공개 메소드

Seek Relative Percentage
public SeekRelativePercentage ( int iPercentage ) : void
iPercentage int
리턴 void

SeekReverse() 공개 메소드

Seek Backwards within the stream
public SeekReverse ( int ms ) : bool
ms int
리턴 bool

SeekToTimePosition() 공개 메소드

Seek to a specific position in the stream
public SeekToTimePosition ( int position ) : bool
position int
리턴 bool

Stop() 공개 메소드

Stopping Playback
public Stop ( ) : void
리턴 void

SwitchToDefaultPlaybackMode() 공개 메소드

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

SwitchToGaplessPlaybackMode() 공개 메소드

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

프로퍼티 상세

_initialized 공개적으로 정적으로 프로퍼티

public static bool _initialized
리턴 bool