aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-rw-r--r--sound/audiostream.cpp4
-rw-r--r--sound/flac.cpp4
-rw-r--r--sound/flac.h6
-rw-r--r--sound/mixer.h1
-rw-r--r--sound/mp3.cpp3
-rw-r--r--sound/mp3.h6
-rw-r--r--sound/softsynth/mt32.cpp8
-rw-r--r--sound/vorbis.cpp4
-rw-r--r--sound/vorbis.h6
9 files changed, 27 insertions, 15 deletions
diff --git a/sound/audiostream.cpp b/sound/audiostream.cpp
index ddc91dcbf1..2194267708 100644
--- a/sound/audiostream.cpp
+++ b/sound/audiostream.cpp
@@ -36,7 +36,7 @@ struct StreamFileFormat {
* Pointer to a function which tries to open a file of type StreamFormat.
* Return NULL in case of an error (invalid/nonexisting file).
*/
- AudioStream* (*openStreamFile)(File *file, uint32 size);
+ AudioStream* (*openStreamFile)(Common::File *file, uint32 size);
};
static const StreamFileFormat STREAM_FILEFORMATS[] = {
@@ -66,7 +66,7 @@ AudioStream* AudioStream::openStreamFile(const char *filename)
char *ext = &buffer[len+1];
AudioStream* stream = NULL;
- File *fileHandle = new File();
+ Common::File *fileHandle = new Common::File();
for (int i = 0; i < ARRAYSIZE(STREAM_FILEFORMATS)-1 && stream == NULL; ++i) {
strcpy(ext, STREAM_FILEFORMATS[i].fileExtension);
diff --git a/sound/flac.cpp b/sound/flac.cpp
index 409bb293a1..412f4c8651 100644
--- a/sound/flac.cpp
+++ b/sound/flac.cpp
@@ -32,6 +32,10 @@
#define FLAC__NO_DLL // that MS-magic gave me headaches - just link the library you like
#include <FLAC/seekable_stream_decoder.h>
+
+using Common::File;
+
+
#pragma mark -
#pragma mark --- Flac stream ---
#pragma mark -
diff --git a/sound/flac.h b/sound/flac.h
index 6cf1c9ec87..2250f342ea 100644
--- a/sound/flac.h
+++ b/sound/flac.h
@@ -29,11 +29,13 @@
class AudioStream;
class DigitalTrackInfo;
-class File;
+namespace Common {
+ class File;
+}
DigitalTrackInfo *getFlacTrack(int track);
-AudioStream *makeFlacStream(File *file, uint32 size);
+AudioStream *makeFlacStream(Common::File *file, uint32 size);
#endif // #ifdef USE_FLAC
#endif // #ifndef SOUND_FLAC_H
diff --git a/sound/mixer.h b/sound/mixer.h
index 4d9dac8b1b..dfa7573738 100644
--- a/sound/mixer.h
+++ b/sound/mixer.h
@@ -30,7 +30,6 @@
class AudioStream;
class Channel;
-class File;
class OSystem;
class SoundHandle {
diff --git a/sound/mp3.cpp b/sound/mp3.cpp
index 79a4635be1..3028c22421 100644
--- a/sound/mp3.cpp
+++ b/sound/mp3.cpp
@@ -32,6 +32,9 @@
#include <mad.h>
+using Common::File;
+
+
#pragma mark -
#pragma mark --- MP3 (MAD) stream ---
#pragma mark -
diff --git a/sound/mp3.h b/sound/mp3.h
index 28fa622b44..27886686ce 100644
--- a/sound/mp3.h
+++ b/sound/mp3.h
@@ -29,11 +29,13 @@
class AudioStream;
class DigitalTrackInfo;
-class File;
+namespace Common {
+ class File;
+}
DigitalTrackInfo *getMP3Track(int track);
-AudioStream *makeMP3Stream(File *file, uint32 size);
+AudioStream *makeMP3Stream(Common::File *file, uint32 size);
#endif
diff --git a/sound/softsynth/mt32.cpp b/sound/softsynth/mt32.cpp
index 75abaabbcc..58f13f45c6 100644
--- a/sound/softsynth/mt32.cpp
+++ b/sound/softsynth/mt32.cpp
@@ -74,13 +74,11 @@ public:
int getRate() const { return _outputRate; }
};
-typedef File SFile;
-
class MT32File: public MT32Emu::File {
- SFile file;
+ Common::File file;
public:
bool open(const char *filename, OpenMode mode) {
- SFile::AccessMode accessMode = mode == OpenMode_read ? SFile::kFileReadMode : SFile::kFileWriteMode;
+ Common::File::AccessMode accessMode = mode == OpenMode_read ? Common::File::kFileReadMode : Common::File::kFileWriteMode;
return file.open(filename, accessMode);
}
void close() {
@@ -473,7 +471,7 @@ void MidiDriver_ThreadedMT32::onTimer() {
MidiDriver *MidiDriver_MT32_create(SoundMixer *mixer) {
// HACK: It will stay here until engine plugin loader overhaul
if (ConfMan.hasKey("extrapath"))
- File::addDefaultDirectory(ConfMan.get("extrapath"));
+ Common::File::addDefaultDirectory(ConfMan.get("extrapath"));
return new MidiDriver_MT32(mixer);
}
diff --git a/sound/vorbis.cpp b/sound/vorbis.cpp
index deca2c62c3..f2f7781220 100644
--- a/sound/vorbis.cpp
+++ b/sound/vorbis.cpp
@@ -32,8 +32,10 @@
#include <vorbis/vorbisfile.h>
-static AudioStream *makeVorbisStream(OggVorbis_File *file, int duration);
+using Common::File;
+
+static AudioStream *makeVorbisStream(OggVorbis_File *file, int duration);
#pragma mark -
#pragma mark --- Ogg Vorbis Audio CD emulation ---
diff --git a/sound/vorbis.h b/sound/vorbis.h
index fa784b5a87..293af1e378 100644
--- a/sound/vorbis.h
+++ b/sound/vorbis.h
@@ -29,11 +29,13 @@
class AudioStream;
class DigitalTrackInfo;
-class File;
+namespace Common {
+ class File;
+}
DigitalTrackInfo *getVorbisTrack(int track);
-AudioStream *makeVorbisStream(File *file, uint32 size);
+AudioStream *makeVorbisStream(Common::File *file, uint32 size);
#endif