1 /** 2 * Copyright (c) 2006-2012 LOVE Development Team 3 * 4 * This software is provided 'as-is', without any express or implied 5 * warranty. In no event will the authors be held liable for any damages 6 * arising from the use of this software. 7 * 8 * Permission is granted to anyone to use this software for any purpose, 9 * including commercial applications, and to alter it and redistribute it 10 * freely, subject to the following restrictions: 11 * 12 * 1. The origin of this software must not be misrepresented; you must not 13 * claim that you wrote the original software. If you use this software 14 * in a product, an acknowledgment in the product documentation would be 15 * appreciated but is not required. 16 * 2. Altered source versions must be plainly marked as such, and must not be 17 * misrepresented as being the original software. 18 * 3. This notice may not be removed or altered from any source distribution. 19 **/ 20 21 #ifndef LOVE_AUDIO_NULL_AUDIO_H 22 #define LOVE_AUDIO_NULL_AUDIO_H 23 24 // LOVE 25 #include <audio/Audio.h> 26 27 #include "Source.h" 28 29 namespace love 30 { 31 namespace audio 32 { 33 namespace null 34 { 35 class Audio : public love::audio::Audio 36 { 37 private: 38 float volume; 39 DistanceModel distanceModel; 40 public: 41 42 Audio(); 43 virtual ~Audio(); 44 45 // Implements Module. 46 const char * getName() const; 47 48 // Implements Audio. 49 love::audio::Source * newSource(love::sound::Decoder * decoder); 50 love::audio::Source * newSource(love::sound::SoundData * soundData); 51 int getNumSources() const; 52 int getMaxSources() const; 53 void play(love::audio::Source * source); 54 void play(); 55 void stop(love::audio::Source * source); 56 void stop(); 57 void pause(love::audio::Source * source); 58 void pause(); 59 void resume(love::audio::Source * source); 60 void resume(); 61 void rewind(love::audio::Source * source); 62 void rewind(); 63 void setVolume(float volume); 64 float getVolume() const; 65 66 void getPosition(float * v) const; 67 void setPosition(float * v); 68 void getOrientation(float * v) const; 69 void setOrientation(float * v); 70 void getVelocity(float * v) const; 71 void setVelocity(float * v); 72 73 void record(); 74 love::sound::SoundData * getRecordedData(); 75 love::sound::SoundData * stopRecording(bool returnData); 76 bool canRecord(); 77 78 DistanceModel getDistanceModel() const; 79 void setDistanceModel(DistanceModel distanceModel); 80 81 }; // Audio 82 83 } // null 84 } // audio 85 } // love 86 87 #endif // LOVE_AUDIO_NULL_AUDIO_H 88