RioEngine  0.1
My first attempt to create a 3D WYSIWYG Game Engine
ik_ISoundSource.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2014 Nikolaus Gebhardt
2 // This file is part of the "irrKlang" library.
3 // For conditions of distribution and use, see copyright notice in irrKlang.h
4 
5 #ifndef __I_IRRKLANG_IRR_SOUND_SOURCE_H_INCLUDED__
6 #define __I_IRRKLANG_IRR_SOUND_SOURCE_H_INCLUDED__
7 
9 #include "ik_vec3d.h"
10 #include "ik_EStreamModes.h"
11 #include "ik_SAudioStreamFormat.h"
12 
13 
14 namespace irrklang
15 {
16 
18 
22  {
23  public:
24 
26  virtual const ik_c8* getName() = 0;
27 
29 
32  virtual void setStreamMode(E_STREAM_MODE mode) = 0;
33 
35 
37  virtual E_STREAM_MODE getStreamMode() = 0;
38 
40 
45  virtual ik_u32 getPlayLength() = 0;
46 
48 
53  virtual SAudioStreamFormat getAudioFormat() = 0;
54 
56  /* If a sound is seekable depends on the file type and the audio format. For example MOD files
57  cannot be seeked currently.
58  \return Returns true of the sound source supports setPlayPosition() and false if not.
59  Note: If the sound never has been played before, the sound engine will have to open
60  the file and try to get the information from there, so this call could take a bit depending
61  on the type of file. */
62  virtual bool getIsSeekingSupported() = 0;
63 
65 
69 
72 
76 
79 
87 
90 
96 
99 
112 
115 
126 
129 
134 
137 
144 
147 
149 
152 
161 
structure describing an audio stream format with helper functions
virtual ik_u32 getPlayLength()=0
Returns the play length of the sound in milliseconds.
Reference counting base class for objects in the Irrlicht Engine similar to IRefCounted.
virtual bool getIsSeekingSupported()=0
Returns if sounds played from this source will support seeking via ISound::setPlayPosition().
unsigned int ik_u32
32 bit unsigned variable.
virtual const ik_c8 * getName()=0
Returns the name of the sound source (usually, this is the file name)
virtual E_STREAM_MODE getStreamMode()=0
Returns the detected or set type of the sound with wich the sound will be played. ...
char ik_c8
8 bit character variable.
Everything in the irrKlang Sound Engine can be found in this namespace.
E_STREAM_MODE
An enumeration for all types of supported stream modes.
A sound source describes an input file (.ogg, .mp3, .wav or similar) and its default settings...
virtual void setStreamMode(E_STREAM_MODE mode)=0
Sets the stream mode which should be used for a sound played from this source.
virtual SAudioStreamFormat getAudioFormat()=0
Returns informations about the sound source: channel count (mono/stereo), frame count, sample rate, etc.