Holder: Use Holder for SoundMgr.
[gemrb.git] / gemrb / plugins / NullSound / NullSound.cpp
blobedc9f79c98f2263b123caab796112f477d0cb8a8
1 /* GemRB - Infinity Engine Emulator
2 * Copyright (C) 2003 The GemRB Project
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 #include "win32def.h"
22 #include "NullSound.h"
23 #include "AmbientMgr.h"
24 #include "SoundMgr.h"
26 NullSound::NullSound(void)
28 XPos = 0;
29 YPos = 0;
30 ambim = new AmbientMgr();
33 NullSound::~NullSound(void)
35 delete ambim;
38 bool NullSound::Init(void)
40 return true;
43 unsigned int NullSound::Play(const char*, int, int, unsigned int)
45 return 1000; //Returning 1 Second Length
48 int NullSound::CreateStream(Holder<SoundMgr>)
50 return 0;
53 bool NullSound::Stop()
55 return true;
58 bool NullSound::Play()
60 return true;
63 void NullSound::ResetMusics()
67 bool NullSound::CanPlay()
69 return false;
72 bool NullSound::IsSpeaking()
74 return false;
77 void NullSound::UpdateListenerPos(int x, int y)
79 XPos = x;
80 YPos = y;
83 void NullSound::GetListenerPos(int& x, int& y)
85 x = XPos;
86 y = YPos;
89 int NullSound::SetupNewStream(ieWord, ieWord, ieWord, ieWord, bool, bool)
91 return -1;
94 int NullSound::QueueAmbient(int, const char*)
96 return -1;
99 bool NullSound::ReleaseStream(int, bool)
101 return true;
104 void NullSound::SetAmbientStreamVolume(int, int)
109 void NullSound::QueueBuffer(int, unsigned short, int, short*, int, int)
116 #include "plugindef.h"
118 GEMRB_PLUGIN(0x96E414D, "Null Sound Driver")
119 PLUGIN_CLASS(IE_AUDIO_CLASS_ID, NullSound)
120 END_PLUGIN()