allow any CompoundPart to gain focus, if it canGainFocus()
[openc2e.git] / NullAudioBackend.h
blob6549d9b6596898bebd51215d5617eb1c77909292
1 /*
2 * NullAudioBackend.h
3 * openc2e
5 * Created by Bryan Donlan on Sun Aug 12 2007.
6 * Copyright (c) 2007 Bryan Donlan. All rights reserved.
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
20 #ifndef _NULLAUDIOBACKEND_H
21 #define _NULLAUDIOBACKEND_H
23 #include "AudioBackend.h"
25 class NullAudioBackend : public AudioBackend {
26 protected:
27 bool muted;
28 AudioClip clip;
30 public:
31 NullAudioBackend() { }
32 void init() { muted = false; }
33 void shutdown() { }
34 void setViewpointCenter(float, float) { }
35 void setMute(bool b) { muted = b; }
36 bool isMuted() { return muted; }
37 boost::shared_ptr<AudioSource> newSource() { return boost::shared_ptr<AudioSource>(); }
38 AudioClip loadClip(const std::string &) { return AudioClip(); }
41 #endif