OpenSiv3D  v0.6.5
C++20 framework for creative coding
s3d::MP3Decoder Class Reference

MP3 形式音声データのデコーダ More...

#include <MP3Decoder.hpp>

Inherits s3d::IAudioDecoder.

Public Member Functions

StringView name () const override
 デコーダの名前 U"MP3" を返します。 More...
 
bool isHeader (const uint8(&bytes)[48]) const override
 MP3 形式の先頭データであるかを返します。 More...
 
const Array< String > & possibleExtensions () const override
 MP3 形式のファイルに想定される拡張子一覧 { U"mp3" } を返します。 More...
 
AudioFormat audioFormat () const noexcept override
 MP3 形式を示す AudioFormat を返します。 More...
 
Wave decode (FilePathView path) const override
 MP3 形式の音声ファイルをデコードして Wave を作成します。 More...
 
Wave decode (IReader &reader, FilePathView pathHint={}) const override
 MP3 形式の音声データをデコードして Wave を作成します。 More...
 
- Public Member Functions inherited from s3d::IAudioDecoder
virtual ~IAudioDecoder ()=default
 

Detailed Description

MP3 形式音声データのデコーダ

Member Function Documentation

◆ audioFormat()

AudioFormat s3d::MP3Decoder::audioFormat ( ) const
overridevirtualnoexcept

MP3 形式を示す AudioFormat を返します。

Returns
AudioFormat::MP3

Implements s3d::IAudioDecoder.

◆ decode() [1/2]

Wave s3d::MP3Decoder::decode ( FilePathView  path) const
overridevirtual

MP3 形式の音声ファイルをデコードして Wave を作成します。

Parameters
path音声ファイルのパス
Returns
作成した Wave

Reimplemented from s3d::IAudioDecoder.

◆ decode() [2/2]

Wave s3d::MP3Decoder::decode ( IReader reader,
FilePathView  pathHint = {} 
) const
overridevirtual

MP3 形式の音声データをデコードして Wave を作成します。

Parameters
reader音声データの IReader インタフェース
pathHintファイルパス(オプション)
Returns
作成した Wave

Implements s3d::IAudioDecoder.

◆ isHeader()

bool s3d::MP3Decoder::isHeader ( const uint8(&)  bytes[48]) const
overridevirtual

MP3 形式の先頭データであるかを返します。

Parameters
bytesデータの先頭 48 バイト
Returns
MP3 形式と推測される場合 true, それ以外の場合は false

Implements s3d::IAudioDecoder.

◆ name()

StringView s3d::MP3Decoder::name ( ) const
overridevirtual

デコーダの名前 U"MP3" を返します。

Returns
文字列 U"MP3"

Implements s3d::IAudioDecoder.

◆ possibleExtensions()

const Array<String>& s3d::MP3Decoder::possibleExtensions ( ) const
overridevirtual

MP3 形式のファイルに想定される拡張子一覧 { U"mp3" } を返します。

Returns
配列 { U"mp3" }

Implements s3d::IAudioDecoder.


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