Steamworks документация
ISteamMusic интерфейс
Функции за контролиране на възпроизвеждането на музика в Steam клиента.

This gives games the opportunity to do things like pause the music or lower the volume, when an important cut scene is shown, and start playing afterwards.

Вижте features/music_player за още информация.

Членски функции

Членските функции за ISteamMusic се повикват посредством функцията за глобален достъп SteamMusic().

BIsEnabled

bool BIsEnabled();
Checks if Steam Music is enabled.

Връща: bool
true if it is enabled; otherwise false.

BIsPlaying

bool BIsPlaying();
Checks if Steam Music is active. This does not necessarily a song is currently playing, it may be paused.

For finer grain control use GetPlaybackStatus.

Връща: bool
true if a song is currently playing, paused, or queued up to play; otherwise false.

GetPlaybackStatus

AudioPlayback_Status GetPlaybackStatus();
Gets the current status of the Steam Music player.

Връща: AudioPlayback_Status

GetVolume

float GetVolume();
Gets the current volume of the Steam Music player.

Връща: float
The volume is returned as a percentage between 0.0 and 1.0.

Пауза

void Pause();
Pause the Steam Music player.

Пускане

void Play();
Have the Steam Music player resume playing.

PlayNext

void PlayNext();
Have the Steam Music player skip to the next song.

PlayPrevious

void PlayPrevious();
Have the Steam Music player play the previous song.

SetVolume

void SetVolume( float flVolume );
ИмеТипОписание
flVolumefloatThe volume percentage to set from 0.0 to 1.0.

Sets the volume of the Steam Music player.

Обратни повиквания

Това са обратни повиквания, които могат да бъдат задействани чрез повикване на SteamAPI_RunCallbacks. Many of these will be fired directly in response to the member functions of ISteamMusic.

PlaybackStatusHasChanged_t


Това обратно повикване няма полета.

VolumeHasChanged_t



ИмеТипОписание
m_flNewVolumefloat

Изброявания

Това са изброявания, които са определени за използване с ISteamMusic.

AudioPlayback_Status

Specifies the current playback status.

ИмеСтойностОписание
AudioPlayback_Undefined0The Steam music interface probably isn't enabled.
AudioPlayback_Playing1Steam Music is currently playing.
AudioPlayback_Paused2Steam Music is currently paused.
AudioPlayback_Idle3Steam Music is currently stopped.

Константи

Това са константи, които са определени за използване с ISteamMusic.

ИмеТипСтойностОписание
STEAMMUSIC_INTERFACE_VERSIONconst char *"STEAMMUSIC_INTERFACE_VERSION001"
  翻译: