Plays the sound.

Namespace:  SGP.Baltie
Assembly:  SGPRTL (in SGPRTL.dll)
Version: 1.2.3019.18825

Syntax

C#
[DefaultMethodAttribute]
[CLSCompliantAttribute(false)]
public MusicSegmentState PlaySound(
	string fileName,
	bool force
)

Parameters

fileName
Type: System..::.String
The sound file name.
force
Type: System..::.Boolean
Forces the playback.

Return Value

A playback state (MusicSegmentState).

Remarks

When the playback is not forced (force==trueTruetruetrue (True in Visual Basic)), plays the sound only if Baltie is visible (Visible)and sounds are enabled (SoundsEnabled), or the sounds are enabled even if he is invisible (SoundsEnabledIfNotVisible). The sound is also not played, when Baltie is superspeedy (IsSuperSpeedy). The sound is played in space at the Baltie's current position (3D sound).

Exceptions

ExceptionCondition
System..::.ArgumentNullException fileName is nullNothingnullptra null reference (Nothing in Visual Basic).

See Also