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

# Lamp::StreamPlayer Class Reference

ストリームプレーヤ More...

`#include <StreamPlayer.h>`

Inheritance diagram for Lamp::StreamPlayer:

List of all members.

## Protected Member Functions
| StreamPlayer ()
| コンストラクタ
virtual | ~StreamPlayer ()
| デストラクタ
virtual bool | initialize (SoundBuffer *soundBuffer, SoundReader *soundReader)
| 初期化
virtual void | reset ()
| リセット
virtual void | run (Thread *thread)
| 実行
virtual bool | writeStream (int offset)
| ストリーム書き込み
virtual void | setCursor (u_int cursor)
| 再生位置設定
virtual u_int | getCursor () const
| 再生位置取得
virtual void | setLoopCursor (u_int loopCursor)
| ループ位置の設定
virtual u_int | getLoopCursor () const
| ループ位置の取得
## Friends
class | StreamSound
class | StreamSound3D

## Detailed Description

ストリームプレーヤ

Definition at line 39 of file StreamPlayer.h.

## Member Function Documentation

virtual u_int Lamp::StreamPlayer::getCursor | ( |  | ) | const`[inline, protected, virtual]`

| 再生位置取得 Returns: 再生位置のバイト数 Definition at line 94 of file StreamPlayer.h. References u_int. Referenced by Lamp::StreamSound3D::getCursor(), and Lamp::StreamSound::getCursor().

virtual u_int Lamp::StreamPlayer::getLoopCursor | ( |  | ) | const`[inline, protected, virtual]`

| ループ位置の取得 Returns: ループ位置のバイト数 Definition at line 109 of file StreamPlayer.h. References u_int. Referenced by Lamp::StreamSound3D::getLoopCursor(), and Lamp::StreamSound::getLoopCursor().

bool Lamp::StreamPlayer::initialize | ( | SoundBuffer * | soundBuffer,
|  | SoundReader * | soundReader
| ) | `[protected, virtual]`

  | 初期化 Parameters:
  soundBuffer | サウンドバッファ
  soundReader | サウンドリーダ
Definition at line 55 of file StreamPlayer.cpp. References Assert, DirectSoundNotifyInterfaceID, DirectXFailed, ErrorOut, Lamp::SoundBuffer::getBufferSize(), Lamp::SoundBuffer::getSoundBuffer(), NULL, reset(), and Lamp::Thread::start(). Referenced by Lamp::StreamSound3D::setSoundReader(), and Lamp::StreamSound::setSoundReader().

void Lamp::StreamPlayer::run | ( | Thread * | thread | ) | `[protected, virtual]`

  | 実行 Parameters:
  thread | 実行しているスレッド
isStopRequested()がtrueを返す場合は速やかに処理を終了させる Reimplemented from Lamp::Thread. Definition at line 99 of file StreamPlayer.cpp. References Assert, Lamp::Runnable::isStopRequested(), u_long, writeStream(), and Lamp::Thread::yield().

void Lamp::StreamPlayer::setCursor | ( | u_int | cursor | ) | `[protected, virtual]`

  | 再生位置設定 Parameters:
  cursor | 再生位置のバイト数
Definition at line 178 of file StreamPlayer.cpp. References Assert, Lamp::Sound::getOneSampleBytes(), Lamp::SoundReader::setCursor(), and u_int. Referenced by Lamp::StreamSound3D::setCursor(), and Lamp::StreamSound::setCursor().

void Lamp::StreamPlayer::setLoopCursor | ( | u_int | loopCursor | ) | `[protected, virtual]`

  | ループ位置の設定 Parameters:
  loopCursor | ループ位置をバイト数で指定
Definition at line 193 of file StreamPlayer.cpp. References Assert, Lamp::Sound::getOneSampleBytes(), and u_int. Referenced by Lamp::StreamSound3D::setLoopCursor(), and Lamp::StreamSound::setLoopCursor().

bool Lamp::StreamPlayer::writeStream | ( | int | offset | ) | `[protected, virtual]`

  | ストリーム書き込み Parameters:
  offset | 0ならバッファ前半、1なら後半に書き込む
Returns: 成功すればtrue Definition at line 120 of file StreamPlayer.cpp. References Assert, Lamp::SoundBuffer::Lock::getAddress0(), Lamp::SoundBuffer::Lock::getAddress1(), Lamp::SoundBuffer::getBit(), Lamp::SoundBuffer::getBufferSize(), Lamp::SoundReader::getCursor(), Lamp::SoundBuffer::getSize(), Lamp::SoundBuffer::Lock::getSize0(), Lamp::SoundBuffer::Lock::getSize1(), Lamp::SoundBuffer::isLoop(), Lamp::SoundBuffer::Lock::isValid(), Lamp::SoundBuffer::lock(), Lamp::WaitSet::lock(), NULL, Lamp::SoundReader::read(), Lamp::SoundReader::setCursor(), Lamp::SoundBuffer::stop(), u_char, u_int, and Lamp::SoundBuffer::unlock(). Referenced by reset(), and run().

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

- StreamPlayer.h
- StreamPlayer.cpp