當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Transform::toInt16BE方法代碼示例

本文整理匯總了PHP中Transform::toInt16BE方法的典型用法代碼示例。如果您正苦於以下問題:PHP Transform::toInt16BE方法的具體用法?PHP Transform::toInt16BE怎麽用?PHP Transform::toInt16BE使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Transform的用法示例。


在下文中一共展示了Transform::toInt16BE方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __toString

 /**
  * Returns the frame raw data.
  *
  * @return string
  */
 public function __toString()
 {
   $data = $this->_device . "\0";
   foreach ($this->_adjustments as $channel) {
     $data .= Transform::toInt8($channel[self::channelType]) .
       Transform::toInt16BE($channel[self::volumeAdjustment] * 512);
     if (abs($channel[self::peakVolume]) <= 0xff)
       $data .= Transform::toInt8(8) .
         Transform::toUInt8($channel[self::peakVolume]);
     else if (abs($channel[self::peakVolume]) <= 0xffff)
       $data .= Transform::toInt8(16) .
         Transform::toUInt16BE($channel[self::peakVolume]);
     else if (abs($channel[self::peakVolume]) <= 0xffffffff)
       $data .= Transform::toInt8(32) .
         Transform::toUInt32BE($channel[self::peakVolume]);
     else
       $data .= Transform::toInt8(64) .
         Transform::toInt64BE($channel[self::peakVolume]); // UInt64
   }
   $this->setData($data);
   return parent::__toString();
 }
開發者ID:rtdean93,項目名稱:therock,代碼行數:27,代碼來源:RVA2.php

示例2: __toString

 /**
  * Returns the frame raw data.
  *
  * @return string
  */
 public function __toString()
 {
   $data = Transform::toInt8($this->_interpolation) . $this->_device . "\0";
   foreach ($this->_adjustments as $frequency => $adjustment)
     $data .= Transform::toUInt16BE($frequency * 2) .
       Transform::toInt16BE($adjustment * 512);
   $this->setData($data);
   return parent::__toString();
 }
開發者ID:rtdean93,項目名稱:therock,代碼行數:14,代碼來源:EQU2.php

示例3: __toString

 /**
  * Returns the frame raw data.
  *
  * @return string
  */
 public function __toString()
 {
     $data = $this->_device . "";
     foreach ($this->_adjustments as $channel) {
         $data .= Transform::toInt8($channel["channelType"]) . Transform::toInt16BE($channel["volumeAdjustment"]);
         if ($channel["peakVolume"] < 255) {
             $data .= Transform::toInt8(8) . Transform::toInt8($channel["peakVolume"]);
         } else {
             if ($channel["peakVolume"] < 65535) {
                 $data .= Transform::toInt8(16) . Transform::toUInt16BE($channel["peakVolume"]);
             } else {
                 if ($channel["peakVolume"] < 4294967295) {
                     $data .= Transform::toInt8(32) . Transform::toUInt32BE($channel["peakVolume"]);
                 } else {
                     $data .= Transform::toInt8(64) . Transform::toUInt64BE($channel["peakVolume"]);
                 }
             }
         }
     }
     $this->setData($data);
     return parent::__toString();
 }
開發者ID:AsteriaGamer,項目名稱:steamdriven-kohana,代碼行數:27,代碼來源:RVA2.php

示例4: __toString

 /**
  * Returns the frame raw data.
  *
  * @return string
  */
 public function __toString()
 {
     $this->setData($this->_owner . "" . Transform::toInt16BE($this->_previewStart) . Transform::toInt16BE($this->_previewLength) . $this->_encryptionInfo);
     return parent::__toString();
 }
開發者ID:AsteriaGamer,項目名稱:steamdriven-kohana,代碼行數:10,代碼來源:AENC.php

示例5: __toString

 /**
  * Returns the frame raw data.
  *
  * @return string
  */
 public function __toString()
 {
     $this->setData(Transform::toInt16BE($this->_reverbLeft) . Transform::toInt16BE($this->_reverbRight) . Transform::toInt8($this->_reverbBouncesLeft) . Transform::toInt8($this->_reverbBouncesRight) . Transform::toInt8($this->_reverbFeedbackLtoL) . Transform::toInt8($this->_reverbFeedbackLtoR) . Transform::toInt8($this->_reverbFeedbackRtoR) . Transform::toInt8($this->_reverbFeedbackRtoL) . Transform::toInt8($this->_premixLtoR) . Transform::toInt8($this->_premixRtoL));
     return parent::__toString();
 }
開發者ID:AsteriaGamer,項目名稱:steamdriven-kohana,代碼行數:10,代碼來源:RVRB.php

示例6: __toString

 /**
  * Returns the frame raw data.
  *
  * @return string
  */
 public function __toString()
 {
     $data = Transform::toInt8(16);
     foreach ($this->_adjustments as $frequency => $adjustment) {
         $data .= Transform::toInt16BE($adjustment > 0 ? $frequency | 0x2000 : $frequency & ~0x2000) . Transform::toInt16BE(abs($adjustment));
     }
     $this->setData($data);
     return parent::__toString();
 }
開發者ID:AsteriaGamer,項目名稱:steamdriven-kohana,代碼行數:14,代碼來源:EQUA.php


注:本文中的Transform::toInt16BE方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。