当前位置: 首页>>代码示例>>PHP>>正文


PHP Transform::toUInt16BE方法代码示例

本文整理汇总了PHP中Transform::toUInt16BE方法的典型用法代码示例。如果您正苦于以下问题:PHP Transform::toUInt16BE方法的具体用法?PHP Transform::toUInt16BE怎么用?PHP Transform::toUInt16BE使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Transform的用法示例。


在下文中一共展示了Transform::toUInt16BE方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __toString

 /**
  * Returns the box raw data.
  *
  * @return string
  */
 public function __toString($data = "")
 {
   return parent::__toString(Transform::toUInt16BE(count($this->_boxes)));
 }
开发者ID:rtdean93,项目名称:therock,代码行数:9,代码来源:IINF.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 . "\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

示例4: __toString

 /**
  * Returns the frame raw data.
  *
  * @return string
  */
 public function __toString()
 {
     $flags = 0;
     if ($this->_adjustments["right"] > 0) {
         $flags = $flags | 0x20;
     }
     if ($this->_adjustments["left"] > 0) {
         $flags = $flags | 0x10;
     }
     $data = Transform::toInt8(16) . Transform::toUInt16BE(abs($this->_adjustments["right"])) . Transform::toUInt16BE(abs($this->_adjustments["left"])) . Transform::toUInt16BE(abs($this->_adjustments["peakRight"])) . Transform::toUInt16BE(abs($this->_adjustments["peakLeft"]));
     if (isset($this->_adjustments["rightBack"]) && isset($this->_adjustments["leftBack"]) && isset($this->_adjustments["peakRightBack"]) && isset($this->_adjustments["peakLeftBack"])) {
         if ($this->_adjustments["rightBack"] > 0) {
             $flags = $flags | 0x8;
         }
         if ($this->_adjustments["leftBack"] > 0) {
             $flags = $flags | 0x4;
         }
         $data .= Transform::toUInt16BE(abs($this->_adjustments["rightBack"])) . Transform::toUInt16BE(abs($this->_adjustments["leftBack"])) . Transform::toUInt16BE(abs($this->_adjustments["peakRightBack"])) . Transform::toUInt16BE(abs($this->_adjustments["peakLeftBack"]));
     }
     if (isset($this->_adjustments["center"]) && isset($this->_adjustments["peakCenter"])) {
         if ($this->_adjustments["center"] > 0) {
             $flags = $flags | 0x2;
         }
         $data .= Transform::toUInt16BE(abs($this->_adjustments["center"])) . Transform::toUInt16BE(abs($this->_adjustments["peakCenter"]));
     }
     if (isset($this->_adjustments["bass"]) && isset($this->_adjustments["peakBass"])) {
         if ($this->_adjustments["bass"] > 0) {
             $flags = $flags | 0x1;
         }
         $data .= Transform::toUInt16BE(abs($this->_adjustments["bass"])) . Transform::toUInt16BE(abs($this->_adjustments["peakBass"]));
     }
     $this->setData(Transform::toInt8($flags) . $data);
     return parent::__toString();
 }
开发者ID:AsteriaGamer,项目名称:steamdriven-kohana,代码行数:39,代码来源:RVAD.php

示例5: __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

示例6: __toString

 /**
  * Returns the header raw data.
  *
  * @return string
  */
 public function __toString()
 {
     /* ID3v2.3.0 ExtendedHeader */
     if (isset($this->_options["version"]) && $this->_options["version"] < 4) {
         return Transform::toUInt32BE($this->_size) . Transform::toUInt16BE($this->hasFlag(self::CRC32) ? 0x8000 : 0) . Transform::toUInt32BE($this->_padding) . ($this->hasFlag(self::CRC32) ? Transform::toUInt32BE($this->_crc) : "");
     } else {
         return Transform::toUInt32BE($this->encodeSynchsafe32($this->_size)) . Transform::toInt8(1) . Transform::toInt8($this->_flags) . ($this->hasFlag(self::UPDATE) ? "" : "") . ($this->hasFlag(self::CRC32) ? Transform::toInt8(5) . Transform::toInt8($this->_crc & 0xf0000000 >> 28 & 0xf) . Transform::toUInt32BE(encodeSynchsafe32($this->_crc)) : "") . ($this->hasFlag(self::RESTRICTED) ? Transform::toInt8(1) . Transform::toInt8($this->_restrictions) : "");
     }
 }
开发者ID:AsteriaGamer,项目名称:steamdriven-kohana,代码行数:14,代码来源:ExtendedHeader.php

示例7: __toString

 /**
  * Returns the frame raw data.
  *
  * @return string
  */
 public function __toString()
 {
   $this->setData
     ($this->_owner . "\0" . Transform::toUInt16BE($this->_previewStart) .
      Transform::toUInt16BE($this->_previewLength) . $this->_encryptionInfo);
   return parent::__toString();
 }
