| 1 | /*************************************************************************** |
| 2 | audiomanager.cpp - description |
| 3 | ------------------- |
| 4 | begin : december 26th, 2003 |
| 5 | copyright : (C) 2003-2005 by Duong Khang NGUYEN |
| 6 | email : neoneurone @ gmail com |
| 7 | |
| 8 | $Id: audiomanager.cpp 375 2008-10-28 14:47:15Z neoneurone $ |
| 9 | ***************************************************************************/ |
| 10 | |
| 11 | /*************************************************************************** |
| 12 | * * |
| 13 | * This program is free software; you can redistribute it and/or modify * |
| 14 | * it under the terms of the GNU General Public License as published by * |
| 15 | * the Free Software Foundation; either version 2 of the License, or * |
| 16 | * any later version. * |
| 17 | * * |
| 18 | ***************************************************************************/ |
| 19 | |
| 20 | #include "audiomanager.h" |
| 21 | |
| 22 | |
| 23 | /*====================================================================*/ |
| 24 | AudioManager::AudioManager(): |
| 25 | boolAudioDeviceInitialized( false ), |
| 26 | boolMusicEnabled( false ), |
| 27 | boolSoundEnabled( false ), |
| 28 | uiNumberSound( 0 ), |
| 29 | uiNumberMusic( 0 ), |
| 30 | uiCurrentMusic( 0 ) |
| 31 | { |
| 32 | OPENCITY_DEBUG("ctor"); |
| 33 | } |
| 34 | |
| 35 | |
| 36 | /*====================================================================*/ |
| 37 | AudioManager::~AudioManager() |
| 38 | { |
| 39 | OPENCITY_DEBUG("dtor"); |
| 40 | } |
| 41 | |
| 42 | |
| 43 | /*====================================================================*/ |
| 44 | OPENCITY_ERR_CODE |
| 45 | AudioManager::OpenAudio(void) |
| 46 | { |
| 47 | return OC_ERR_FREE; |
| 48 | } |
| 49 | |
| 50 | |
| 51 | /*====================================================================*/ |
| 52 | OPENCITY_ERR_CODE |
| 53 | AudioManager::CloseAudio(void) |
| 54 | { |
| 55 | return OC_ERR_FREE; |
| 56 | } |
| 57 | |
| 58 | |
| 59 | /*====================================================================*/ |
| 60 | OPENCITY_ERR_CODE |
| 61 | AudioManager::LoadMusicList |
| 62 | ( |
| 63 | const string & csrFilename, |
| 64 | const string& csrPrefix |
| 65 | ) |
| 66 | { |
| 67 | return OC_ERR_FREE; |
| 68 | } |
| 69 | |
| 70 | |
| 71 | /*====================================================================*/ |
| 72 | const uint & |
| 73 | AudioManager::GetNumberMusic(void) const |
| 74 | { |
| 75 | return this->uiNumberMusic; |
| 76 | } |
| 77 | |
| 78 | |
| 79 | /*====================================================================*/ |
| 80 | bool |
| 81 | AudioManager::PlayingMusic(void) const |
| 82 | { |
| 83 | return false; |
| 84 | } |
| 85 | |
| 86 | |
| 87 | /*====================================================================*/ |
| 88 | OPENCITY_ERR_CODE |
| 89 | AudioManager::PlayMusic |
| 90 | ( |
| 91 | const uint & rcuiMusicIndex, |
| 92 | const int & rciLoops ) |
| 93 | { |
| 94 | return OC_ERR_FREE; |
| 95 | } |
| 96 | |
| 97 | |
| 98 | /*====================================================================*/ |
| 99 | OPENCITY_ERR_CODE |
| 100 | AudioManager::PlayNextMusic |
| 101 | ( |
| 102 | const int & rciLoops |
| 103 | ) |
| 104 | { |
| 105 | return OC_ERR_FREE; |
| 106 | } |
| 107 | |
| 108 | |
| 109 | /*====================================================================*/ |
| 110 | OPENCITY_ERR_CODE |
| 111 | AudioManager::PlayPreviousMusic |
| 112 | ( |
| 113 | const int & rciLoops |
| 114 | ) |
| 115 | { |
| 116 | return OC_ERR_FREE; |
| 117 | } |
| 118 | |
| 119 | |
| 120 | /*====================================================================*/ |
| 121 | void |
| 122 | AudioManager::StopMusic(void) const |
| 123 | { |
| 124 | return; |
| 125 | } |
| 126 | |
| 127 | |
| 128 | /*====================================================================*/ |
| 129 | void |
| 130 | AudioManager::ToggleRandomMusic(void) |
| 131 | { |
| 132 | return; |
| 133 | } |
| 134 | |
| 135 | |
| 136 | /*====================================================================*/ |
| 137 | void |
| 138 | AudioManager::ToggleMusic(void) |
| 139 | { |
| 140 | return; |
| 141 | } |
| 142 | |
| 143 | |
| 144 | /*====================================================================*/ |
| 145 | void |
| 146 | AudioManager::VolumeMusic |
| 147 | ( |
| 148 | const int & rciVol |
| 149 | ) const |
| 150 | { |
| 151 | return; |
| 152 | } |
| 153 | |
| 154 | |
| 155 | |
| 156 | |
| 157 | |
| 158 | |
| 159 | |
| 160 | |
| 161 | /*====================================================================*/ |
| 162 | OPENCITY_ERR_CODE |
| 163 | AudioManager::LoadSoundList |
| 164 | ( |
| 165 | const string & csrFilename, |
| 166 | const string& csrPrefix |
| 167 | ) |
| 168 | { |
| 169 | return OC_ERR_FREE; |
| 170 | } |
| 171 | |
| 172 | |
| 173 | /*====================================================================*/ |
| 174 | const uint & |
| 175 | AudioManager::GetNumberSound(void) const |
| 176 | { |
| 177 | return this->uiNumberSound; |
| 178 | } |
| 179 | |
| 180 | |
| 181 | /*====================================================================*/ |
| 182 | OPENCITY_ERR_CODE |
| 183 | AudioManager::PlaySound |
| 184 | ( |
| 185 | const uint & rcuiSoundIndex, |
| 186 | const AUDIO_CHANNEL & enumChannel |
| 187 | ) |
| 188 | { |
| 189 | return OC_ERR_FREE; |
| 190 | } |
| 191 | |
| 192 | |
| 193 | /*====================================================================*/ |
| 194 | void |
| 195 | AudioManager::ToggleSound(void) |
| 196 | { |
| 197 | return; |
| 198 | } |
| 199 | |
| 200 | |
| 201 | /*====================================================================*/ |
| 202 | void |
| 203 | AudioManager::VolumeSound |
| 204 | ( |
| 205 | const int & rciVol |
| 206 | ) const |
| 207 | { |
| 208 | return; |
| 209 | } |
| 210 | |
| 211 | |
| 212 | |
| 213 | |
| 214 | |
| 215 | |
| 216 | |
| 217 | |
| 218 | |
| 219 | |
| 220 | |
| 221 | |
| 222 | |
| 223 | |
| 224 | |
| 225 | |
| 226 | |
| 227 | |
| 228 | |
| 229 | |
| 230 | |
| 231 | |
| 232 | |
| 233 | |
| 234 | |
| 235 | |
| 236 |