hamigaki.png (2451 bytes)

前のページ 上に戻る ホーム 次のページ

Class template basic_wave_file_source

hamigaki::audio::basic_wave_file_source —

WAVEファイルへの読み込み専用アクセスを提供するSourceモデル

Synopsis

template<typename Source> 
class basic_wave_file_source {
public:
  // types
  typedef char                   char_type;
  typedef implementation defined category; 

  // construct/copy/destruct
  explicit basic_wave_file_source(const Source&);

  // Boost.Iostreams implementation
  std::streamsize optimal_buffer_size() const;
  std::streamsize read(const char*, std::streamsize);
  void close();
  std::streampos seek(boost::iostreams::stream_offset, std::ios_base::seekdir);

  // queries
  std::size_t block_size() const;
  pcm_format format() const;
  boost::iostreams::stream_offset total() const;
};

// creation
template<typename Source> 
  basic_wave_file_source< Source > make_wave_file_source(const Source&);

Description

Sourceを受け取り、WAVEファイルとしてフォーマットを解釈した結果を読み出すことができる。

basic_wave_file_source construct/copy/destruct

  1. explicit basic_wave_file_source(const Source& src);

basic_wave_file_source Boost.Iostreams implementation

  1. std::streamsize optimal_buffer_size() const;

    Returns: 200ミリ秒分のバッファサイズ

  2. std::streamsize read(const char* s, std::streamsize n);

    Throws: nがサンプルサイズの倍数でない場合、std::ios_base::failure

  3. void close();
  4. std::streampos 
    seek(boost::iostreams::stream_offset off, std::ios_base::seekdir way);

    Throws: offがサンプルサイズの倍数でない場合、std::ios_base::failure

basic_wave_file_source queries

  1. std::size_t block_size() const;

    basic_wave_file_sourceからの読み出し、シーク操作の最小単位

    Returns: サンプルサイズ。16ビットステレオの場合、4。

  2. pcm_format format() const;

    Returns: フォーマット情報

  3. boost::iostreams::stream_offset total() const;

    Returns: 合計バイト数

basic_wave_file_source creation

  1. template<typename Source> 
      basic_wave_file_source< Source > make_wave_file_source(const Source& src);

    Returns: basic_wave_file_source< Source >(src)

製作著作 © 2006 Takeshi Mouri

前のページ 上に戻る ホーム 次のページ