aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Avtalion2016-04-14 16:10:21 +0300
committerOri Avtalion2016-04-14 16:10:21 +0300
commit356403233047e260e34887ba0144892be322f472 (patch)
tree354b2e73ded557e3aa543460a1fe8e952b4a0c88
parent253e18c44080f57eb2334296e09297a2db5efda9 (diff)
downloadscummvm-rg350-356403233047e260e34887ba0144892be322f472.tar.gz
scummvm-rg350-356403233047e260e34887ba0144892be322f472.tar.bz2
scummvm-rg350-356403233047e260e34887ba0144892be322f472.zip
JANITORIAL: Reduce audio header dependencies
-rw-r--r--audio/adlib.cpp1
-rw-r--r--audio/decoders/3do.cpp1
-rw-r--r--audio/decoders/3do.h9
-rw-r--r--audio/miles_adlib.cpp1
-rw-r--r--audio/mods/protracker.cpp2
-rw-r--r--audio/softsynth/fmtowns_pc98/towns_audio.h4
-rw-r--r--engines/access/sound.cpp4
-rw-r--r--engines/access/sound.h6
-rw-r--r--engines/access/video/movie_decoder.h7
-rw-r--r--engines/agi/agi.cpp1
-rw-r--r--engines/agi/preagi.cpp6
-rw-r--r--engines/agi/preagi.h4
-rw-r--r--engines/agi/sound_midi.cpp1
-rw-r--r--engines/agi/sound_sarien.cpp2
-rw-r--r--engines/avalanche/animation.cpp1
-rw-r--r--engines/avalanche/avalanche.cpp1
-rw-r--r--engines/avalanche/clock.cpp2
-rw-r--r--engines/avalanche/dialogs.cpp1
-rw-r--r--engines/avalanche/ghostroom.cpp1
-rw-r--r--engines/avalanche/graphics.cpp1
-rw-r--r--engines/avalanche/highscore.cpp1
-rw-r--r--engines/avalanche/mainmenu.cpp2
-rw-r--r--engines/avalanche/nim.cpp2
-rw-r--r--engines/avalanche/parser.cpp1
-rw-r--r--engines/avalanche/shootemup.cpp1
-rw-r--r--engines/avalanche/sound.cpp2
-rw-r--r--engines/avalanche/sound.h5
-rw-r--r--engines/bbvs/bbvs.cpp1
-rw-r--r--engines/bbvs/bbvs.h1
-rw-r--r--engines/bbvs/sound.cpp1
-rw-r--r--engines/bbvs/sound.h5
-rw-r--r--engines/cge/sound.cpp4
-rw-r--r--engines/cge/sound.h9
-rw-r--r--engines/cge2/saveload.cpp4
-rw-r--r--engines/cge2/sound.cpp5
-rw-r--r--engines/cge2/sound.h12
-rw-r--r--engines/composer/composer.cpp7
-rw-r--r--engines/composer/composer.h1
-rw-r--r--engines/cruise/sound.cpp7
-rw-r--r--engines/draci/music.cpp2
-rw-r--r--engines/drascula/drascula.cpp6
-rw-r--r--engines/dreamweb/detection.cpp1
-rw-r--r--engines/dreamweb/dreamweb.h9
-rw-r--r--engines/dreamweb/saveload.cpp1
-rw-r--r--engines/dreamweb/sound.cpp2
-rw-r--r--engines/dreamweb/stubs.cpp1
-rw-r--r--engines/dreamweb/vgagrafx.cpp1
-rw-r--r--engines/gob/inter_v2.cpp3
-rw-r--r--engines/gob/sound/adlib.h1
-rw-r--r--engines/gob/sound/bgatmosphere.h5
-rw-r--r--engines/gob/sound/pcspeaker.cpp1
-rw-r--r--engines/gob/sound/pcspeaker.h5
-rw-r--r--engines/gob/sound/protracker.cpp1
-rw-r--r--engines/gob/sound/protracker.h5
-rw-r--r--engines/gob/sound/soundblaster.h5
-rw-r--r--engines/gob/sound/sounddesc.cpp1
-rw-r--r--engines/groovie/groovie.cpp3
-rw-r--r--engines/groovie/music.h2
-rw-r--r--engines/groovie/player.cpp1
-rw-r--r--engines/groovie/player.h5
-rw-r--r--engines/groovie/roq.cpp1
-rw-r--r--engines/groovie/script.cpp1
-rw-r--r--engines/groovie/vdx.cpp1
-rw-r--r--engines/hopkins/sound.cpp2
-rw-r--r--engines/hopkins/sound.h10
-rw-r--r--engines/hugo/sound.cpp1
-rw-r--r--engines/hugo/sound.h5
-rw-r--r--engines/kyra/eobcommon.cpp6
-rw-r--r--engines/kyra/sound_adlib.cpp6
-rw-r--r--engines/lab/anim.cpp2
-rw-r--r--engines/lab/dispman.cpp1
-rw-r--r--engines/lab/engine.cpp1
-rw-r--r--engines/lab/intro.cpp2
-rw-r--r--engines/lab/lab.cpp1
-rw-r--r--engines/lab/map.cpp2
-rw-r--r--engines/lab/music.cpp2
-rw-r--r--engines/lab/music.h6
-rw-r--r--engines/lab/resource.cpp2
-rw-r--r--engines/lab/special.cpp2
-rw-r--r--engines/lure/lure.h1
-rw-r--r--engines/mads/nebular/sound_nebular.cpp9
-rw-r--r--engines/mads/nebular/sound_nebular.h12
-rw-r--r--engines/mads/sound.cpp6
-rw-r--r--engines/mads/sound.h15
-rw-r--r--engines/mohawk/sound.cpp4
-rw-r--r--engines/mohawk/sound.h6
-rw-r--r--engines/mortevielle/sound.cpp1
-rw-r--r--engines/mortevielle/sound.h5
-rw-r--r--engines/neverhood/neverhood.h1
-rw-r--r--engines/neverhood/sound.h1
-rw-r--r--engines/prince/prince.cpp1
-rw-r--r--engines/prince/sound.cpp8
-rw-r--r--engines/prince/sound.h6
-rw-r--r--engines/queen/sound.cpp2
-rw-r--r--engines/queen/sound.h7
-rw-r--r--engines/saga/music.cpp3
-rw-r--r--engines/saga/music.h5
-rw-r--r--engines/saga/shorten.cpp2
-rw-r--r--engines/saga/shorten.h9
-rw-r--r--engines/saga/sound.cpp2
-rw-r--r--engines/sci/sound/drivers/midi.cpp2
-rw-r--r--engines/sci/sound/music.h6
-rw-r--r--engines/sci/sound/soundcmd.cpp2
-rw-r--r--engines/scumm/dialogs.cpp2
-rw-r--r--engines/scumm/he/animation_he.cpp7
-rw-r--r--engines/scumm/he/animation_he.h4
-rw-r--r--engines/scumm/he/sound_he.cpp6
-rw-r--r--engines/scumm/imuse_digi/dimuse.h6
-rw-r--r--engines/scumm/imuse_digi/dimuse_sndmgr.cpp4
-rw-r--r--engines/scumm/imuse_digi/dimuse_sndmgr.h11
-rw-r--r--engines/scumm/imuse_digi/dimuse_track.h5
-rw-r--r--engines/scumm/midiparser_ro.cpp2
-rw-r--r--engines/scumm/players/player_ad.h3
-rw-r--r--engines/scumm/players/player_apple2.h2
-rw-r--r--engines/scumm/players/player_v2cms.cpp1
-rw-r--r--engines/scumm/players/player_v3m.h4
-rw-r--r--engines/scumm/players/player_v5m.h4
-rw-r--r--engines/scumm/saveload.cpp2
-rw-r--r--engines/scumm/smush/smush_mixer.cpp5
-rw-r--r--engines/scumm/smush/smush_mixer.h4
-rw-r--r--engines/scumm/smush/smush_player.cpp6
-rw-r--r--engines/scumm/smush/smush_player.h4
-rw-r--r--engines/scumm/sound.cpp5
-rw-r--r--engines/scumm/sound.h8
-rw-r--r--engines/sherlock/debugger.cpp3
-rw-r--r--engines/sherlock/music.cpp1
-rw-r--r--engines/sherlock/music.h5
-rw-r--r--engines/sherlock/scalpel/3do/movie_decoder.cpp1
-rw-r--r--engines/sherlock/scalpel/drivers/adlib.cpp4
-rw-r--r--engines/sherlock/scalpel/scalpel_debugger.cpp3
-rw-r--r--engines/sherlock/sound.h3
-rw-r--r--engines/sky/music/adlibchannel.cpp2
-rw-r--r--engines/sky/music/adlibchannel.h5
-rw-r--r--engines/sky/music/adlibmusic.cpp6
-rw-r--r--engines/sky/music/adlibmusic.h5
-rw-r--r--engines/sword1/logic.h5
-rw-r--r--engines/sword1/sound.cpp1
-rw-r--r--engines/sword2/music.cpp3
-rw-r--r--engines/sword25/sfx/soundengine.cpp1
-rw-r--r--engines/sword25/sfx/soundengine.h1
-rw-r--r--engines/teenagent/font.cpp1
-rw-r--r--engines/teenagent/resources.cpp1
-rw-r--r--engines/teenagent/teenagent.h11
-rw-r--r--engines/testbed/midi.cpp1
-rw-r--r--engines/testbed/midi.h8
-rw-r--r--engines/tinsel/bmv.cpp1
-rw-r--r--engines/tinsel/bmv.h5
-rw-r--r--engines/tinsel/music.cpp1
-rw-r--r--engines/tinsel/sound.cpp2
-rw-r--r--engines/toltecs/movie.cpp1
-rw-r--r--engines/toltecs/movie.h5
-rw-r--r--engines/touche/touche.cpp1
-rw-r--r--engines/touche/touche.h1
-rw-r--r--engines/tsage/sound.h5
-rw-r--r--engines/tsage/tsage.h3
-rw-r--r--engines/voyeur/animation.h5
-rw-r--r--engines/voyeur/sound.cpp2
-rw-r--r--engines/voyeur/sound.h2
-rw-r--r--engines/zvision/core/events.cpp1
-rw-r--r--engines/zvision/scripting/actions.h2
-rw-r--r--engines/zvision/sound/midi.cpp1
-rw-r--r--engines/zvision/sound/midi.h2
-rw-r--r--engines/zvision/zvision.cpp2
-rw-r--r--video/mpegps_decoder.cpp1
-rw-r--r--video/psx_decoder.cpp1
165 files changed, 324 insertions, 244 deletions
diff --git a/audio/adlib.cpp b/audio/adlib.cpp
index f609164495..3e3f5c047c 100644
--- a/audio/adlib.cpp
+++ b/audio/adlib.cpp
@@ -20,7 +20,6 @@
*
*/
-#include "audio/softsynth/emumidi.h"
#include "common/debug.h"
#include "common/error.h"
#include "common/scummsys.h"
diff --git a/audio/decoders/3do.cpp b/audio/decoders/3do.cpp
index 6d558d4c8c..60cc515fdd 100644
--- a/audio/decoders/3do.cpp
+++ b/audio/decoders/3do.cpp
@@ -25,7 +25,6 @@
#include "common/util.h"
#include "audio/decoders/3do.h"
-#include "audio/decoders/raw.h"
#include "audio/decoders/adpcm_intern.h"
namespace Audio {
diff --git a/audio/decoders/3do.h b/audio/decoders/3do.h
index 7524358543..7f617c6643 100644
--- a/audio/decoders/3do.h
+++ b/audio/decoders/3do.h
@@ -31,19 +31,12 @@
#include "common/scummsys.h"
#include "common/types.h"
-#include "common/substream.h"
+#include "common/stream.h"
#include "audio/audiostream.h"
-#include "audio/decoders/raw.h"
-
-namespace Common {
-class SeekableReadStream;
-}
namespace Audio {
-class SeekableAudioStream;
-
// amount of bytes to be used within the decoder classes as buffers
#define AUDIO_3DO_CACHE_SIZE 1024
diff --git a/audio/miles_adlib.cpp b/audio/miles_adlib.cpp
index bf5c9d4a73..0693d1e7ac 100644
--- a/audio/miles_adlib.cpp
+++ b/audio/miles_adlib.cpp
@@ -27,7 +27,6 @@
#include "common/textconsole.h"
#include "audio/fmopl.h"
-#include "audio/softsynth/emumidi.h"
namespace Audio {
diff --git a/audio/mods/protracker.cpp b/audio/mods/protracker.cpp
index 2578e9488a..ce52b61e04 100644
--- a/audio/mods/protracker.cpp
+++ b/audio/mods/protracker.cpp
@@ -24,8 +24,6 @@
#include "audio/mods/paula.h"
#include "audio/mods/module.h"
-#include "audio/audiostream.h"
-
#include "common/textconsole.h"
namespace Modules {
diff --git a/audio/softsynth/fmtowns_pc98/towns_audio.h b/audio/softsynth/fmtowns_pc98/towns_audio.h
index 93eeafb046..0003f02777 100644
--- a/audio/softsynth/fmtowns_pc98/towns_audio.h
+++ b/audio/softsynth/fmtowns_pc98/towns_audio.h
@@ -23,7 +23,9 @@
#ifndef TOWNS_AUDIO_H
#define TOWNS_AUDIO_H
-#include "audio/mixer.h"
+namespace Audio {
+class Mixer;
+}
class TownsAudioInterfaceInternal;
diff --git a/engines/access/sound.cpp b/engines/access/sound.cpp
index 38f544de4e..448f630501 100644
--- a/engines/access/sound.cpp
+++ b/engines/access/sound.cpp
@@ -20,9 +20,11 @@
*
*/
-#include "common/algorithm.h"
#include "common/config-manager.h"
#include "audio/mixer.h"
+#include "audio/audiostream.h"
+#include "audio/mididrv.h"
+#include "audio/midiparser.h"
#include "audio/decoders/raw.h"
#include "audio/decoders/wave.h"
// Miles Audio
diff --git a/engines/access/sound.h b/engines/access/sound.h
index b372e566d2..d82ee956b1 100644
--- a/engines/access/sound.h
+++ b/engines/access/sound.h
@@ -24,14 +24,16 @@
#define ACCESS_SOUND_H
#include "common/scummsys.h"
-#include "audio/audiostream.h"
#include "audio/mixer.h"
#include "access/files.h"
#include "audio/midiplayer.h"
-#include "audio/midiparser.h"
#define MAX_SOUNDS 20
+namespace Audio {
+class AudioStream;
+}
+
namespace Access {
class AccessEngine;
diff --git a/engines/access/video/movie_decoder.h b/engines/access/video/movie_decoder.h
index fe8a89fcde..8b5d94836b 100644
--- a/engines/access/video/movie_decoder.h
+++ b/engines/access/video/movie_decoder.h
@@ -23,13 +23,8 @@
#ifndef ACCESS_VIDEO_MOVIE_DECODER_H
#define ACCESS_VIDEO_MOVIE_DECODER_H
-#include "common/rect.h"
#include "video/video_decoder.h"
-#include "audio/decoders/raw.h"
-
-namespace Audio {
-class QueuingAudioStream;
-}
+#include "audio/audiostream.h"
namespace Common {
class SeekableReadStream;
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp
index 6e63cd3e71..e566ad12f6 100644
--- a/engines/agi/agi.cpp
+++ b/engines/agi/agi.cpp
@@ -37,7 +37,6 @@
#include "graphics/cursorman.h"
#include "audio/mididrv.h"
-#include "audio/mixer.h"
#include "agi/agi.h"
#include "agi/font.h"
diff --git a/engines/agi/preagi.cpp b/engines/agi/preagi.cpp
index bb5d3b8896..7e2e65a3eb 100644
--- a/engines/agi/preagi.cpp
+++ b/engines/agi/preagi.cpp
@@ -20,16 +20,14 @@
*
*/
-#include "common/config-manager.h"
+#include "audio/softsynth/pcspk.h"
+
#include "common/debug-channels.h"
#include "common/events.h"
#include "common/random.h"
-#include "common/textconsole.h"
#include "agi/preagi.h"
#include "agi/graphics.h"
-#include "agi/keyboard.h"
-#include "agi/text.h"
namespace Agi {
diff --git a/engines/agi/preagi.h b/engines/agi/preagi.h
index 289b5ecdb9..d6026a5d4d 100644
--- a/engines/agi/preagi.h
+++ b/engines/agi/preagi.h
@@ -25,7 +25,9 @@
#include "agi/agi.h"
-#include "audio/softsynth/pcspk.h"
+namespace Audio {
+class PCSpeaker;
+}
namespace Agi {
diff --git a/engines/agi/sound_midi.cpp b/engines/agi/sound_midi.cpp
index f5c48b3b21..6998df6862 100644
--- a/engines/agi/sound_midi.cpp
+++ b/engines/agi/sound_midi.cpp
@@ -46,7 +46,6 @@
#include "common/file.h"
#include "common/memstream.h"
#include "common/stream.h"
-#include "common/textconsole.h"
#include "agi/agi.h"
diff --git a/engines/agi/sound_sarien.cpp b/engines/agi/sound_sarien.cpp
index c8a7042ea3..939c3d2c77 100644
--- a/engines/agi/sound_sarien.cpp
+++ b/engines/agi/sound_sarien.cpp
@@ -22,8 +22,6 @@
#include "common/random.h"
-#include "audio/mididrv.h"
-
#include "agi/agi.h"
#include "agi/sound_sarien.h"
diff --git a/engines/avalanche/animation.cpp b/engines/avalanche/animation.cpp
index 451b4a1c68..6946e448d8 100644
--- a/engines/avalanche/animation.cpp
+++ b/engines/avalanche/animation.cpp
@@ -27,6 +27,7 @@
/* TRIP5 Trippancy V - the sprite animation subsystem */
+#include "common/system.h"
#include "avalanche/avalanche.h"
#include "avalanche/animation.h"
diff --git a/engines/avalanche/avalanche.cpp b/engines/avalanche/avalanche.cpp
index 6cfe4dfdb6..8726ef784a 100644
--- a/engines/avalanche/avalanche.cpp
+++ b/engines/avalanche/avalanche.cpp
@@ -29,6 +29,7 @@
#include "common/random.h"
#include "common/savefile.h"
+#include "common/system.h"
#include "graphics/thumbnail.h"
namespace Avalanche {
diff --git a/engines/avalanche/clock.cpp b/engines/avalanche/clock.cpp
index 6d398d9921..4276e41d99 100644
--- a/engines/avalanche/clock.cpp
+++ b/engines/avalanche/clock.cpp
@@ -28,6 +28,8 @@
#include "avalanche/clock.h"
#include "avalanche/avalanche.h"
+#include "common/system.h"
+
namespace Avalanche {
Clock::Clock(AvalancheEngine *vm) {
diff --git a/engines/avalanche/dialogs.cpp b/engines/avalanche/dialogs.cpp
index f95440900b..d1a7234b03 100644
--- a/engines/avalanche/dialogs.cpp
+++ b/engines/avalanche/dialogs.cpp
@@ -30,6 +30,7 @@
#include "avalanche/avalanche.h"
#include "avalanche/dialogs.h"
+#include "common/system.h"
#include "common/random.h"
namespace Avalanche {
diff --git a/engines/avalanche/ghostroom.cpp b/engines/avalanche/ghostroom.cpp
index 047a3670c2..254bf5e174 100644
--- a/engines/avalanche/ghostroom.cpp
+++ b/engines/avalanche/ghostroom.cpp
@@ -29,6 +29,7 @@
#include "avalanche/ghostroom.h"
#include "common/random.h"
+#include "common/system.h"
namespace Avalanche {
diff --git a/engines/avalanche/graphics.cpp b/engines/avalanche/graphics.cpp
index 60c23594d3..03c9e9e3cb 100644
--- a/engines/avalanche/graphics.cpp
+++ b/engines/avalanche/graphics.cpp
@@ -28,6 +28,7 @@
#include "avalanche/avalanche.h"
#include "avalanche/graphics.h"
+#include "common/system.h"
#include "engines/util.h"
#include "graphics/palette.h"
diff --git a/engines/avalanche/highscore.cpp b/engines/avalanche/highscore.cpp
index 5f47aeb894..b977e2f33c 100644
--- a/engines/avalanche/highscore.cpp
+++ b/engines/avalanche/highscore.cpp
@@ -29,6 +29,7 @@
#include "avalanche/highscore.h"
#include "common/savefile.h"
+#include "common/system.h"
namespace Avalanche {
diff --git a/engines/avalanche/mainmenu.cpp b/engines/avalanche/mainmenu.cpp
index 543684556c..ff24b37e0d 100644
--- a/engines/avalanche/mainmenu.cpp
+++ b/engines/avalanche/mainmenu.cpp
@@ -28,6 +28,8 @@
#include "avalanche/avalanche.h"
#include "avalanche/mainmenu.h"
+#include "common/system.h"
+
namespace Avalanche {
MainMenu::MainMenu(AvalancheEngine *vm) {
diff --git a/engines/avalanche/nim.cpp b/engines/avalanche/nim.cpp
index b17af8767a..a0a1756e0a 100644
--- a/engines/avalanche/nim.cpp
+++ b/engines/avalanche/nim.cpp
@@ -28,6 +28,8 @@
#include "avalanche/avalanche.h"
#include "avalanche/nim.h"
+#include "common/system.h"
+
namespace Avalanche {
const char * const Nim::kNames[2] = {"Avalot", "Dogfood"};
diff --git a/engines/avalanche/parser.cpp b/engines/avalanche/parser.cpp
index 7c6d254099..112dce93ac 100644
--- a/engines/avalanche/parser.cpp
+++ b/engines/avalanche/parser.cpp
@@ -30,6 +30,7 @@
#include "avalanche/nim.h"
#include "gui/saveload.h"
+#include "common/system.h"
#include "common/translation.h"
namespace Avalanche {
diff --git a/engines/avalanche/shootemup.cpp b/engines/avalanche/shootemup.cpp
index e5e44ed934..7f6cf99974 100644
--- a/engines/avalanche/shootemup.cpp
+++ b/engines/avalanche/shootemup.cpp
@@ -29,6 +29,7 @@
#include "avalanche/shootemup.h"
#include "common/random.h"
+#include "common/system.h"
namespace Avalanche {
diff --git a/engines/avalanche/sound.cpp b/engines/avalanche/sound.cpp
index 0223bead48..a441121e90 100644
--- a/engines/avalanche/sound.cpp
+++ b/engines/avalanche/sound.cpp
@@ -23,7 +23,7 @@
#include "avalanche/avalanche.h"
#include "avalanche/sound.h"
-#include "audio/audiostream.h"
+#include "audio/softsynth/pcspk.h"
#include "common/config-manager.h"
namespace Avalanche {
diff --git a/engines/avalanche/sound.h b/engines/avalanche/sound.h
index a67016a206..f9775654b4 100644
--- a/engines/avalanche/sound.h
+++ b/engines/avalanche/sound.h
@@ -24,7 +24,10 @@
#define AVALANCHE_SOUND_H
#include "audio/mixer.h"
-#include "audio/softsynth/pcspk.h"
+
+namespace Audio {
+class PCSpeaker;
+}
namespace Avalanche {
diff --git a/engines/bbvs/bbvs.cpp b/engines/bbvs/bbvs.cpp
index 6ae663479d..e7b20512a2 100644
--- a/engines/bbvs/bbvs.cpp
+++ b/engines/bbvs/bbvs.cpp
@@ -34,6 +34,7 @@
#include "bbvs/minigames/minigame.h"
#include "audio/audiostream.h"
+#include "audio/decoders/aiff.h"
#include "common/config-manager.h"
#include "common/debug-channels.h"
#include "common/error.h"
diff --git a/engines/bbvs/bbvs.h b/engines/bbvs/bbvs.h
index ff4afe9526..8d9550d423 100644
--- a/engines/bbvs/bbvs.h
+++ b/engines/bbvs/bbvs.h
@@ -24,7 +24,6 @@
#define BBVS_BBVS_H
#include "audio/mixer.h"
-#include "audio/decoders/aiff.h"
#include "common/array.h"
#include "common/events.h"
#include "common/file.h"
diff --git a/engines/bbvs/sound.cpp b/engines/bbvs/sound.cpp
index 7f9c00ad48..587868f26d 100644
--- a/engines/bbvs/sound.cpp
+++ b/engines/bbvs/sound.cpp
@@ -21,6 +21,7 @@
*/
#include "bbvs/sound.h"
+#include "audio/audiostream.h"
#include "audio/decoders/aiff.h"
#include "common/debug.h"
#include "common/file.h"
diff --git a/engines/bbvs/sound.h b/engines/bbvs/sound.h
index 4d3253c48e..a21d97b7ed 100644
--- a/engines/bbvs/sound.h
+++ b/engines/bbvs/sound.h
@@ -23,10 +23,13 @@
#ifndef BBVS_SOUND_H
#define BBVS_SOUND_H
-#include "audio/audiostream.h"
#include "audio/mixer.h"
#include "common/array.h"
+namespace Audio {
+class RewindableAudioStream;
+}
+
namespace Bbvs {
class Sound {
diff --git a/engines/cge/sound.cpp b/engines/cge/sound.cpp
index 370b768bca..3af094ef06 100644
--- a/engines/cge/sound.cpp
+++ b/engines/cge/sound.cpp
@@ -30,8 +30,10 @@
#include "cge/cge_main.h"
#include "common/config-manager.h"
#include "common/memstream.h"
-#include "audio/decoders/raw.h"
#include "audio/audiostream.h"
+#include "audio/decoders/wave.h"
+#include "audio/mididrv.h"
+#include "audio/midiparser.h"
namespace CGE {
diff --git a/engines/cge/sound.h b/engines/cge/sound.h
index dc67f9408b..8e624ee575 100644
--- a/engines/cge/sound.h
+++ b/engines/cge/sound.h
@@ -29,15 +29,14 @@
#define CGE_SOUND_H
#include "cge/fileio.h"
-#include "audio/audiostream.h"
-#include "audio/decoders/wave.h"
-#include "audio/fmopl.h"
-#include "audio/mididrv.h"
-#include "audio/midiparser.h"
#include "audio/midiplayer.h"
#include "audio/mixer.h"
#include "common/memstream.h"
+namespace Audio {
+class RewindableAudioStream;
+}
+
namespace CGE {
class CGEEngine;
diff --git a/engines/cge2/saveload.cpp b/engines/cge2/saveload.cpp
index 7735c077a6..cd0be84567 100644
--- a/engines/cge2/saveload.cpp
+++ b/engines/cge2/saveload.cpp
@@ -25,7 +25,7 @@
* Copyright (c) 1994-1997 Janus B. Wisniewski and L.K. Avalon
*/
-#include "common/config-manager.h"
+#include "common/memstream.h"
#include "common/savefile.h"
#include "common/system.h"
#include "graphics/thumbnail.h"
@@ -36,8 +36,6 @@
#include "cge2/snail.h"
#include "cge2/hero.h"
#include "cge2/text.h"
-#include "cge2/sound.h"
-#include "cge2/cge2_main.h"
namespace CGE2 {
diff --git a/engines/cge2/sound.cpp b/engines/cge2/sound.cpp
index 57ec5983e8..691414d84a 100644
--- a/engines/cge2/sound.cpp
+++ b/engines/cge2/sound.cpp
@@ -26,10 +26,11 @@
*/
#include "cge2/sound.h"
-#include "common/config-manager.h"
#include "common/memstream.h"
-#include "audio/decoders/raw.h"
#include "audio/audiostream.h"
+#include "audio/decoders/wave.h"
+#include "audio/mididrv.h"
+#include "audio/midiparser.h"
#include "cge2/cge2.h"
namespace CGE2 {
diff --git a/engines/cge2/sound.h b/engines/cge2/sound.h
index 02afe610a2..8c16f06e97 100644
--- a/engines/cge2/sound.h
+++ b/engines/cge2/sound.h
@@ -28,19 +28,17 @@
#ifndef CGE2_SOUND_H
#define CGE2_SOUND_H
-#include "cge2/fileio.h"
-#include "audio/audiostream.h"
-#include "audio/decoders/wave.h"
-#include "audio/fmopl.h"
-#include "audio/mididrv.h"
-#include "audio/midiparser.h"
#include "audio/midiplayer.h"
#include "audio/mixer.h"
-#include "common/memstream.h"
+
+namespace Audio {
+class RewindableAudioStream;
+}
namespace CGE2 {
class CGE2Engine;
+class EncryptedStream;
// sample info
struct SmpInfo {
diff --git a/engines/composer/composer.cpp b/engines/composer/composer.cpp
index f070338978..73d97e100d 100644
--- a/engines/composer/composer.cpp
+++ b/engines/composer/composer.cpp
@@ -21,13 +21,9 @@
*/
#include "common/scummsys.h"
-#include "common/config-manager.h"
#include "common/events.h"
-#include "common/file.h"
#include "common/random.h"
-#include "common/fs.h"
#include "common/keyboard.h"
-#include "common/substream.h"
#include "graphics/cursorman.h"
#include "graphics/surface.h"
@@ -35,9 +31,6 @@
#include "graphics/wincursor.h"
#include "engines/util.h"
-#include "engines/advancedDetector.h"
-
-#include "audio/audiostream.h"
#include "composer/composer.h"
#include "composer/graphics.h"
diff --git a/engines/composer/composer.h b/engines/composer/composer.h
index 47398fe36d..234494e655 100644
--- a/engines/composer/composer.h
+++ b/engines/composer/composer.h
@@ -28,6 +28,7 @@
#include "common/system.h"
#include "common/debug.h"
#include "common/debug-channels.h"
+#include "common/error.h"
#include "common/textconsole.h"
#include "common/rect.h"
diff --git a/engines/cruise/sound.cpp b/engines/cruise/sound.cpp
index f57435f4f7..b477dcdf9c 100644
--- a/engines/cruise/sound.cpp
+++ b/engines/cruise/sound.cpp
@@ -29,10 +29,11 @@
#include "cruise/sound.h"
#include "cruise/volume.h"
-#include "audio/audiostream.h"
#include "audio/fmopl.h"
-#include "audio/mixer.h"
-#include "audio/mods/soundfx.h"
+
+namespace Audio {
+class Mixer;
+}
namespace Cruise {
diff --git a/engines/draci/music.cpp b/engines/draci/music.cpp
index cda2007a8e..3fa380196a 100644
--- a/engines/draci/music.cpp
+++ b/engines/draci/music.cpp
@@ -22,10 +22,8 @@
// MIDI and digital music class
-#include "audio/audiostream.h"
#include "audio/mididrv.h"
#include "audio/midiparser.h"
-#include "common/config-manager.h"
#include "common/debug.h"
#include "common/file.h"
diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp
index c2ea761164..75a81c20b0 100644
--- a/engines/drascula/drascula.cpp
+++ b/engines/drascula/drascula.cpp
@@ -23,19 +23,13 @@
#include "common/events.h"
#include "common/keyboard.h"
#include "common/file.h"
-#include "common/savefile.h"
#include "common/config-manager.h"
#include "common/textconsole.h"
#include "backends/audiocd/audiocd.h"
-#include "base/plugins.h"
-#include "base/version.h"
-
#include "engines/util.h"
-#include "audio/mixer.h"
-
#include "drascula/drascula.h"
#include "drascula/console.h"
diff --git a/engines/dreamweb/detection.cpp b/engines/dreamweb/detection.cpp
index 764171bcb0..8e24c44702 100644
--- a/engines/dreamweb/detection.cpp
+++ b/engines/dreamweb/detection.cpp
@@ -23,6 +23,7 @@
#include "base/plugins.h"
#include "common/algorithm.h"
+#include "common/savefile.h"
#include "common/system.h"
#include "common/translation.h"
diff --git a/engines/dreamweb/dreamweb.h b/engines/dreamweb/dreamweb.h
index e39f8c0d51..2e5fb424f8 100644
--- a/engines/dreamweb/dreamweb.h
+++ b/engines/dreamweb/dreamweb.h
@@ -24,17 +24,12 @@
#define DREAMWEB_H
#include "common/error.h"
-#include "common/file.h"
#include "common/keyboard.h"
#include "common/random.h"
#include "common/rect.h"
-#include "common/savefile.h"
#include "common/scummsys.h"
#include "common/system.h"
-#include "audio/audiostream.h"
-#include "audio/mixer.h"
-
#include "engines/engine.h"
#include "dreamweb/console.h"
@@ -45,6 +40,10 @@
#define SCUMMVM_BLOCK_MAGIC_SIZE 0x1234
#define SAVEGAME_VERSION 1
+namespace Common {
+class File;
+}
+
namespace DreamWeb {
const unsigned int kNumReelRoutines = 57;
diff --git a/engines/dreamweb/saveload.cpp b/engines/dreamweb/saveload.cpp
index ce89dae732..a104ba727d 100644
--- a/engines/dreamweb/saveload.cpp
+++ b/engines/dreamweb/saveload.cpp
@@ -28,6 +28,7 @@
#include "gui/saveload.h"
#include "common/config-manager.h"
#include "common/translation.h"
+#include "common/savefile.h"
#include "common/serializer.h"
namespace DreamWeb {
diff --git a/engines/dreamweb/sound.cpp b/engines/dreamweb/sound.cpp
index d3b417de90..2a4cd9c75c 100644
--- a/engines/dreamweb/sound.cpp
+++ b/engines/dreamweb/sound.cpp
@@ -25,6 +25,8 @@
#include "common/debug.h"
#include "common/file.h"
+#include "audio/audiostream.h"
+
#include "dreamweb/dreamweb.h"
#include "dreamweb/sound.h"
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 68b223392c..4aa487d13f 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -23,6 +23,7 @@
#include "dreamweb/sound.h"
#include "dreamweb/dreamweb.h"
#include "common/config-manager.h"
+#include "common/file.h"
namespace DreamWeb {
diff --git a/engines/dreamweb/vgagrafx.cpp b/engines/dreamweb/vgagrafx.cpp
index c59d3e3ad5..4a7acd2344 100644
--- a/engines/dreamweb/vgagrafx.cpp
+++ b/engines/dreamweb/vgagrafx.cpp
@@ -21,6 +21,7 @@
*/
#include "dreamweb/dreamweb.h"
+#include "common/file.h"
#include "engines/util.h"
#include "graphics/surface.h"
#include "image/pcx.h"
diff --git a/engines/gob/inter_v2.cpp b/engines/gob/inter_v2.cpp
index 3aa7ad1664..4b58819c01 100644
--- a/engines/gob/inter_v2.cpp
+++ b/engines/gob/inter_v2.cpp
@@ -26,9 +26,6 @@
#include "gui/message.h"
-#include "audio/mixer.h"
-#include "audio/mods/infogrames.h"
-
#include "gob/gob.h"
#include "gob/inter.h"
#include "gob/global.h"
diff --git a/engines/gob/sound/adlib.h b/engines/gob/sound/adlib.h
index d60458295c..9d6b3053b6 100644
--- a/engines/gob/sound/adlib.h
+++ b/engines/gob/sound/adlib.h
@@ -25,7 +25,6 @@
#include "common/mutex.h"
-#include "audio/audiostream.h"
#include "audio/mixer.h"
namespace OPL {
diff --git a/engines/gob/sound/bgatmosphere.h b/engines/gob/sound/bgatmosphere.h
index 1cfc63c79a..c838a2c2bb 100644
--- a/engines/gob/sound/bgatmosphere.h
+++ b/engines/gob/sound/bgatmosphere.h
@@ -23,13 +23,16 @@
#ifndef GOB_SOUND_BGATMOSPHERE_H
#define GOB_SOUND_BGATMOSPHERE_H
-#include "audio/mixer.h"
#include "common/array.h"
#include "common/mutex.h"
#include "common/random.h"
#include "gob/sound/soundmixer.h"
+namespace Audio {
+class Mixer;
+}
+
namespace Gob {
class SoundDesc;
diff --git a/engines/gob/sound/pcspeaker.cpp b/engines/gob/sound/pcspeaker.cpp
index d0dcb9a871..7ba9fa75df 100644
--- a/engines/gob/sound/pcspeaker.cpp
+++ b/engines/gob/sound/pcspeaker.cpp
@@ -20,6 +20,7 @@
*
*/
+#include "audio/softsynth/pcspk.h"
#include "gob/sound/pcspeaker.h"
namespace Gob {
diff --git a/engines/gob/sound/pcspeaker.h b/engines/gob/sound/pcspeaker.h
index ba2e00ce3e..2c3a12a168 100644
--- a/engines/gob/sound/pcspeaker.h
+++ b/engines/gob/sound/pcspeaker.h
@@ -24,7 +24,10 @@
#define GOB_SOUND_PCSPEAKER_H
#include "audio/mixer.h"
-#include "audio/softsynth/pcspk.h"
+
+namespace Audio {
+class PCSpeaker;
+}
namespace Gob {
diff --git a/engines/gob/sound/protracker.cpp b/engines/gob/sound/protracker.cpp
index ce29100b85..7cf8dbb37c 100644
--- a/engines/gob/sound/protracker.cpp
+++ b/engines/gob/sound/protracker.cpp
@@ -22,6 +22,7 @@
#include "common/file.h"
+#include "audio/audiostream.h"
#include "audio/mods/protracker.h"
#include "gob/sound/protracker.h"
diff --git a/engines/gob/sound/protracker.h b/engines/gob/sound/protracker.h
index ccd0d51552..17d909346e 100644
--- a/engines/gob/sound/protracker.h
+++ b/engines/gob/sound/protracker.h
@@ -24,7 +24,10 @@
#define GOB_SOUND_PROTRACKER_H
#include "audio/mixer.h"
-#include "audio/audiostream.h"
+
+namespace Audio {
+class AudioStream;
+}
namespace Gob {
diff --git a/engines/gob/sound/soundblaster.h b/engines/gob/sound/soundblaster.h
index 6a732dbec9..8abed62019 100644
--- a/engines/gob/sound/soundblaster.h
+++ b/engines/gob/sound/soundblaster.h
@@ -24,10 +24,13 @@
#define GOB_SOUND_SOUNDBLASTER_H
#include "common/mutex.h"
-#include "audio/mixer.h"
#include "gob/sound/soundmixer.h"
+namespace Audio {
+class Mixer;
+}
+
namespace Gob {
class SoundDesc;
diff --git a/engines/gob/sound/sounddesc.cpp b/engines/gob/sound/sounddesc.cpp
index f981d0b385..d56387078a 100644
--- a/engines/gob/sound/sounddesc.cpp
+++ b/engines/gob/sound/sounddesc.cpp
@@ -24,7 +24,6 @@
#include "common/memstream.h"
#include "common/textconsole.h"
-#include "audio/mixer.h"
#include "audio/decoders/raw.h"
#include "audio/decoders/wave.h"
diff --git a/engines/groovie/groovie.cpp b/engines/groovie/groovie.cpp
index bbc290eccf..ac77ec3099 100644
--- a/engines/groovie/groovie.cpp
+++ b/engines/groovie/groovie.cpp
@@ -20,9 +20,6 @@
*
*/
-#include "audio/mididrv.h"
-#include "audio/mixer.h"
-
#include "groovie/groovie.h"
#include "groovie/cursor.h"
#include "groovie/detection.h"
diff --git a/engines/groovie/music.h b/engines/groovie/music.h
index dcb91d42a8..c549527c77 100644
--- a/engines/groovie/music.h
+++ b/engines/groovie/music.h
@@ -25,6 +25,8 @@
#include "common/array.h"
#include "common/mutex.h"
+#include "audio/mididrv.h"
+#include "audio/mixer.h"
class MidiParser;
diff --git a/engines/groovie/player.cpp b/engines/groovie/player.cpp
index c1b90fbd2c..dea32386f2 100644
--- a/engines/groovie/player.cpp
+++ b/engines/groovie/player.cpp
@@ -21,6 +21,7 @@
*/
#include "common/debug.h"
+#include "audio/audiostream.h"
#include "groovie/player.h"
#include "groovie/groovie.h"
diff --git a/engines/groovie/player.h b/engines/groovie/player.h
index b1aac963f2..952d3ac208 100644
--- a/engines/groovie/player.h
+++ b/engines/groovie/player.h
@@ -24,7 +24,10 @@
#define GROOVIE_PLAYER_H
#include "common/system.h"
-#include "audio/audiostream.h"
+
+namespace Audio {
+class QueuingAudioStream;
+}
namespace Groovie {
diff --git a/engines/groovie/roq.cpp b/engines/groovie/roq.cpp
index f14cacd6b8..c1b6c44c4d 100644
--- a/engines/groovie/roq.cpp
+++ b/engines/groovie/roq.cpp
@@ -40,6 +40,7 @@
// Required for the YUV to RGB conversion
#include "graphics/conversion.h"
#endif
+#include "audio/audiostream.h"
#include "audio/mixer.h"
#include "audio/decoders/raw.h"
diff --git a/engines/groovie/script.cpp b/engines/groovie/script.cpp
index eef97b6ff9..47fdaacf7a 100644
--- a/engines/groovie/script.cpp
+++ b/engines/groovie/script.cpp
@@ -21,7 +21,6 @@
*/
#include "audio/mididrv.h"
-#include "audio/mixer.h"
#include "groovie/script.h"
#include "groovie/cell.h"
diff --git a/engines/groovie/vdx.cpp b/engines/groovie/vdx.cpp
index 09c2e0d3ea..94b6aa0680 100644
--- a/engines/groovie/vdx.cpp
+++ b/engines/groovie/vdx.cpp
@@ -28,6 +28,7 @@
#include "common/debug.h"
#include "common/debug-channels.h"
#include "common/textconsole.h"
+#include "audio/audiostream.h"
#include "audio/mixer.h"
#include "audio/decoders/raw.h"
#include "graphics/palette.h"
diff --git a/engines/hopkins/sound.cpp b/engines/hopkins/sound.cpp
index 6660233740..3030636a59 100644
--- a/engines/hopkins/sound.cpp
+++ b/engines/hopkins/sound.cpp
@@ -26,6 +26,8 @@
#include "hopkins/hopkins.h"
#include "audio/decoders/adpcm_intern.h"
+#include "audio/decoders/wave.h"
+#include "audio/softsynth/pcspk.h"
#include "common/system.h"
#include "common/config-manager.h"
#include "common/file.h"
diff --git a/engines/hopkins/sound.h b/engines/hopkins/sound.h
index 1fb4f9ae71..49c5846198 100644
--- a/engines/hopkins/sound.h
+++ b/engines/hopkins/sound.h
@@ -25,10 +25,16 @@
#include "common/scummsys.h"
#include "common/str.h"
-#include "audio/audiostream.h"
-#include "audio/decoders/wave.h"
#include "audio/mixer.h"
+namespace Audio {
+class RewindableAudioStream;
+}
+
+namespace Common {
+class SeekableReadStream;
+}
+
namespace Hopkins {
class VoiceItem {
diff --git a/engines/hugo/sound.cpp b/engines/hugo/sound.cpp
index 8591709dc3..09de256789 100644
--- a/engines/hugo/sound.cpp
+++ b/engines/hugo/sound.cpp
@@ -37,6 +37,7 @@
#include "audio/decoders/raw.h"
#include "audio/audiostream.h"
#include "audio/midiparser.h"
+#include "audio/softsynth/pcspk.h"
#include "hugo/hugo.h"
#include "hugo/game.h"
diff --git a/engines/hugo/sound.h b/engines/hugo/sound.h
index 6c3420918d..a623569a8b 100644
--- a/engines/hugo/sound.h
+++ b/engines/hugo/sound.h
@@ -32,7 +32,10 @@
#include "audio/mixer.h"
#include "audio/midiplayer.h"
-#include "audio/softsynth/pcspk.h"
+
+namespace Audio {
+class PCSpeaker;
+}
namespace Hugo {
diff --git a/engines/kyra/eobcommon.cpp b/engines/kyra/eobcommon.cpp
index 38a5ab8440..2264d99dde 100644
--- a/engines/kyra/eobcommon.cpp
+++ b/engines/kyra/eobcommon.cpp
@@ -24,7 +24,8 @@
#include "kyra/kyra_rpg.h"
#include "kyra/resource.h"
-#include "kyra/sound_intern.h"
+#include "engines/kyra/sound.h"
+#include "engines/kyra/sound_adlib.h"
#include "kyra/script_eob.h"
#include "kyra/timer.h"
#include "kyra/debugger.h"
@@ -32,9 +33,6 @@
#include "common/config-manager.h"
#include "common/translation.h"
-#include "audio/mididrv.h"
-#include "audio/mixer.h"
-
#include "backends/keymapper/keymapper.h"
namespace Kyra {
diff --git a/engines/kyra/sound_adlib.cpp b/engines/kyra/sound_adlib.cpp
index 1d741d8bd0..1703fb904e 100644
--- a/engines/kyra/sound_adlib.cpp
+++ b/engines/kyra/sound_adlib.cpp
@@ -44,15 +44,17 @@
#include "common/mutex.h"
#include "common/config-manager.h"
-#include "audio/mixer.h"
#include "audio/fmopl.h"
-#include "audio/audiostream.h"
// Basic AdLib Programming:
// http://www.gamedev.net/reference/articles/article446.asp
#define CALLBACKS_PER_SECOND 72
+namespace Audio {
+class Mixer;
+}
+
namespace Kyra {
class AdLibDriver {
diff --git a/engines/lab/anim.cpp b/engines/lab/anim.cpp
index f2e6992375..1190f0323b 100644
--- a/engines/lab/anim.cpp
+++ b/engines/lab/anim.cpp
@@ -28,6 +28,8 @@
*
*/
+#include "common/file.h"
+
#include "lab/lab.h"
#include "lab/anim.h"
diff --git a/engines/lab/dispman.cpp b/engines/lab/dispman.cpp
index af235f234b..d642f2fed5 100644
--- a/engines/lab/dispman.cpp
+++ b/engines/lab/dispman.cpp
@@ -28,6 +28,7 @@
*
*/
+#include "common/file.h"
#include "graphics/palette.h"
#include "lab/lab.h"
diff --git a/engines/lab/engine.cpp b/engines/lab/engine.cpp
index 6ba405380e..4f0a0da777 100644
--- a/engines/lab/engine.cpp
+++ b/engines/lab/engine.cpp
@@ -29,6 +29,7 @@
*/
#include "common/config-manager.h"
+#include "common/file.h"
#include "gui/message.h"
diff --git a/engines/lab/intro.cpp b/engines/lab/intro.cpp
index 01e8cac401..0184ff7c69 100644
--- a/engines/lab/intro.cpp
+++ b/engines/lab/intro.cpp
@@ -28,6 +28,8 @@
*
*/
+#include "common/file.h"
+
#include "lab/lab.h"
#include "lab/anim.h"
diff --git a/engines/lab/lab.cpp b/engines/lab/lab.cpp
index 9b0ebfc4e5..39b2feb93d 100644
--- a/engines/lab/lab.cpp
+++ b/engines/lab/lab.cpp
@@ -31,6 +31,7 @@
#include "common/config-manager.h"
#include "common/debug-channels.h"
#include "common/error.h"
+#include "common/file.h"
#include "engines/util.h"
diff --git a/engines/lab/map.cpp b/engines/lab/map.cpp
index 5c6bb07814..057cac3589 100644
--- a/engines/lab/map.cpp
+++ b/engines/lab/map.cpp
@@ -28,6 +28,8 @@
*
*/
+#include "common/file.h"
+
#include "lab/lab.h"
#include "lab/dispman.h"
diff --git a/engines/lab/music.cpp b/engines/lab/music.cpp
index b58d6dc923..579f450456 100644
--- a/engines/lab/music.cpp
+++ b/engines/lab/music.cpp
@@ -28,6 +28,8 @@
*
*/
+#include "common/file.h"
+#include "audio/audiostream.h"
#include "audio/decoders/raw.h"
#include "lab/lab.h"
diff --git a/engines/lab/music.h b/engines/lab/music.h
index 472fe4fef7..8175e350f1 100644
--- a/engines/lab/music.h
+++ b/engines/lab/music.h
@@ -31,9 +31,11 @@
#ifndef LAB_MUSIC_H
#define LAB_MUSIC_H
-#include "common/file.h"
#include "audio/mixer.h"
-#include "audio/audiostream.h"
+
+namespace Common {
+class File;
+}
namespace Lab {
diff --git a/engines/lab/resource.cpp b/engines/lab/resource.cpp
index aae369fbae..9cb35d1088 100644
--- a/engines/lab/resource.cpp
+++ b/engines/lab/resource.cpp
@@ -28,6 +28,8 @@
*
*/
+#include "common/file.h"
+
#include "lab/lab.h"
#include "lab/dispman.h"
diff --git a/engines/lab/special.cpp b/engines/lab/special.cpp
index 9f9b993afa..7c3cb39931 100644
--- a/engines/lab/special.cpp
+++ b/engines/lab/special.cpp
@@ -28,6 +28,8 @@
*
*/
+#include "common/file.h"
+
#include "lab/lab.h"
#include "lab/anim.h"
diff --git a/engines/lure/lure.h b/engines/lure/lure.h
index b6eb9123ad..af00197c3f 100644
--- a/engines/lure/lure.h
+++ b/engines/lure/lure.h
@@ -25,7 +25,6 @@
#include "engines/engine.h"
#include "common/rect.h"
-#include "audio/mixer.h"
#include "common/file.h"
#include "common/savefile.h"
#include "common/util.h"
diff --git a/engines/mads/nebular/sound_nebular.cpp b/engines/mads/nebular/sound_nebular.cpp
index 4c360b23d5..5f71c99a94 100644
--- a/engines/mads/nebular/sound_nebular.cpp
+++ b/engines/mads/nebular/sound_nebular.cpp
@@ -20,16 +20,15 @@
*
*/
-#include "audio/audiostream.h"
#include "audio/fmopl.h"
-#include "audio/decoders/raw.h"
#include "common/algorithm.h"
-#include "common/debug.h"
#include "common/md5.h"
-#include "common/memstream.h"
-#include "mads/sound.h"
#include "mads/nebular/sound_nebular.h"
+namespace Audio {
+class Mixer;
+}
+
namespace MADS {
namespace Nebular {
diff --git a/engines/mads/nebular/sound_nebular.h b/engines/mads/nebular/sound_nebular.h
index 2b80b08d89..a9e1493109 100644
--- a/engines/mads/nebular/sound_nebular.h
+++ b/engines/mads/nebular/sound_nebular.h
@@ -27,8 +27,14 @@
#include "common/file.h"
#include "common/mutex.h"
#include "common/queue.h"
-#include "audio/audiostream.h"
-#include "audio/mixer.h"
+
+namespace Audio {
+class Mixer;
+}
+
+namespace Common {
+class SeekableReadStream;
+}
namespace OPL {
class OPL;
@@ -36,8 +42,6 @@ class OPL;
namespace MADS {
-class SoundManager;
-
namespace Nebular {
class ASound;
diff --git a/engines/mads/sound.cpp b/engines/mads/sound.cpp
index c96fd01882..5f2c9aca56 100644
--- a/engines/mads/sound.cpp
+++ b/engines/mads/sound.cpp
@@ -20,14 +20,16 @@
*
*/
-#include "audio/audiostream.h"
#include "audio/fmopl.h"
-#include "audio/decoders/raw.h"
#include "common/memstream.h"
#include "mads/sound.h"
#include "mads/mads.h"
#include "mads/nebular/sound_nebular.h"
+namespace Audio {
+class Mixer;
+}
+
namespace MADS {
SoundManager::SoundManager(MADSEngine *vm, Audio::Mixer *mixer) {
diff --git a/engines/mads/sound.h b/engines/mads/sound.h
index 2c4de6f21d..9674d4198d 100644
--- a/engines/mads/sound.h
+++ b/engines/mads/sound.h
@@ -25,12 +25,21 @@
#include "common/scummsys.h"
#include "common/queue.h"
-#include "audio/audiostream.h"
-#include "audio/mixer.h"
-#include "mads/nebular/sound_nebular.h"
+
+namespace Audio {
+class Mixer;
+}
+
+namespace OPL {
+class OPL;
+}
namespace MADS {
+namespace Nebular {
+class ASound;
+}
+
class MADSEngine;
class SoundManager {
diff --git a/engines/mohawk/sound.cpp b/engines/mohawk/sound.cpp
index a2c08d4a92..38cb0b3608 100644
--- a/engines/mohawk/sound.cpp
+++ b/engines/mohawk/sound.cpp
@@ -23,12 +23,12 @@
#include "common/debug.h"
#include "common/events.h"
#include "common/system.h"
-#include "common/util.h"
#include "common/textconsole.h"
+#include "audio/mididrv.h"
#include "audio/midiparser.h"
-#include "audio/musicplugin.h"
#include "audio/audiostream.h"
+#include "audio/decoders/adpcm.h"
#include "audio/decoders/mp3.h"
#include "audio/decoders/raw.h"
#include "audio/decoders/wave.h"
diff --git a/engines/mohawk/sound.h b/engines/mohawk/sound.h
index c62e6e9874..f09706e155 100644
--- a/engines/mohawk/sound.h
+++ b/engines/mohawk/sound.h
@@ -26,9 +26,7 @@
#include "common/scummsys.h"
#include "common/str.h"
-#include "audio/audiostream.h"
#include "audio/mixer.h"
-#include "audio/decoders/adpcm.h"
#include "mohawk/mohawk.h"
#include "mohawk/resource.h"
@@ -36,6 +34,10 @@
class MidiDriver;
class MidiParser;
+namespace Audio {
+class RewindableAudioStream;
+}
+
namespace Mohawk {
#define MAX_CHANNELS 2 // Can there be more than 2?
diff --git a/engines/mortevielle/sound.cpp b/engines/mortevielle/sound.cpp
index f02ccb69ea..77eba4cd6d 100644
--- a/engines/mortevielle/sound.cpp
+++ b/engines/mortevielle/sound.cpp
@@ -28,6 +28,7 @@
#include "mortevielle/mortevielle.h"
#include "mortevielle/sound.h"
+#include "audio/audiostream.h"
#include "audio/decoders/raw.h"
#include "common/scummsys.h"
diff --git a/engines/mortevielle/sound.h b/engines/mortevielle/sound.h
index d913684935..15b4667afa 100644
--- a/engines/mortevielle/sound.h
+++ b/engines/mortevielle/sound.h
@@ -28,11 +28,14 @@
#ifndef MORTEVIELLE_SOUND_H
#define MORTEVIELLE_SOUND_H
-#include "audio/audiostream.h"
#include "audio/mixer.h"
#include "common/mutex.h"
#include "common/queue.h"
+namespace Audio {
+class QueuingAudioStream;
+}
+
namespace Mortevielle {
class MortevielleEngine;
diff --git a/engines/neverhood/neverhood.h b/engines/neverhood/neverhood.h
index 0661bcba0e..9eac4ffc44 100644
--- a/engines/neverhood/neverhood.h
+++ b/engines/neverhood/neverhood.h
@@ -30,7 +30,6 @@
#include "common/savefile.h"
#include "common/str-array.h"
#include "common/system.h"
-#include "audio/mixer.h"
#include "engines/engine.h"
#include "gui/debugger.h"
#include "neverhood/console.h"
diff --git a/engines/neverhood/sound.h b/engines/neverhood/sound.h
index 512b0fef98..24947f0191 100644
--- a/engines/neverhood/sound.h
+++ b/engines/neverhood/sound.h
@@ -24,6 +24,7 @@
#define NEVERHOOD_SOUND_H
#include "audio/audiostream.h"
+#include "audio/mixer.h"
#include "common/array.h"
#include "graphics/surface.h"
#include "neverhood/neverhood.h"
diff --git a/engines/prince/prince.cpp b/engines/prince/prince.cpp
index 55f12a6560..b39d26e056 100644
--- a/engines/prince/prince.cpp
+++ b/engines/prince/prince.cpp
@@ -41,6 +41,7 @@
#include "engines/advancedDetector.h"
#include "audio/audiostream.h"
+#include "audio/decoders/wave.h"
#include "prince/prince.h"
#include "prince/font.h"
diff --git a/engines/prince/sound.cpp b/engines/prince/sound.cpp
index 032297ee43..c9746842ef 100644
--- a/engines/prince/sound.cpp
+++ b/engines/prince/sound.cpp
@@ -20,15 +20,13 @@
*
*/
-#include "prince/prince.h"
#include "prince/sound.h"
#include "prince/musNum.h"
-#include "common/config-manager.h"
-#include "common/memstream.h"
#include "common/archive.h"
-#include "audio/decoders/raw.h"
-#include "audio/audiostream.h"
+#include "common/debug.h"
+#include "audio/mididrv.h"
+#include "audio/midiparser.h"
namespace Prince {
diff --git a/engines/prince/sound.h b/engines/prince/sound.h
index cc44b0a110..4257a4a37b 100644
--- a/engines/prince/sound.h
+++ b/engines/prince/sound.h
@@ -23,13 +23,7 @@
#ifndef PRINCE_SOUND_H
#define PRINCE_SOUND_H
-#include "audio/audiostream.h"
-#include "audio/decoders/wave.h"
-#include "audio/fmopl.h"
-#include "audio/mididrv.h"
-#include "audio/midiparser.h"
#include "audio/midiplayer.h"
-#include "audio/mixer.h"
#include "common/memstream.h"
namespace Prince {
diff --git a/engines/queen/sound.cpp b/engines/queen/sound.cpp
index 63e24454c1..d715d3737e 100644
--- a/engines/queen/sound.cpp
+++ b/engines/queen/sound.cpp
@@ -35,10 +35,10 @@
#include "audio/audiostream.h"
#include "audio/decoders/flac.h"
-#include "audio/mididrv.h"
#include "audio/decoders/mp3.h"
#include "audio/decoders/raw.h"
#include "audio/decoders/vorbis.h"
+#include "audio/mods/rjp1.h"
#define SB_HEADER_SIZE_V104 110
#define SB_HEADER_SIZE_V110 122
diff --git a/engines/queen/sound.h b/engines/queen/sound.h
index d06d93b9e1..f5d3970b80 100644
--- a/engines/queen/sound.h
+++ b/engines/queen/sound.h
@@ -23,10 +23,11 @@
#ifndef QUEEN_SOUND_H
#define QUEEN_SOUND_H
-#include "common/util.h"
#include "audio/mixer.h"
-#include "audio/mods/rjp1.h"
-#include "queen/defs.h"
+
+namespace Audio {
+class AudioStream;
+}
namespace Common {
class File;
diff --git a/engines/saga/music.cpp b/engines/saga/music.cpp
index cd48ebaa4d..0bc1e8a2a0 100644
--- a/engines/saga/music.cpp
+++ b/engines/saga/music.cpp
@@ -32,7 +32,10 @@
#include "audio/midiparser.h"
#include "audio/midiparser_qt.h"
#include "audio/miles.h"
+#include "audio/decoders/flac.h"
+#include "audio/decoders/mp3.h"
#include "audio/decoders/raw.h"
+#include "audio/decoders/vorbis.h"
#include "common/config-manager.h"
#include "common/file.h"
#include "common/substream.h"
diff --git a/engines/saga/music.h b/engines/saga/music.h
index 2e7cc4c5ec..0213f4108a 100644
--- a/engines/saga/music.h
+++ b/engines/saga/music.h
@@ -25,13 +25,10 @@
#ifndef SAGA_MUSIC_H
#define SAGA_MUSIC_H
+#include "audio/mididrv.h"
#include "audio/midiplayer.h"
#include "audio/midiparser.h"
#include "audio/mixer.h"
-#include "audio/decoders/mp3.h"
-#include "audio/decoders/vorbis.h"
-#include "audio/decoders/flac.h"
-#include "common/mutex.h"
namespace Saga {
diff --git a/engines/saga/shorten.cpp b/engines/saga/shorten.cpp
index 1e1c397212..db67d510bc 100644
--- a/engines/saga/shorten.cpp
+++ b/engines/saga/shorten.cpp
@@ -21,7 +21,9 @@
*/
#include "common/scummsys.h"
+#include "common/stream.h"
#include "common/textconsole.h"
+#include "audio/audiostream.h"
#include "saga/shorten.h"
diff --git a/engines/saga/shorten.h b/engines/saga/shorten.h
index 556abaf311..4d4ec328c6 100644
--- a/engines/saga/shorten.h
+++ b/engines/saga/shorten.h
@@ -30,9 +30,14 @@
#define SOUND_SHORTEN_H
#include "common/scummsys.h"
-#include "common/stream.h"
-#include "audio/audiostream.h"
+namespace Audio {
+class AudioStream;
+}
+
+namespace Common {
+class ReadStream;
+}
namespace Saga {
diff --git a/engines/saga/sound.cpp b/engines/saga/sound.cpp
index 0eb6f8a82a..f4e31542fe 100644
--- a/engines/saga/sound.cpp
+++ b/engines/saga/sound.cpp
@@ -27,8 +27,6 @@
#include "audio/audiostream.h"
#include "audio/mixer.h"
-#include "audio/decoders/adpcm.h"
-#include "audio/decoders/raw.h"
namespace Saga {
diff --git a/engines/sci/sound/drivers/midi.cpp b/engines/sci/sound/drivers/midi.cpp
index aa464cdc19..5e82e4a729 100644
--- a/engines/sci/sound/drivers/midi.cpp
+++ b/engines/sci/sound/drivers/midi.cpp
@@ -27,7 +27,7 @@
#include "common/memstream.h"
#include "common/system.h"
-#include "audio/fmopl.h"
+#include "audio/mididrv.h"
#include "sci/resource.h"
#include "sci/engine/features.h"
diff --git a/engines/sci/sound/music.h b/engines/sci/sound/music.h
index a610f32d89..047f63b3b7 100644
--- a/engines/sci/sound/music.h
+++ b/engines/sci/sound/music.h
@@ -27,12 +27,16 @@
#include "common/mutex.h"
#include "audio/mixer.h"
-#include "audio/audiostream.h"
#include "sci/sci.h"
#include "sci/resource.h"
#include "sci/sound/drivers/mididriver.h"
+namespace Audio {
+class LoopingAudioStream;
+class RewindableAudioStream;
+}
+
namespace Sci {
enum SoundStatus {
diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp
index e7b25eb1fc..fe33ea1feb 100644
--- a/engines/sci/sound/soundcmd.cpp
+++ b/engines/sci/sound/soundcmd.cpp
@@ -21,6 +21,8 @@
*/
#include "common/config-manager.h"
+#include "audio/audiostream.h"
+#include "audio/mixer.h"
#include "sci/sound/audio.h"
#include "sci/sound/music.h"
#include "sci/sound/soundcmd.h"
diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp
index 178c6b7dea..8a6b545bf2 100644
--- a/engines/scumm/dialogs.cpp
+++ b/engines/scumm/dialogs.cpp
@@ -43,8 +43,6 @@
#include "scumm/imuse/imuse.h"
#include "scumm/imuse_digi/dimuse.h"
#include "scumm/verbs.h"
-#include "audio/mididrv.h"
-#include "audio/mixer.h"
#ifndef DISABLE_HELP
#include "scumm/help.h"
diff --git a/engines/scumm/he/animation_he.cpp b/engines/scumm/he/animation_he.cpp
index 8483a8a402..0a3a56ceda 100644
--- a/engines/scumm/he/animation_he.cpp
+++ b/engines/scumm/he/animation_he.cpp
@@ -22,16 +22,21 @@
#ifdef ENABLE_HE
+#include "common/scummsys.h"
+
#include "scumm/he/animation_he.h"
#include "scumm/he/intern_he.h"
-#include "audio/audiostream.h"
#include "video/smk_decoder.h"
#ifdef USE_BINK
#include "video/bink_decoder.h"
#endif
+namespace Audio {
+class Mixer;
+}
+
namespace Scumm {
MoviePlayer::MoviePlayer(ScummEngine_v90he *vm, Audio::Mixer *mixer) : _vm(vm) {
diff --git a/engines/scumm/he/animation_he.h b/engines/scumm/he/animation_he.h
index 677a4b4247..6891ed8bf0 100644
--- a/engines/scumm/he/animation_he.h
+++ b/engines/scumm/he/animation_he.h
@@ -23,7 +23,9 @@
#if !defined(SCUMM_HE_ANIMATION_H) && defined(ENABLE_HE)
#define SCUMM_HE_ANIMATION_H
-#include "audio/mixer.h"
+namespace Audio {
+class Mixer;
+}
namespace Common {
class String;
diff --git a/engines/scumm/he/sound_he.cpp b/engines/scumm/he/sound_he.cpp
index b806a9f3cc..9a456b86c0 100644
--- a/engines/scumm/he/sound_he.cpp
+++ b/engines/scumm/he/sound_he.cpp
@@ -34,14 +34,10 @@
#include "common/timer.h"
#include "common/util.h"
+#include "audio/audiostream.h"
#include "audio/decoders/adpcm.h"
-#include "audio/decoders/flac.h"
-#include "audio/mididrv.h"
#include "audio/mixer.h"
-#include "audio/decoders/mp3.h"
#include "audio/decoders/raw.h"
-#include "audio/decoders/voc.h"
-#include "audio/decoders/vorbis.h"
#include "audio/decoders/wave.h"
namespace Scumm {
diff --git a/engines/scumm/imuse_digi/dimuse.h b/engines/scumm/imuse_digi/dimuse.h
index f04c2f7826..11b1ea678b 100644
--- a/engines/scumm/imuse_digi/dimuse.h
+++ b/engines/scumm/imuse_digi/dimuse.h
@@ -34,8 +34,10 @@
#include "scumm/music.h"
#include "scumm/sound.h"
-#include "audio/mixer.h"
-#include "audio/audiostream.h"
+namespace Audio {
+class AudioStream;
+class Mixer;
+}
namespace Scumm {
diff --git a/engines/scumm/imuse_digi/dimuse_sndmgr.cpp b/engines/scumm/imuse_digi/dimuse_sndmgr.cpp
index 78d05c2051..b2ff3aadbb 100644
--- a/engines/scumm/imuse_digi/dimuse_sndmgr.cpp
+++ b/engines/scumm/imuse_digi/dimuse_sndmgr.cpp
@@ -22,8 +22,8 @@
#include "common/scummsys.h"
-#include "common/util.h"
+#include "audio/audiostream.h"
#include "audio/decoders/flac.h"
#include "audio/decoders/voc.h"
#include "audio/decoders/vorbis.h"
@@ -31,8 +31,6 @@
#include "scumm/resource.h"
#include "scumm/scumm.h"
-#include "scumm/util.h"
-#include "scumm/imuse_digi/dimuse.h"
#include "scumm/imuse_digi/dimuse_bndmgr.h"
#include "scumm/imuse_digi/dimuse_codecs.h"
#include "scumm/imuse_digi/dimuse_sndmgr.h"
diff --git a/engines/scumm/imuse_digi/dimuse_sndmgr.h b/engines/scumm/imuse_digi/dimuse_sndmgr.h
index aebf4d7f11..2f91405588 100644
--- a/engines/scumm/imuse_digi/dimuse_sndmgr.h
+++ b/engines/scumm/imuse_digi/dimuse_sndmgr.h
@@ -25,13 +25,20 @@
#include "common/scummsys.h"
-#include "audio/audiostream.h"
-#include "scumm/imuse_digi/dimuse_bndmgr.h"
+
+namespace Audio {
+class SeekableAudioStream;
+}
+
+namespace Common {
+class SeekableReadStream;
+}
namespace Scumm {
class ScummEngine;
class BundleMgr;
+class BundleDirCache;
class ImuseDigiSndMgr {
public:
diff --git a/engines/scumm/imuse_digi/dimuse_track.h b/engines/scumm/imuse_digi/dimuse_track.h
index 7e360268e5..a007903139 100644
--- a/engines/scumm/imuse_digi/dimuse_track.h
+++ b/engines/scumm/imuse_digi/dimuse_track.h
@@ -24,6 +24,11 @@
#define SCUMM_IMUSE_DIGI_TRACK_H
#include "common/scummsys.h"
+#include "audio/mixer.h"
+
+namespace Audio {
+class QueuingAudioStream;
+}
namespace Scumm {
diff --git a/engines/scumm/midiparser_ro.cpp b/engines/scumm/midiparser_ro.cpp
index 35eb9f7eb7..5fc1ae41ab 100644
--- a/engines/scumm/midiparser_ro.cpp
+++ b/engines/scumm/midiparser_ro.cpp
@@ -22,9 +22,7 @@
#include "audio/midiparser.h"
-#include "audio/mididrv.h"
#include "common/textconsole.h"
-#include "common/util.h"
namespace Scumm {
diff --git a/engines/scumm/players/player_ad.h b/engines/scumm/players/player_ad.h
index 9cd1a06261..1e665e82d5 100644
--- a/engines/scumm/players/player_ad.h
+++ b/engines/scumm/players/player_ad.h
@@ -25,8 +25,6 @@
#include "scumm/music.h"
-#include "audio/audiostream.h"
-
#include "common/mutex.h"
namespace OPL {
@@ -36,6 +34,7 @@ class OPL;
namespace Scumm {
class ScummEngine;
+class Serializer;
/**
* Sound output for v3/v4 AdLib data.
diff --git a/engines/scumm/players/player_apple2.h b/engines/scumm/players/player_apple2.h
index 8efb951f20..2e897d58f4 100644
--- a/engines/scumm/players/player_apple2.h
+++ b/engines/scumm/players/player_apple2.h
@@ -25,11 +25,9 @@
#include "common/mutex.h"
#include "common/scummsys.h"
-#include "common/memstream.h"
#include "scumm/music.h"
#include "audio/audiostream.h"
#include "audio/mixer.h"
-#include "audio/softsynth/sid.h"
namespace Scumm {
diff --git a/engines/scumm/players/player_v2cms.cpp b/engines/scumm/players/player_v2cms.cpp
index 08321932c3..1a1cd1ed8c 100644
--- a/engines/scumm/players/player_v2cms.cpp
+++ b/engines/scumm/players/player_v2cms.cpp
@@ -22,7 +22,6 @@
#include "scumm/players/player_v2cms.h"
#include "scumm/scumm.h"
-#include "audio/mididrv.h"
#include "audio/mixer.h"
#include "audio/softsynth/cms.h"
diff --git a/engines/scumm/players/player_v3m.h b/engines/scumm/players/player_v3m.h
index 81dda801fc..645f1fb1c9 100644
--- a/engines/scumm/players/player_v3m.h
+++ b/engines/scumm/players/player_v3m.h
@@ -28,10 +28,10 @@
#include "common/mutex.h"
#include "scumm/music.h"
#include "scumm/players/player_mac.h"
-#include "audio/audiostream.h"
-#include "audio/mixer.h"
+namespace Audio {
class Mixer;
+}
namespace Scumm {
diff --git a/engines/scumm/players/player_v5m.h b/engines/scumm/players/player_v5m.h
index f60a3f9346..152aa1541a 100644
--- a/engines/scumm/players/player_v5m.h
+++ b/engines/scumm/players/player_v5m.h
@@ -28,10 +28,10 @@
#include "common/mutex.h"
#include "scumm/music.h"
#include "scumm/players/player_mac.h"
-#include "audio/audiostream.h"
-#include "audio/mixer.h"
+namespace Audio {
class Mixer;
+}
namespace Scumm {
diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp
index f3df24ff51..40dc83c7f3 100644
--- a/engines/scumm/saveload.cpp
+++ b/engines/scumm/saveload.cpp
@@ -41,8 +41,6 @@
#include "scumm/he/sprite_he.h"
#include "scumm/verbs.h"
-#include "audio/mixer.h"
-
#include "backends/audiocd/audiocd.h"
#include "graphics/thumbnail.h"
diff --git a/engines/scumm/smush/smush_mixer.cpp b/engines/scumm/smush/smush_mixer.cpp
index 42e8f645be..445186d62b 100644
--- a/engines/scumm/smush/smush_mixer.cpp
+++ b/engines/scumm/smush/smush_mixer.cpp
@@ -21,14 +21,11 @@
*/
-#include "common/util.h"
-
#include "scumm/smush/smush_mixer.h"
#include "scumm/smush/channel.h"
#include "scumm/scumm.h"
-#include "scumm/sound.h"
-#include "scumm/imuse/imuse.h"
+#include "audio/audiostream.h"
#include "audio/mixer.h"
#include "audio/decoders/raw.h"
diff --git a/engines/scumm/smush/smush_mixer.h b/engines/scumm/smush/smush_mixer.h
index 18ec7f96fb..1bd6adac16 100644
--- a/engines/scumm/smush/smush_mixer.h
+++ b/engines/scumm/smush/smush_mixer.h
@@ -28,6 +28,10 @@
#include "common/mutex.h"
#include "scumm/sound.h"
+namespace Audio {
+class QueuingAudioStream;
+}
+
namespace Scumm {
class SmushChannel;
diff --git a/engines/scumm/smush/smush_player.cpp b/engines/scumm/smush/smush_player.cpp
index 05c7ff2d9a..2ca2579b54 100644
--- a/engines/scumm/smush/smush_player.cpp
+++ b/engines/scumm/smush/smush_player.cpp
@@ -20,8 +20,6 @@
*
*/
-#include "engines/engine.h"
-
#include "common/config-manager.h"
#include "common/file.h"
#include "common/system.h"
@@ -30,14 +28,11 @@
#include "graphics/cursorman.h"
#include "graphics/palette.h"
-#include "scumm/bomp.h"
#include "scumm/file.h"
#include "scumm/imuse_digi/dimuse.h"
-#include "scumm/imuse/imuse.h"
#include "scumm/scumm.h"
#include "scumm/scumm_v7.h"
#include "scumm/sound.h"
-#include "scumm/util.h"
#include "scumm/smush/channel.h"
#include "scumm/smush/codec37.h"
#include "scumm/smush/codec47.h"
@@ -47,6 +42,7 @@
#include "scumm/insane/insane.h"
+#include "audio/audiostream.h"
#include "audio/mixer.h"
#include "audio/decoders/mp3.h"
#include "audio/decoders/raw.h"
diff --git a/engines/scumm/smush/smush_player.h b/engines/scumm/smush/smush_player.h
index 81c498a516..b0d6e6a9f0 100644
--- a/engines/scumm/smush/smush_player.h
+++ b/engines/scumm/smush/smush_player.h
@@ -26,6 +26,10 @@
#include "common/util.h"
#include "scumm/sound.h"
+namespace Audio {
+class QueuingAudioStream;
+}
+
namespace Scumm {
class ScummEngine_v7;
diff --git a/engines/scumm/sound.cpp b/engines/scumm/sound.cpp
index 404bdd022c..f66452e99c 100644
--- a/engines/scumm/sound.cpp
+++ b/engines/scumm/sound.cpp
@@ -35,9 +35,9 @@
#include "scumm/resource.h"
#include "scumm/scumm.h"
#include "scumm/sound.h"
-#include "scumm/util.h"
-#include "audio/decoders/adpcm.h"
+#include "audio/audiostream.h"
+#include "audio/timestamp.h"
#include "audio/decoders/flac.h"
#include "audio/mididrv.h"
#include "audio/mixer.h"
@@ -45,7 +45,6 @@
#include "audio/decoders/raw.h"
#include "audio/decoders/voc.h"
#include "audio/decoders/vorbis.h"
-#include "audio/decoders/wave.h"
namespace Scumm {
diff --git a/engines/scumm/sound.h b/engines/scumm/sound.h
index a479ad5731..8c11c7b5b2 100644
--- a/engines/scumm/sound.h
+++ b/engines/scumm/sound.h
@@ -24,23 +24,17 @@
#define SCUMM_SOUND_H
#include "common/scummsys.h"
-#include "audio/audiostream.h"
+#include "common/str.h"
#include "audio/mididrv.h"
#include "audio/mixer.h"
#include "backends/audiocd/audiocd.h"
#include "scumm/saveload.h"
-namespace Audio {
-class Mixer;
-}
-
namespace Scumm {
class ScummEngine;
-class BaseScummFile;
struct MP3OffsetTable;
-struct SaveLoadEntry;
enum {
kTalkSoundID = 10000
diff --git a/engines/sherlock/debugger.cpp b/engines/sherlock/debugger.cpp
index 39f8da3806..55243c4bc7 100644
--- a/engines/sherlock/debugger.cpp
+++ b/engines/sherlock/debugger.cpp
@@ -26,9 +26,6 @@
#include "sherlock/scalpel/scalpel.h"
#include "sherlock/scalpel/scalpel_debugger.h"
#include "sherlock/tattoo/tattoo_debugger.h"
-#include "audio/mixer.h"
-#include "audio/decoders/aiff.h"
-#include "audio/decoders/wave.h"
#include "common/str-array.h"
namespace Sherlock {
diff --git a/engines/sherlock/music.cpp b/engines/sherlock/music.cpp
index 5ea3318bd7..c52c30191a 100644
--- a/engines/sherlock/music.cpp
+++ b/engines/sherlock/music.cpp
@@ -26,6 +26,7 @@
#include "sherlock/sherlock.h"
#include "sherlock/music.h"
#include "sherlock/scalpel/drivers/mididriver.h"
+#include "audio/audiostream.h"
// for Miles Audio (Sherlock Holmes 2)
#include "audio/miles.h"
// for 3DO digital music
diff --git a/engines/sherlock/music.h b/engines/sherlock/music.h
index 186e2aa2dc..b1eba1d889 100644
--- a/engines/sherlock/music.h
+++ b/engines/sherlock/music.h
@@ -23,12 +23,9 @@
#ifndef SHERLOCK_MUSIC_H
#define SHERLOCK_MUSIC_H
-#include "audio/midiplayer.h"
#include "audio/midiparser.h"
-//#include "audio/mididrv.h"
-#include "sherlock/scalpel/drivers/mididriver.h"
+#include "audio/mididrv.h"
// for 3DO digital music
-#include "audio/audiostream.h"
#include "audio/mixer.h"
#include "common/mutex.h"
#include "common/str-array.h"
diff --git a/engines/sherlock/scalpel/3do/movie_decoder.cpp b/engines/sherlock/scalpel/3do/movie_decoder.cpp
index da4d08ca47..da0d16c145 100644
--- a/engines/sherlock/scalpel/3do/movie_decoder.cpp
+++ b/engines/sherlock/scalpel/3do/movie_decoder.cpp
@@ -25,7 +25,6 @@
#include "common/textconsole.h"
#include "audio/audiostream.h"
-#include "audio/decoders/raw.h"
#include "audio/decoders/3do.h"
#include "sherlock/scalpel/3do/movie_decoder.h"
diff --git a/engines/sherlock/scalpel/drivers/adlib.cpp b/engines/sherlock/scalpel/drivers/adlib.cpp
index 29a39f0c39..3d29d0c5ed 100644
--- a/engines/sherlock/scalpel/drivers/adlib.cpp
+++ b/engines/sherlock/scalpel/drivers/adlib.cpp
@@ -21,14 +21,12 @@
*/
#include "sherlock/sherlock.h"
-#include "sherlock/scalpel/drivers/mididriver.h"
-#include "common/file.h"
#include "common/system.h"
#include "common/textconsole.h"
#include "audio/fmopl.h"
-#include "audio/softsynth/emumidi.h"
+#include "audio/mididrv.h"
namespace Sherlock {
diff --git a/engines/sherlock/scalpel/scalpel_debugger.cpp b/engines/sherlock/scalpel/scalpel_debugger.cpp
index 1495c76b43..02b39ade9b 100644
--- a/engines/sherlock/scalpel/scalpel_debugger.cpp
+++ b/engines/sherlock/scalpel/scalpel_debugger.cpp
@@ -22,10 +22,9 @@
#include "sherlock/scalpel/scalpel_debugger.h"
#include "sherlock/sherlock.h"
+#include "audio/audiostream.h"
#include "audio/mixer.h"
-#include "audio/decoders/3do.h"
#include "audio/decoders/aiff.h"
-#include "audio/decoders/wave.h"
namespace Sherlock {
diff --git a/engines/sherlock/sound.h b/engines/sherlock/sound.h
index 0a0ff83d1f..a82aaf6730 100644
--- a/engines/sherlock/sound.h
+++ b/engines/sherlock/sound.h
@@ -25,11 +25,8 @@
#include "common/scummsys.h"
#include "common/str.h"
-#include "audio/audiostream.h"
#include "audio/mixer.h"
#include "access/files.h"
-#include "audio/midiplayer.h"
-#include "audio/midiparser.h"
namespace Sherlock {
diff --git a/engines/sky/music/adlibchannel.cpp b/engines/sky/music/adlibchannel.cpp
index c7acb9b6c1..2f44add466 100644
--- a/engines/sky/music/adlibchannel.cpp
+++ b/engines/sky/music/adlibchannel.cpp
@@ -23,7 +23,7 @@
#include "common/endian.h"
#include "common/textconsole.h"
-#include "common/util.h"
+#include "audio/fmopl.h"
#include "sky/music/adlibchannel.h"
#include "sky/sky.h"
diff --git a/engines/sky/music/adlibchannel.h b/engines/sky/music/adlibchannel.h
index 4504e3b570..b190ba27dc 100644
--- a/engines/sky/music/adlibchannel.h
+++ b/engines/sky/music/adlibchannel.h
@@ -24,7 +24,10 @@
#define SKY_MUSIC_ADLIBCHANNEL_H
#include "sky/music/musicbase.h"
-#include "audio/fmopl.h"
+
+namespace OPL {
+class OPL;
+}
namespace Sky {
diff --git a/engines/sky/music/adlibmusic.cpp b/engines/sky/music/adlibmusic.cpp
index be5e7b2353..1a2a91c82a 100644
--- a/engines/sky/music/adlibmusic.cpp
+++ b/engines/sky/music/adlibmusic.cpp
@@ -26,9 +26,13 @@
#include "sky/music/adlibmusic.h"
#include "sky/music/adlibchannel.h"
-#include "audio/mixer.h"
+#include "audio/fmopl.h"
#include "sky/sky.h"
+namespace Audio {
+class Mixer;
+}
+
namespace Sky {
AdLibMusic::AdLibMusic(Audio::Mixer *pMixer, Disk *pDisk) : MusicBase(pMixer, pDisk) {
diff --git a/engines/sky/music/adlibmusic.h b/engines/sky/music/adlibmusic.h
index 7b51f2d3a0..ebfa038848 100644
--- a/engines/sky/music/adlibmusic.h
+++ b/engines/sky/music/adlibmusic.h
@@ -24,7 +24,10 @@
#define SKY_MUSIC_ADLIBMUSIC_H
#include "sky/music/musicbase.h"
-#include "audio/audiostream.h"
+
+namespace Audio {
+class Mixer;
+}
namespace OPL {
class OPL;
diff --git a/engines/sword1/logic.h b/engines/sword1/logic.h
index 94da2b3a77..005846df16 100644
--- a/engines/sword1/logic.h
+++ b/engines/sword1/logic.h
@@ -28,10 +28,13 @@
#include "sword1/objectman.h"
#include "common/util.h"
#include "common/random.h"
-#include "audio/mixer.h"
class OSystem;
+namespace Audio {
+class Mixer;
+}
+
namespace Sword1 {
#define NON_ZERO_SCRIPT_VARS 95
diff --git a/engines/sword1/sound.cpp b/engines/sword1/sound.cpp
index 4deaf06edc..a37f7d250d 100644
--- a/engines/sword1/sound.cpp
+++ b/engines/sword1/sound.cpp
@@ -37,7 +37,6 @@
#include "audio/decoders/mp3.h"
#include "audio/decoders/raw.h"
#include "audio/decoders/vorbis.h"
-#include "audio/decoders/wave.h"
#include "audio/decoders/xa.h"
namespace Sword1 {
diff --git a/engines/sword2/music.cpp b/engines/sword2/music.cpp
index 62fb3d244d..462a49055d 100644
--- a/engines/sword2/music.cpp
+++ b/engines/sword2/music.cpp
@@ -35,10 +35,11 @@
#include "common/system.h"
#include "common/textconsole.h"
+#include "audio/audiostream.h"
+#include "audio/mixer.h"
#include "audio/decoders/mp3.h"
#include "audio/decoders/vorbis.h"
#include "audio/decoders/flac.h"
-#include "audio/decoders/wave.h"
#include "audio/decoders/xa.h"
#include "audio/rate.h"
diff --git a/engines/sword25/sfx/soundengine.cpp b/engines/sword25/sfx/soundengine.cpp
index dcb29cb380..46f27b06f0 100644
--- a/engines/sword25/sfx/soundengine.cpp
+++ b/engines/sword25/sfx/soundengine.cpp
@@ -36,6 +36,7 @@
#include "sword25/kernel/inputpersistenceblock.h"
#include "sword25/kernel/outputpersistenceblock.h"
+#include "audio/audiostream.h"
#include "audio/decoders/vorbis.h"
#include "common/system.h"
diff --git a/engines/sword25/sfx/soundengine.h b/engines/sword25/sfx/soundengine.h
index 1dd7ba0925..9bf251be15 100644
--- a/engines/sword25/sfx/soundengine.h
+++ b/engines/sword25/sfx/soundengine.h
@@ -49,7 +49,6 @@
#include "sword25/kernel/resservice.h"
#include "sword25/kernel/persistable.h"
-#include "audio/audiostream.h"
#include "audio/mixer.h"
namespace Sword25 {
diff --git a/engines/teenagent/font.cpp b/engines/teenagent/font.cpp
index ab75a45ba7..f691ace32d 100644
--- a/engines/teenagent/font.cpp
+++ b/engines/teenagent/font.cpp
@@ -25,6 +25,7 @@
#include "teenagent/pack.h"
#include "teenagent/teenagent.h"
+#include "common/debug.h"
#include "common/endian.h"
#include "common/stream.h"
#include "common/textconsole.h"
diff --git a/engines/teenagent/resources.cpp b/engines/teenagent/resources.cpp
index 8d8f705a24..3cf566a0e5 100644
--- a/engines/teenagent/resources.cpp
+++ b/engines/teenagent/resources.cpp
@@ -22,6 +22,7 @@
#include "teenagent/resources.h"
#include "teenagent/teenagent.h"
+#include "common/debug.h"
#include "common/textconsole.h"
#include "common/translation.h"
#include "common/zlib.h"
diff --git a/engines/teenagent/teenagent.h b/engines/teenagent/teenagent.h
index a06f8dbf9b..234bfb1c57 100644
--- a/engines/teenagent/teenagent.h
+++ b/engines/teenagent/teenagent.h
@@ -25,11 +25,9 @@
#include "engines/engine.h"
-#include "audio/audiostream.h"
#include "audio/mixer.h"
#include "common/random.h"
-#include "common/rect.h"
#include "common/array.h"
#include "gui/debugger.h"
@@ -39,6 +37,14 @@
struct ADGameDescription;
+namespace Audio {
+class AudioStream;
+}
+
+namespace Common {
+struct Point;
+}
+
/**
* This is the namespace of the TeenAgent engine.
*
@@ -53,7 +59,6 @@ struct Object;
struct UseHotspot;
class Scene;
class MusicPlayer;
-class Dialog;
class Resources;
class Inventory;
diff --git a/engines/testbed/midi.cpp b/engines/testbed/midi.cpp
index daa5f1cf3c..5ede21f4ab 100644
--- a/engines/testbed/midi.cpp
+++ b/engines/testbed/midi.cpp
@@ -27,6 +27,7 @@
#include "graphics/cursorman.h"
#include "audio/mididrv.h"
+#include "audio/midiparser.h"
#include "testbed/midi.h"
#include "testbed/testbed.h"
diff --git a/engines/testbed/midi.h b/engines/testbed/midi.h
index b9f3e82abd..5ed0a73913 100644
--- a/engines/testbed/midi.h
+++ b/engines/testbed/midi.h
@@ -23,12 +23,16 @@
#ifndef TESTBED_MIDI_H
#define TESTBED_MIDI_H
-#include "common/stream.h"
-#include "audio/midiparser.h"
#include "testbed/testsuite.h"
// This file can be used as template for header files of other newer testsuites.
+class MidiParser;
+
+namespace Common {
+class WriteStream;
+}
+
namespace Testbed {
namespace MidiTests {
diff --git a/engines/tinsel/bmv.cpp b/engines/tinsel/bmv.cpp
index f28cd684f9..22c3798fc6 100644
--- a/engines/tinsel/bmv.cpp
+++ b/engines/tinsel/bmv.cpp
@@ -39,6 +39,7 @@
#include "tinsel/tinlib.h"
#include "tinsel/tinsel.h"
+#include "audio/audiostream.h"
#include "audio/decoders/raw.h"
#include "common/textconsole.h"
diff --git a/engines/tinsel/bmv.h b/engines/tinsel/bmv.h
index e52297f9de..888f910627 100644
--- a/engines/tinsel/bmv.h
+++ b/engines/tinsel/bmv.h
@@ -27,12 +27,15 @@
#include "common/coroutines.h"
#include "common/file.h"
-#include "audio/audiostream.h"
#include "audio/mixer.h"
#include "tinsel/object.h"
#include "tinsel/palette.h"
+namespace Audio {
+class QueuingAudioStream;
+}
+
namespace Tinsel {
diff --git a/engines/tinsel/music.cpp b/engines/tinsel/music.cpp
index e0c1f8d1f9..32d5abb865 100644
--- a/engines/tinsel/music.cpp
+++ b/engines/tinsel/music.cpp
@@ -29,7 +29,6 @@
#include "audio/midiparser.h"
// Miles Audio for Discworld 1
#include "audio/miles.h"
-#include "audio/decoders/adpcm.h"
#include "backends/audiocd/audiocd.h"
diff --git a/engines/tinsel/sound.cpp b/engines/tinsel/sound.cpp
index 3d87a17331..a13e91fb3c 100644
--- a/engines/tinsel/sound.cpp
+++ b/engines/tinsel/sound.cpp
@@ -27,7 +27,6 @@
#include "tinsel/dw.h"
#include "tinsel/config.h"
#include "tinsel/music.h"
-#include "tinsel/strres.h"
#include "tinsel/tinsel.h"
#include "tinsel/sysvar.h"
#include "tinsel/background.h"
@@ -37,7 +36,6 @@
#include "common/system.h"
#include "audio/mixer.h"
-#include "audio/decoders/adpcm.h"
#include "audio/decoders/flac.h"
#include "audio/decoders/mp3.h"
#include "audio/decoders/raw.h"
diff --git a/engines/toltecs/movie.cpp b/engines/toltecs/movie.cpp
index 0aa0a99a36..b64903ec6d 100644
--- a/engines/toltecs/movie.cpp
+++ b/engines/toltecs/movie.cpp
@@ -20,6 +20,7 @@
*
*/
+#include "audio/audiostream.h"
#include "audio/mixer.h"
#include "audio/decoders/raw.h"
diff --git a/engines/toltecs/movie.h b/engines/toltecs/movie.h
index 9404e5f639..8c6348d700 100644
--- a/engines/toltecs/movie.h
+++ b/engines/toltecs/movie.h
@@ -23,9 +23,12 @@
#ifndef TOLTECS_MOVIE_H
#define TOLTECS_MOVIE_H
-#include "audio/audiostream.h"
#include "audio/mixer.h" // for Audio::SoundHandle
+namespace Audio {
+class QueuingAudioStream;
+}
+
namespace Toltecs {
class MoviePlayer {
diff --git a/engines/touche/touche.cpp b/engines/touche/touche.cpp
index ff4f41f44d..bb21f399c6 100644
--- a/engines/touche/touche.cpp
+++ b/engines/touche/touche.cpp
@@ -32,6 +32,7 @@
#include "common/keyboard.h"
#include "common/textconsole.h"
+#include "audio/audiostream.h"
#include "audio/mixer.h"
#include "engines/util.h"
diff --git a/engines/touche/touche.h b/engines/touche/touche.h
index 3de5b8caf2..33c415d9dc 100644
--- a/engines/touche/touche.h
+++ b/engines/touche/touche.h
@@ -31,7 +31,6 @@
#include "common/util.h"
#include "audio/mixer.h"
-#include "audio/audiostream.h"
#include "engines/engine.h"
diff --git a/engines/tsage/sound.h b/engines/tsage/sound.h
index 68755a48c8..da56c8bfa5 100644
--- a/engines/tsage/sound.h
+++ b/engines/tsage/sound.h
@@ -26,12 +26,15 @@
#include "common/scummsys.h"
#include "common/mutex.h"
#include "common/queue.h"
-#include "audio/audiostream.h"
#include "audio/mixer.h"
#include "common/list.h"
#include "tsage/saveload.h"
#include "tsage/core.h"
+namespace Audio {
+class QueuingAudioStream;
+}
+
namespace OPL {
class OPL;
}
diff --git a/engines/tsage/tsage.h b/engines/tsage/tsage.h
index 1a29700a10..dd077e526f 100644
--- a/engines/tsage/tsage.h
+++ b/engines/tsage/tsage.h
@@ -24,9 +24,6 @@
#define TSAGE_H
#include "engines/engine.h"
-#include "common/rect.h"
-#include "audio/mixer.h"
-#include "common/file.h"
#include "gui/debugger.h"
#include "tsage/core.h"
diff --git a/engines/voyeur/animation.h b/engines/voyeur/animation.h
index bc6d8a361a..c20ccf7284 100644
--- a/engines/voyeur/animation.h
+++ b/engines/voyeur/animation.h
@@ -26,13 +26,16 @@
#include "video/video_decoder.h"
#include "audio/audiostream.h"
#include "audio/mixer.h"
-#include "audio/timestamp.h"
#include "common/array.h"
#include "common/list.h"
#include "common/rect.h"
#include "common/stream.h"
#include "voyeur/files.h"
+namespace Audio {
+class Timestamp;
+}
+
namespace Voyeur {
class VoyeurEngine;
diff --git a/engines/voyeur/sound.cpp b/engines/voyeur/sound.cpp
index f47fdde3e1..483dfc7cbc 100644
--- a/engines/voyeur/sound.cpp
+++ b/engines/voyeur/sound.cpp
@@ -22,6 +22,8 @@
#include "audio/audiostream.h"
#include "audio/decoders/raw.h"
+#include "audio/decoders/voc.h"
+#include "common/file.h"
#include "common/memstream.h"
#include "voyeur/sound.h"
#include "voyeur/staticres.h"
diff --git a/engines/voyeur/sound.h b/engines/voyeur/sound.h
index af1d0b1b46..fd1d126ef0 100644
--- a/engines/voyeur/sound.h
+++ b/engines/voyeur/sound.h
@@ -26,8 +26,6 @@
#include "common/scummsys.h"
#include "common/str.h"
#include "audio/mixer.h"
-#include "audio/decoders/voc.h"
-#include "voyeur/files.h"
namespace Voyeur {
diff --git a/engines/zvision/core/events.cpp b/engines/zvision/core/events.cpp
index cc1c00b6d0..767101b952 100644
--- a/engines/zvision/core/events.cpp
+++ b/engines/zvision/core/events.cpp
@@ -35,6 +35,7 @@
#include "common/events.h"
#include "common/system.h"
#include "common/rational.h"
+#include "audio/mixer.h"
#include "engines/util.h"
diff --git a/engines/zvision/scripting/actions.h b/engines/zvision/scripting/actions.h
index bde1baa291..98d216a6d5 100644
--- a/engines/zvision/scripting/actions.h
+++ b/engines/zvision/scripting/actions.h
@@ -26,8 +26,6 @@
#include "common/str.h"
#include "common/rect.h"
-#include "audio/mixer.h"
-
namespace ZVision {
// Forward declaration of ZVision. This file is included before ZVision is declared
diff --git a/engines/zvision/sound/midi.cpp b/engines/zvision/sound/midi.cpp
index 3dd66ff2d4..9366f9e1e4 100644
--- a/engines/zvision/sound/midi.cpp
+++ b/engines/zvision/sound/midi.cpp
@@ -22,6 +22,7 @@
#include "common/scummsys.h"
#include "common/textconsole.h"
+#include "audio/mididrv.h"
#include "zvision/sound/midi.h"
diff --git a/engines/zvision/sound/midi.h b/engines/zvision/sound/midi.h
index a3bac19636..020c65c9f7 100644
--- a/engines/zvision/sound/midi.h
+++ b/engines/zvision/sound/midi.h
@@ -23,7 +23,7 @@
#ifndef ZVISION_MIDI_H
#define ZVISION_MIDI_H
-#include "audio/mididrv.h"
+class MidiDriver;
namespace ZVision {
diff --git a/engines/zvision/zvision.cpp b/engines/zvision/zvision.cpp
index b0d69c5f94..05db284f62 100644
--- a/engines/zvision/zvision.cpp
+++ b/engines/zvision/zvision.cpp
@@ -34,13 +34,13 @@
#include "zvision/text/text.h"
#include "zvision/text/truetype_font.h"
#include "zvision/sound/midi.h"
-#include "zvision/file/zfs_archive.h"
#include "common/config-manager.h"
#include "common/str.h"
#include "common/debug.h"
#include "common/debug-channels.h"
#include "common/textconsole.h"
+#include "common/timer.h"
#include "common/error.h"
#include "common/system.h"
#include "common/file.h"
diff --git a/video/mpegps_decoder.cpp b/video/mpegps_decoder.cpp
index 6942efbe87..d2e9554c8f 100644
--- a/video/mpegps_decoder.cpp
+++ b/video/mpegps_decoder.cpp
@@ -21,7 +21,6 @@
*/
#include "audio/audiostream.h"
-#include "audio/decoders/raw.h"
#include "audio/decoders/mp3.h"
#include "common/debug.h"
#include "common/endian.h"
diff --git a/video/psx_decoder.cpp b/video/psx_decoder.cpp
index 91f8e1dafc..4f14e2ea4f 100644
--- a/video/psx_decoder.cpp
+++ b/video/psx_decoder.cpp
@@ -24,7 +24,6 @@
// MDEC video emulation based on http://kenai.com/downloads/jpsxdec/Old/PlayStation1_STR_format1-00.txt
#include "audio/audiostream.h"
-#include "audio/mixer.h"
#include "audio/decoders/raw.h"
#include "common/bitstream.h"
#include "common/huffman.h"