开发者ID:rtdean93,项目名称:therock,代码行数:12,代码来源:AENC.php

示例8: __toString

 /**
  * Returns the frame raw data.
  *
  * @return string
  */
 public function __toString()
 {
   $flags = 0;
   if ($this->_adjustments[self::right] > 0)
     $flags = $flags | 0x1;
   if ($this->_adjustments[self::left] > 0)
     $flags = $flags | 0x2;
   $data = Transform::toInt8(16) . 
     Transform::toUInt16BE(abs($this->_adjustments[self::right])) .
     Transform::toUInt16BE(abs($this->_adjustments[self::left])) .
     Transform::toUInt16BE(abs($this->_adjustments[self::peakRight])) .
     Transform::toUInt16BE(abs($this->_adjustments[self::peakLeft]));
   
   if (isset($this->_adjustments[self::rightBack]) &&
       isset($this->_adjustments[self::leftBack]) &&
       isset($this->_adjustments[self::peakRightBack]) &&
       isset($this->_adjustments[self::peakLeftBack])) {
     if ($this->_adjustments[self::rightBack] > 0)
       $flags = $flags | 0x4;
     if ($this->_adjustments[self::leftBack] > 0)
       $flags = $flags | 0x8;
     $data .= 
       Transform::toUInt16BE(abs($this->_adjustments[self::rightBack])) .
       Transform::toUInt16BE(abs($this->_adjustments[self::leftBack])) .
       Transform::toUInt16BE(abs($this->_adjustments[self::peakRightBack])) .
       Transform::toUInt16BE(abs($this->_adjustments[self::peakLeftBack]));
   }
   
   if (isset($this->_adjustments[self::center]) &&
       isset($this->_adjustments[self::peakCenter])) {
     if ($this->_adjustments[self::center] > 0)
       $flags = $flags | 0x10;
     $data .= 
       Transform::toUInt16BE(abs($this->_adjustments[self::center])) .
       Transform::toUInt16BE(abs($this->_adjustments[self::peakCenter]));
   }
   
   if (isset($this->_adjustments[self::bass]) &&
       isset($this->_adjustments[self::peakBass])) {
     if ($this->_adjustments[self::bass] > 0)
       $flags = $flags | 0x20;
     $data .= 
       Transform::toUInt16BE(abs($this->_adjustments[self::bass])) .
       Transform::toUInt16BE(abs($this->_adjustments[self::peakBass]));
   }
   $this->setData(Transform::toInt8($flags) . $data);
   return parent::__toString();
 }
开发者ID:rtdean93,项目名称:therock,代码行数:53,代码来源:RVAD.php

示例9: __toString

 /**
  * Returns the header raw data.
  *
  * @return string
  */
 public function __toString()
 {
   /* ID3v2.3.0 ExtendedHeader */
   if ($this->getOption("version", 4) < 4) {
     return Transform::toUInt32BE($this->_size) .
       Transform::toUInt16BE($this->hasFlag(self::CRC32) ? 0x8000 : 0) .
       Transform::toUInt32BE($this->_padding) .
       ($this->hasFlag(self::CRC32) ? Transform::toUInt32BE($this->_crc) : "");
   }
   
   /* ID3v2.4.0 ExtendedHeader */
   else {
     return Transform::toUInt32BE($this->encodeSynchsafe32($this->_size)) .
       Transform::toInt8(1) . Transform::toInt8($this->_flags) .
       ($this->hasFlag(self::UPDATE) ? "\0" : "") .
       ($this->hasFlag(self::CRC32) ? Transform::toInt8(5) .
        Transform::toInt8($this->_crc & 0xf0000000 >> 28 & 0xf /*eq >>> 28*/) .
        Transform::toUInt32BE($this->encodeSynchsafe32($this->_crc)) : "") .
       ($this->hasFlag(self::RESTRICTED) ? 
          Transform::toInt8(1) . Transform::toInt8($this->_restrictions) : "");
   }
 }
开发者ID:rtdean93,项目名称:therock,代码行数:27,代码来源:ExtendedHeader.php

示例10: __toString

 /**
  * Returns the frame raw data.
  *
  * @return string
  */
 public function __toString()
 {
   $data = Transform::toInt8(16);
   foreach ($this->_adjustments as $frequency => $adjustment)
     $data .= Transform::toUInt16BE
       ($adjustment > 0 ? $frequency | 0x8000 : $frequency & ~0x8000) .
       Transform::toUInt16BE(abs($adjustment));
   $this->setData($data);
   return parent::__toString();
 }
开发者ID:rtdean93,项目名称:therock,代码行数:15,代码来源:EQUA.php

