PHP8 openal_source_get — 檢索一個(gè) OpenAL 源屬性

2023-10-23 18:11 更新

(PECL openal >= 0.1.0)

openal_source_get — 檢索一個(gè) OpenAL 源屬性

說明

openal_source_get(resource $source, int $property): mixed

參數(shù)

source

一個(gè) Open AL(Source) 資源,之前由 openal_source_create() 創(chuàng)建。

property

要獲取的屬性,可以是以下之一:AL_SOURCE_RELATIVE(整數(shù)),AL_SOURCE_STATE(整數(shù)),AL_PITCH(浮點(diǎn)數(shù)),AL_GAIN(浮點(diǎn)數(shù)),AL_MIN_GAIN(浮點(diǎn)數(shù)),AL_MAX_GAIN(浮點(diǎn)數(shù)),AL_MAX_DISTANCE(浮點(diǎn)數(shù)),AL_ROLLOFF_FACTOR(浮點(diǎn)數(shù)),AL_CONE_OUTER_GAIN(浮點(diǎn)數(shù)),AL_CONE_INNER_ANGLE(浮點(diǎn)數(shù)),AL_CONE_OUTER_ANGLE(浮點(diǎn)數(shù)),AL_REFERENCE_DISTANCE(浮點(diǎn)數(shù)),AL_POSITION(數(shù)組[浮點(diǎn)數(shù),浮點(diǎn)數(shù),浮點(diǎn)數(shù)]),AL_VELOCITY(數(shù)組[浮點(diǎn)數(shù),浮點(diǎn)數(shù),浮點(diǎn)數(shù)]),AL_DIRECTION(數(shù)組[浮點(diǎn)數(shù),浮點(diǎn)數(shù),浮點(diǎn)數(shù)])。

返回值

返回與正在檢索的屬性相關(guān)聯(lián)的類型,或者在失敗時(shí)返回 false。

參見

  • openal_source_create() - 生成一個(gè)源資源。
  • openal_source_set() - 設(shè)置源屬性。
  • openal_source_play() - 開始播放源。


以上內(nèi)容是否對(duì)您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號(hào)
微信公眾號(hào)

編程獅公眾號(hào)