PlayerEx Class |
Namespace: Alvas.Audio
The PlayerEx type exposes the following members.
Name | Description | |
---|---|---|
![]() | PlayerEx | Initializes a new instance of the PlayerEx class |
![]() | PlayerEx(Boolean) | Initializes a new instance of the PlayerEx class |
Name | Description | |
---|---|---|
![]() | AddData |
Adds the audio data for playing.
|
![]() ![]() | AddMixData |
Adds and mixes the audio data for playing.
|
![]() | ClosePlayer |
Closes the player.
|
![]() | CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.) |
![]() | Dispose | Releases all resources used by the Component. (Inherited from Component.) |
![]() | Equals | (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.) |
![]() | GetMixerNo |
Returns mixer number
|
![]() ![]() ![]() | GetPlayerName |
Returns player name by index.
|
![]() | GetPosition |
Gets the current sound position.
|
![]() | GetQueueLength |
Gets audio data queue length
|
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | GetVolume |
Gets the volume.
|
![]() | InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.) |
![]() | OpenPlayer |
Opens the player.
|
![]() | PausePlay |
Pauses the play.
|
![]() | QueueClear |
Clears audio data queue
|
![]() | ResumePlay |
Resumes the play.
|
![]() | SetVolume |
Sets the volume.
|
![]() | StartPlay |
Plays the audio data.
|
![]() | ToString | Returns a String containing the name of the Component, if any. This method should not be overridden. (Inherited from Component.) |
Name | Description | |
---|---|---|
![]() | BufferSizeInMS |
Gets or sets the player buffer size in milliseconds. By default 500 ms.
|
![]() | Container | Gets the IContainer that contains the Component. (Inherited from Component.) |
![]() | Format |
Gets pointer to audio format.
|
![]() ![]() | PlayerCount |
Gets the number of audio players installed in system.
|
![]() | PlayerID |
Gets or sets the current player. If -1 the system uses suitable player.
|
![]() | Site | (Inherited from Component.) |
![]() | State |
Gets the player state.
|
![]() | VolumeScale |
Scales the volume of audio data. 100 is normal volume, 50 is reduced by half, 200 is increased in 2 times
|
Name | Description | |
---|---|---|
![]() | Close |
Occurs when the player is closed after playing.
|
![]() | Disposed | Occurs when the component is disposed by a call to the Dispose method. (Inherited from Component.) |
![]() | Done |
Occurs when the player returns next portion of the played data.
|
![]() | Open |
Occurs when the player is opened for playing.
|
public static void TestPlayerEx() { PlayerEx plex = new PlayerEx(); plex.Done += new PlayerEx.DoneEventHandler(plex_Done); Mp3Reader mr = new Mp3Reader(File.OpenRead("in.mp3")); IntPtr format = mr.ReadFormat(); byte[] data = mr.ReadData(); mr.Close(); plex.OpenPlayer(format); plex.AddData(data); plex.StartPlay(); } static void plex_Done(object sender, DoneEventArgs e) { if (e.IsEndPlaying) { ((PlayerEx)sender).ClosePlayer(); } }