00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef OSDL_AUDIBLE_H_
00028 #define OSDL_AUDIBLE_H_
00029
00030
00031 #include "OSDLAudioCommon.h"
00032
00033 #include "Ceylan.h"
00034
00035 #include <string>
00036
00037
00038
00039
00040 namespace OSDL
00041 {
00042
00043
00044
00045 namespace Audio
00046 {
00047
00048
00049
00051 class OSDL_DLL AudibleException: public AudioException
00052 {
00053 public:
00054
00055 AudibleException( const std::string & reason ) ;
00056
00057 virtual ~AudibleException() throw() ;
00058 } ;
00059
00060
00061
00068 typedef Ceylan::Sint32 PlaybackCount ;
00069
00070
00071
00077 extern OSDL_DLL const PlaybackCount Loop ;
00078
00079
00080
00085 extern OSDL_DLL const Volume MinVolume ;
00086
00087
00088
00093 extern OSDL_DLL const Volume MaxVolume ;
00094
00095
00096
00097
00102 class OSDL_DLL Audible: public Ceylan::TextDisplayable
00103 {
00104
00105
00106 public:
00107
00108
00120 explicit Audible( bool convertedToOutputFormat = true ) ;
00121
00122
00124 virtual ~Audible() throw() ;
00125
00126
00127
00135 virtual Volume getVolume() const = 0 ;
00136
00137
00138
00148 virtual void setVolume( Volume newVolume ) = 0 ;
00149
00150
00151
00152
00153
00154
00155
00156
00157
00172 virtual void play( PlaybackCount playCount = 1 ) = 0 ;
00173
00174
00175
00193 virtual void playWithFadeIn(
00194 Ceylan::System::Millisecond fadeInMaxDuration,
00195 PlaybackCount playCount = 1 ) = 0 ;
00196
00197
00198
00207 virtual bool isConvertedToOutputFormat() const ;
00208
00209
00210
00223 virtual const std::string toString(
00224 Ceylan::VerbosityLevels level = Ceylan::high ) const ;
00225
00226
00227
00242 static std::string FindAudiblePath(
00243 const std::string & audibleFilename ) ;
00244
00245
00246
00247
00248
00249 protected:
00250
00251
00257 bool _convertedToOutputFormat ;
00258
00259
00260
00270 static int GetLoopsForPlayCount( PlaybackCount playCount ) ;
00271
00272
00273
00274
00275 private:
00276
00277
00278
00287 explicit Audible( const Audible & source ) ;
00288
00289
00290
00299 Audible & operator = ( const Audible & source ) ;
00300
00301
00302 } ;
00303
00304
00305 }
00306
00307 }
00308
00309
00310
00311 #endif // OSDL_AUDIBLE_H_
00312