1 /** 2 * Copyright (c) 2006-2011 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 public: 40 41 Audio(); 42 virtual ~Audio(); 43 44 // Implements Module. 45 const char * getName() const; 46 47 // Implements Audio. 48 love::audio::Source * newSource(love::sound::Decoder * decoder); 49 love::audio::Source * newSource(love::sound::SoundData * soundData); 50 int getNumSources() const; 51 int getMaxSources() const; 52 void play(love::audio::Source * source); 53 void play(); 54 void stop(love::audio::Source * source); 55 void stop(); 56 void pause(love::audio::Source * source); 57 void pause(); 58 void resume(love::audio::Source * source); 59 void resume(); 60 void rewind(love::audio::Source * source); 61 void rewind(); 62 void setVolume(float volume); 63 float getVolume() const; 64 65 void getPosition(float * v) const; 66 void setPosition(float * v); 67 void getOrientation(float * v) const; 68 void setOrientation(float * v); 69 void getVelocity(float * v) const; 70 void setVelocity(float * v); 71 72 void record(); 73 love::sound::SoundData * getRecordedData(); 74 love::sound::SoundData * stopRecording(bool returnData); 75 bool canRecord(); 76 77 }; // Audio 78 79 } // null 80 } // audio 81 } // love 82 83 #endif // LOVE_AUDIO_NULL_AUDIO_H 84