示例11: __toString

 /**
  * Returns the frame raw data.
  *
  * @return string
  */
 public function __toString()
 {
   $this->setData
     (Transform::toUInt16BE($this->_reverbLeft) .
      Transform::toUInt16BE($this->_reverbRight) .
      Transform::toUInt8($this->_reverbBouncesLeft) .
      Transform::toUInt8($this->_reverbBouncesRight) .
      Transform::toUInt8($this->_reverbFeedbackLtoL) .
      Transform::toUInt8($this->_reverbFeedbackLtoR) .
      Transform::toUInt8($this->_reverbFeedbackRtoR) .
      Transform::toUInt8($this->_reverbFeedbackRtoL) .
      Transform::toUInt8($this->_premixLtoR) .
      Transform::toUInt8($this->_premixRtoL));
   return parent::__toString();
 }
开发者ID:rtdean93,项目名称:therock,代码行数:20,代码来源:RVRB.php

示例12: __toString

 /**
  * Returns the box raw data.
  *
  * @return string
  */
 public function __toString($data = "")
 {
   return parent::__toString
     (Transform::toUInt16BE
      (((ord($this->_language[0]) - 0x60) << 10) |
       ((ord($this->_language[1]) - 0x60) << 5) |
         ord($this->_language[2]) - 0x60) . $this->_tag);
 }
开发者ID:rtdean93,项目名称:therock,代码行数:13,代码来源:ID32.php

示例13: __toString

  /**
   * Returns the frame raw data.
   *
   * @return string
   */
  public function __toString()
  {
    /* ID3v2.3.0 Flags; convert from 2.4.0 format */
    if ($this->getOption("version", 4) < 4) {
      $flags = 0;
      if ($this->hasFlag(self::DISCARD_ON_TAGCHANGE))
        $flags = $flags | 0x8000;
      if ($this->hasFlag(self::DISCARD_ON_FILECHANGE))
        $flags = $flags | 0x4000;
      if ($this->hasFlag(self::READ_ONLY))
        $flags = $flags | 0x2000;
      if ($this->hasFlag(self::COMPRESSION))
        $flags = $flags | 0x80;
      if ($this->hasFlag(self::ENCRYPTION))
        $flags = $flags | 0x40;
      if ($this->hasFlag(self::GROUPING_IDENTITY))
        $flags = $flags | 0x20;
    }

    /* ID3v2.4.0 Flags */
    else
      $flags = $this->_flags;
    
    $size = $this->_size;
    if ($this->getOption("version", 4) < 4)
      $data = $this->_data;
    else {
      $data = $this->encodeUnsynchronisation($this->_data);
      if (($dataLength = strlen($data)) != $size) {
        $size = 4 + $dataLength;
        $data = Transform::toUInt32BE($this->encodeSynchsafe32($this->_size)) .
          $data;
        $flags |= self::DATA_LENGTH_INDICATOR | self::UNSYNCHRONISATION;
        $this->setOption("unsyncronisation", true);
      }
    }
    return Transform::toString8(substr($this->_identifier, 0, 4), 4) .
      Transform::toUInt32BE($this->encodeSynchsafe32($size)) .
      Transform::toUInt16BE($flags) . $data;
  }
开发者ID:rtdean93,项目名称:therock,代码行数:45,代码来源:Frame.php

示例14: __toString

 /**
  * Returns the frame raw data.
  *
  * @return string
  */
 public function __toString()
 {
     /* ID3v2.3.0 Flags; convert from 2.4.0 format */
     if (isset($this->_options["version"]) && $this->_options["version"] < 4) {
         $flags = 0;
         if ($this->hasFlag(self::DISCARD_ON_TAGCHANGE)) {
             $flags = $flags | 0x8000;
         }
         if ($this->hasFlag(self::DISCARD_ON_FILECHANGE)) {
             $flags = $flags | 0x4000;
         }
         if ($this->hasFlag(self::READ_ONLY)) {
             $flags = $flags | 0x2000;
         }
         if ($this->hasFlag(self::COMPRESSION)) {
             $flags = $flags | 0x80;
         }
         if ($this->hasFlag(self::ENCRYPTION)) {
             $flags = $flags | 0x40;
         }
         if ($this->hasFlag(self::GROUPING_IDENTITY)) {
             $flags = $flags | 0x20;
         }
     } else {
         $flags = $this->_flags;
     }
     return Transform::toString8(substr($this->_identifier, 0, 4), 4) . Transform::toUInt32BE($this->encodeSynchsafe32($this->_size)) . Transform::toUInt16BE($flags) . $this->_data;
 }
开发者ID:AsteriaGamer,项目名称:steamdriven-kohana,代码行数:33,代码来源:Frame.php


注:本文中的Transform::toUInt16BE方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。