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

SoundList.h

Go to the documentation of this file.
00001 //------------------------------------------------------------------------------
00002 // Lamp : Open source game middleware
00003 // Copyright (C) 2004  Junpei Ohtani ( Email : junpee@users.sourceforge.jp )
00004 //
00005 // This library is free software; you can redistribute it and/or
00006 // modify it under the terms of the GNU Lesser General Public
00007 // License as published by the Free Software Foundation; either
00008 // version 2.1 of the License, or (at your option) any later version.
00009 //
00010 // This library is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013 // Lesser General Public License for more details.
00014 //
00015 // You should have received a copy of the GNU Lesser General Public
00016 // License along with this library; if not, write to the Free Software
00017 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 //------------------------------------------------------------------------------
00019 
00020 /** @file
00021  * サウンドリストヘッダ
00022  * @author Junpee
00023  */
00024 
00025 #ifndef SOUND_LIST_H_
00026 #define SOUND_LIST_H_
00027 
00028 namespace Lamp{
00029 
00030 class SoundCache;
00031 class TextReader;
00032 
00033 //------------------------------------------------------------------------------
00034 /**
00035  * サウンドリスト
00036  *
00037  * テキストファイルからサウンドリストをサウンドキャッシュに読み込む。
00038  * 具体的にはサウンドファイルが置いてあるディレクトリに以下に示すフォーマットの
00039  * テキストファイルを配置する。その後、サウンドキャッシュのloadSoundList()
00040  * を使用してサウンドリストをロードします。
00041  * このファイルはエクセル等のツールで編集すると楽でしょう。<br>
00042  * <br>
00043  * <hr>
00044  * // 行頭の「//」コメントに対応している。 各要素はタブで区切る。<br>
00045  * //ファイル名 Stereo,3D   Once,Loop   Priority    MaxMixingCount  Min3DDistance
00046  * Max3DDistance<br>
00047  * muda Stereo  Once    -1  0<br>
00048  * mudamuda 3D  Loop    100 16  5.73    76.5<br>
00049  * <hr>
00050  * ファイル名<br>
00051  *  相対ファイル名を指定します。拡張子はサウンドキャッシュで指定すると
00052  * いいでしょう。<br>
00053  * <br>
00054  * Stereo,3D<br>
00055  *  ステレオサウンドか3Dサウンドかを指定します。3Dサウンドはモノラルである必要が
00056  * あります。<br>
00057  * <br>
00058  * Once,Loop<br>
00059  *  一回の再生かループ再生かを指定します。<br>
00060  * <br>
00061  * Priority<br>
00062  *  優先度を32767〜-32768の範囲で指定します。どうしても鳴ってほしい音の優先度を
00063  * 上げましょう。<br>
00064  * <br>
00065  * MaxMixingCount<br>
00066  *  最大同音同時発音数を指定します。0を指定するとサウンドキャッシュのデフォルト値を
00067  * 使用します<br>
00068  * <br>
00069  * Min3DDistance<br>
00070  *  3Dサウンドの最小距離を指定します。<br>
00071  * <br>
00072  * Max3DDistance<br>
00073  *  3Dサウンドの最大距離を指定します。<br>
00074  */
00075 class SoundList{
00076 public:
00077     /**
00078      * ロード
00079      * @param soundCache サウンドキャッシュ
00080      * @param filePath ファイルパス
00081      * @return 成功すればtrue
00082      */
00083     static bool load(SoundCache* soundCache, const String& filePath);
00084 
00085     /**
00086      * ロード
00087      * @param soundCache サウンドキャッシュ
00088      * @param textReader テキストリーダ
00089      * @return 成功すればtrue
00090      */
00091     static bool load(SoundCache* soundCache, TextReader* textReader);
00092 
00093     /**
00094      * サウンドのロード
00095      * @param soundCache サウンドキャッシュ
00096      * @param line ロード文字列
00097      * @return 成功すればtrue
00098      */
00099     static bool loadSound(SoundCache* soundCache, const String& line);
00100 
00101 
00102 private:
00103     // コンストラクタの隠蔽
00104     SoundList();
00105 
00106 };
00107 
00108 //------------------------------------------------------------------------------
00109 } // End of namespace Lamp
00110 #endif // End of SOUND_LIST_H_
00111 //------------------------------------------------------------------------------
00112 

Generated on Wed Mar 16 10:29:36 2005 for Lamp by doxygen 1.3.2