[Scummvm-cvs-logs] SF.net SVN: scummvm:[42287] scummvm/trunk
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Thu Jul 9 15:17:46 CEST 2009
Revision: 42287
http://scummvm.svn.sourceforge.net/scummvm/?rev=42287&view=rev
Author: thebluegr
Date: 2009-07-09 13:17:46 +0000 (Thu, 09 Jul 2009)
Log Message:
-----------
Renamed sound/iff.* to sound/iff_sound.* to fix an issue with the upcoming changes to the MSVC project files (sound/iff.* produces iff.obj, which clashes with iff.obj from graphics/iff.*)
Modified Paths:
--------------
scummvm/trunk/engines/parallaction/sound.h
scummvm/trunk/sound/module.mk
Added Paths:
-----------
scummvm/trunk/sound/iff_sound.cpp
scummvm/trunk/sound/iff_sound.h
Removed Paths:
-------------
scummvm/trunk/sound/iff.cpp
scummvm/trunk/sound/iff.h
Modified: scummvm/trunk/engines/parallaction/sound.h
===================================================================
--- scummvm/trunk/engines/parallaction/sound.h 2009-07-09 09:39:51 UTC (rev 42286)
+++ scummvm/trunk/engines/parallaction/sound.h 2009-07-09 13:17:46 UTC (rev 42287)
@@ -30,7 +30,7 @@
#include "common/mutex.h"
#include "sound/audiostream.h"
-#include "sound/iff.h"
+#include "sound/iff_sound.h"
#include "sound/mixer.h"
#include "sound/mididrv.h"
Deleted: scummvm/trunk/sound/iff.cpp
===================================================================
--- scummvm/trunk/sound/iff.cpp 2009-07-09 09:39:51 UTC (rev 42286)
+++ scummvm/trunk/sound/iff.cpp 2009-07-09 13:17:46 UTC (rev 42287)
@@ -1,106 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
- *
- */
-
-#include "sound/iff.h"
-#include "sound/audiostream.h"
-#include "sound/mixer.h"
-#include "common/func.h"
-
-namespace Audio {
-
-void Voice8Header::load(Common::ReadStream &stream) {
- stream.read(this, sizeof(Voice8Header));
- oneShotHiSamples = FROM_BE_32(oneShotHiSamples);
- repeatHiSamples = FROM_BE_32(repeatHiSamples);
- samplesPerHiCycle = FROM_BE_32(samplesPerHiCycle);
- samplesPerSec = FROM_BE_16(samplesPerSec);
- volume = FROM_BE_32(volume);
-}
-
-
-
-struct A8SVXLoader {
- Voice8Header _header;
- int8 *_data;
- uint32 _dataSize;
-
- void load(Common::ReadStream &input) {
- Common::IFFParser parser(&input);
- Common::Functor1Mem< Common::IFFChunk&, bool, A8SVXLoader > c(this, &A8SVXLoader::callback);
- parser.parse(c);
- }
-
- bool callback(Common::IFFChunk &chunk) {
- switch (chunk._type) {
- case ID_VHDR:
- _header.load(*chunk._stream);
- break;
-
- case ID_BODY:
- _dataSize = chunk._size;
- _data = (int8*)malloc(_dataSize);
- assert(_data);
- loadData(chunk._stream);
- return true;
- }
-
- return false;
- }
-
- void loadData(Common::ReadStream *stream) {
- switch (_header.compression) {
- case 0:
- stream->read(_data, _dataSize);
- break;
-
- case 1:
- // implement other formats here
- error("compressed IFF audio is not supported");
- break;
- }
-
- }
-};
-
-
-AudioStream *make8SVXStream(Common::ReadStream &input, bool loop) {
- A8SVXLoader loader;
- loader.load(input);
-
- uint32 loopStart = 0, loopEnd = 0, flags = 0;
- if (loop) {
- // the standard way to loop 8SVX audio implies use of the oneShotHiSamples and
- // repeatHiSamples fields
- loopStart = 0;
- loopEnd = loader._header.oneShotHiSamples + loader._header.repeatHiSamples;
- flags |= Audio::Mixer::FLAG_LOOP;
- }
-
- flags |= Audio::Mixer::FLAG_AUTOFREE;
-
- return Audio::makeLinearInputStream((byte *)loader._data, loader._dataSize, loader._header.samplesPerSec, flags, loopStart, loopEnd);
-}
-
-}
Deleted: scummvm/trunk/sound/iff.h
===================================================================
--- scummvm/trunk/sound/iff.h 2009-07-09 09:39:51 UTC (rev 42286)
+++ scummvm/trunk/sound/iff.h 2009-07-09 13:17:46 UTC (rev 42287)
@@ -1,60 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
- *
- */
-
-/**
- * Sound decoder used in engines:
- * - parallaction
- */
-
-#ifndef SOUND_IFF_H
-#define SOUND_IFF_H
-
-#include "common/iff_container.h"
-#include "sound/audiostream.h"
-
-namespace Audio {
-
-struct Voice8Header {
- uint32 oneShotHiSamples;
- uint32 repeatHiSamples;
- uint32 samplesPerHiCycle;
- uint16 samplesPerSec;
- byte octaves;
- byte compression;
- uint32 volume;
-
- Voice8Header() {
- memset(this, 0, sizeof(Voice8Header));
- }
-
- void load(Common::ReadStream &stream);
-};
-
-AudioStream *make8SVXStream(Common::ReadStream &stream, bool loop);
-
-
-}
-
-#endif
Copied: scummvm/trunk/sound/iff_sound.cpp (from rev 42279, scummvm/trunk/sound/iff.cpp)
===================================================================
--- scummvm/trunk/sound/iff_sound.cpp (rev 0)
+++ scummvm/trunk/sound/iff_sound.cpp 2009-07-09 13:17:46 UTC (rev 42287)
@@ -0,0 +1,106 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+#include "sound/iff_sound.h"
+#include "sound/audiostream.h"
+#include "sound/mixer.h"
+#include "common/func.h"
+
+namespace Audio {
+
+void Voice8Header::load(Common::ReadStream &stream) {
+ stream.read(this, sizeof(Voice8Header));
+ oneShotHiSamples = FROM_BE_32(oneShotHiSamples);
+ repeatHiSamples = FROM_BE_32(repeatHiSamples);
+ samplesPerHiCycle = FROM_BE_32(samplesPerHiCycle);
+ samplesPerSec = FROM_BE_16(samplesPerSec);
+ volume = FROM_BE_32(volume);
+}
+
+
+
+struct A8SVXLoader {
+ Voice8Header _header;
+ int8 *_data;
+ uint32 _dataSize;
+
+ void load(Common::ReadStream &input) {
+ Common::IFFParser parser(&input);
+ Common::Functor1Mem< Common::IFFChunk&, bool, A8SVXLoader > c(this, &A8SVXLoader::callback);
+ parser.parse(c);
+ }
+
+ bool callback(Common::IFFChunk &chunk) {
+ switch (chunk._type) {
+ case ID_VHDR:
+ _header.load(*chunk._stream);
+ break;
+
+ case ID_BODY:
+ _dataSize = chunk._size;
+ _data = (int8*)malloc(_dataSize);
+ assert(_data);
+ loadData(chunk._stream);
+ return true;
+ }
+
+ return false;
+ }
+
+ void loadData(Common::ReadStream *stream) {
+ switch (_header.compression) {
+ case 0:
+ stream->read(_data, _dataSize);
+ break;
+
+ case 1:
+ // implement other formats here
+ error("compressed IFF audio is not supported");
+ break;
+ }
+
+ }
+};
+
+
+AudioStream *make8SVXStream(Common::ReadStream &input, bool loop) {
+ A8SVXLoader loader;
+ loader.load(input);
+
+ uint32 loopStart = 0, loopEnd = 0, flags = 0;
+ if (loop) {
+ // the standard way to loop 8SVX audio implies use of the oneShotHiSamples and
+ // repeatHiSamples fields
+ loopStart = 0;
+ loopEnd = loader._header.oneShotHiSamples + loader._header.repeatHiSamples;
+ flags |= Audio::Mixer::FLAG_LOOP;
+ }
+
+ flags |= Audio::Mixer::FLAG_AUTOFREE;
+
+ return Audio::makeLinearInputStream((byte *)loader._data, loader._dataSize, loader._header.samplesPerSec, flags, loopStart, loopEnd);
+}
+
+}
Property changes on: scummvm/trunk/sound/iff_sound.cpp
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Date Rev Author URL Id
Added: svn:mergeinfo
+
Added: svn:eol-style
+ native
Copied: scummvm/trunk/sound/iff_sound.h (from rev 42279, scummvm/trunk/sound/iff.h)
===================================================================
--- scummvm/trunk/sound/iff_sound.h (rev 0)
+++ scummvm/trunk/sound/iff_sound.h 2009-07-09 13:17:46 UTC (rev 42287)
@@ -0,0 +1,60 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+/**
+ * Sound decoder used in engines:
+ * - parallaction
+ */
+
+#ifndef SOUND_IFF_H
+#define SOUND_IFF_H
+
+#include "common/iff_container.h"
+#include "sound/audiostream.h"
+
+namespace Audio {
+
+struct Voice8Header {
+ uint32 oneShotHiSamples;
+ uint32 repeatHiSamples;
+ uint32 samplesPerHiCycle;
+ uint16 samplesPerSec;
+ byte octaves;
+ byte compression;
+ uint32 volume;
+
+ Voice8Header() {
+ memset(this, 0, sizeof(Voice8Header));
+ }
+
+ void load(Common::ReadStream &stream);
+};
+
+AudioStream *make8SVXStream(Common::ReadStream &stream, bool loop);
+
+
+}
+
+#endif
Property changes on: scummvm/trunk/sound/iff_sound.h
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Date Rev Author URL Id
Added: svn:mergeinfo
+
Added: svn:eol-style
+ native
Modified: scummvm/trunk/sound/module.mk
===================================================================
--- scummvm/trunk/sound/module.mk 2009-07-09 09:39:51 UTC (rev 42286)
+++ scummvm/trunk/sound/module.mk 2009-07-09 13:17:46 UTC (rev 42287)
@@ -5,7 +5,7 @@
aiff.o \
audiocd.o \
audiostream.o \
- iff.o \
+ iff_sound.o \
flac.o \
fmopl.o \
mididrv.o \
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list