Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# Lamp::SoundReader Class Reference

サウンドリーダ More...

`#include <SoundReader.h>`

Inheritance diagram for Lamp::SoundReader:

List of all members.

## Public Member Functions
| SoundReader ()
| コンストラクタ
virtual | ~SoundReader ()
| デストラクタ
virtual u_int | getSize () const=0
| サイズの取得
virtual int | getSample () const=0
| サンプル数の取得
virtual int | getChannel () const=0
| チャンネル数の取得
virtual int | getBit () const=0
| ビット数の取得
virtual const String & | getComment ()=0
| コメントの取得
virtual float | getLength () const
| 長さの取得
virtual int | getOneSecondBytes () const
| 1秒のバイト数取得
virtual float | byteToTime (u_int byte) const
| バイト数から時間への変換
virtual u_int | timeToByte (float time) const
| 時間からバイト数への変換
virtual void | setCursor (u_int cursor)=0
| 位置の設定
virtual u_int | getCursor ()=0
| 位置の取得
virtual bool | readHeader ()=0
| ヘッダ読み込み
virtual int | read (void *buffer, u_int size)=0
| 読み込み

## Detailed Description

サウンドリーダ

Definition at line 34 of file SoundReader.h.

## Member Function Documentation

virtual float Lamp::SoundReader::byteToTime | ( | u_int | byte | ) | const`[inline, virtual]`

  | バイト数から時間への変換 Parameters:
  byte | バイト数
Returns: 秒単位の時間 Definition at line 97 of file SoundReader.h. References Assert, getOneSecondBytes(), and getSize(). Referenced by getLength().

virtual int Lamp::SoundReader::getBit | ( |  | ) | const`[pure virtual]`

| ビット数の取得 Returns: ビット数 Implemented in Lamp::OggVorbisReader, and Lamp::WaveReader. Referenced by getOneSecondBytes().

virtual int Lamp::SoundReader::getChannel | ( |  | ) | const`[pure virtual]`

| チャンネル数の取得 Returns: チャンネル数 Implemented in Lamp::OggVorbisReader, and Lamp::WaveReader. Referenced by getOneSecondBytes().

virtual const String& Lamp::SoundReader::getComment | ( |  | ) | `[pure virtual]`

| コメントの取得 Returns: コメント Implemented in Lamp::OggVorbisReader, and Lamp::WaveReader.

virtual u_int Lamp::SoundReader::getCursor | ( |  | ) | `[pure virtual]`

| 位置の取得 Returns: 位置 Implemented in Lamp::OggVorbisReader, and Lamp::WaveReader. Referenced by Lamp::StreamPlayer::writeStream().

virtual float Lamp::SoundReader::getLength | ( |  | ) | const`[inline, virtual]`

| 長さの取得 Returns: 秒単位の長さ Definition at line 82 of file SoundReader.h. References byteToTime(), and getSize(). Referenced by timeToByte().

virtual int Lamp::SoundReader::getOneSecondBytes | ( |  | ) | const`[inline, virtual]`

| 1秒のバイト数取得 Returns: 1秒のバイト数 Definition at line 88 of file SoundReader.h. References getBit(), getChannel(), and getSample(). Referenced by byteToTime(), and timeToByte().

virtual int Lamp::SoundReader::getSample | ( |  | ) | const`[pure virtual]`

| サンプル数の取得 Returns: サンプル数 Implemented in Lamp::OggVorbisReader, and Lamp::WaveReader. Referenced by getOneSecondBytes().

virtual u_int Lamp::SoundReader::getSize | ( |  | ) | const`[pure virtual]`

| サイズの取得 Returns: サイズ Implemented in Lamp::OggVorbisReader, and Lamp::WaveReader. Referenced by byteToTime(), getLength(), Lamp::StreamSound3D::getSize(), and Lamp::StreamSound::getSize().

virtual int Lamp::SoundReader::read | ( | void * | buffer,
|  | u_int | size
| ) | `[pure virtual]`

  | 読み込み Parameters:
  buffer | 読み込みバッファ
  size | 読み込みサイズ
Returns: 読み込んだサイズ。終端なら0、失敗すれば-1 Implemented in Lamp::OggVorbisReader, and Lamp::WaveReader. Referenced by Lamp::StreamPlayer::writeStream().

virtual bool Lamp::SoundReader::readHeader | ( |  | ) | `[pure virtual]`

| ヘッダ読み込み Returns: 成功すればtrue Implemented in Lamp::OggVorbisReader, and Lamp::WaveReader.

virtual void Lamp::SoundReader::setCursor | ( | u_int | cursor | ) | `[pure virtual]`

  | 位置の設定 Parameters:
  cursor | 設定する位置
Implemented in Lamp::OggVorbisReader, and Lamp::WaveReader. Referenced by Lamp::StreamPlayer::setCursor(), and Lamp::StreamPlayer::writeStream().

virtual u_int Lamp::SoundReader::timeToByte | ( | float | time | ) | const`[inline, virtual]`

| 時間からバイト数への変換 Returns: time 秒単位の時間 バイト数 Definition at line 107 of file SoundReader.h. References Assert, getLength(), getOneSecondBytes(), and u_int.

The documentation for this class was generated from the following file:

- SoundReader.h