[Scummvm-cvs-logs] CVS: scummvm/sound mp3.cpp,1.25,1.26 vorbis.cpp,1.33,1.34

Lars Persson anotherguest at users.sourceforge.net
Fri Dec 2 10:37:09 CET 2005


Update of /cvsroot/scummvm/scummvm/sound
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25749/sound

Modified Files:
	mp3.cpp vorbis.cpp 
Log Message:
Updated to follow ScummVM coding standards i.e spaces, indents & "studpid" things fixed.

Index: mp3.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/mp3.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- mp3.cpp	18 Oct 2005 01:30:23 -0000	1.25
+++ mp3.cpp	2 Dec 2005 18:36:21 -0000	1.26
@@ -13,7 +13,7 @@
 
  * 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.
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  *
  * $Header$
  *
@@ -92,7 +92,7 @@
 #if defined(__SYMBIAN32__)
 	// Symbian can't share filehandles between different threads.
 	// So create a new file  and seek that to the other filehandles position
-	_file= new (ELeave)File;
+	_file= new File;
 	_file->open(file->name());
 	_file->seek(file->pos());
 #else
@@ -123,7 +123,7 @@
 #if defined(__SYMBIAN32__)
 	// Symbian can't share filehandles between different threads.
 	// So create a new file  and seek that to the other filehandles position
-	_file= new (ELeave)File;
+	_file= new File;
 	_file->open(file->name());
 	_file->seek(file->pos());
 #else
@@ -138,9 +138,9 @@
 	// If a size is specified, we do not perform any further read operations
 	if (size) {
 #ifdef __SYMBIAN32__
-		 delete _file;
+		delete _file;
 #endif
-		_file = 0;
+		_file = NULL;
 	} else {
 		_file->incRef();
 	}
@@ -205,7 +205,7 @@
 #ifdef __SYMBIAN32__
 	// For symbian we must check that an alternative file pointer is created, see if its open
 	// If not re-open file and seek to the last read position
-	if(_file && !_file->isOpen()){
+	if(_file && !_file->isOpen()) {
 		_file->open(_file->name());
 		_file->seek(_lastReadPosition);
 	}
@@ -267,10 +267,10 @@
 
 #ifdef __SYMBIAN32__
 	// For symbian we now store the last read position and then close the file
-	if(_file){
-		_lastReadPosition=_file->pos();
+	if(_file) {
+		_lastReadPosition = _file->pos();
 		_file->close();
-		}
+	}
 #endif
 }
 

Index: vorbis.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/vorbis.cpp,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- vorbis.cpp	1 Dec 2005 19:14:38 -0000	1.33
+++ vorbis.cpp	2 Dec 2005 18:36:21 -0000	1.34
@@ -74,15 +74,14 @@
 	int result;
 
 #ifdef __SYMBIAN32__
-    // For symbian we must check that an alternative file pointer is created, see if its open
-    // If not re-open file and seek to the last read position
-    if(f->file && !f->file->isOpen()){
-        f->file->open(f->file->name());
-        f->file->seek(f->curr_pos);
-        }
+	// For symbian we must check that an alternative file pointer is created, see if its open
+	// If not re-open file and seek to the last read position
+	if (f->file && !f->file->isOpen()) {
+		f->file->open(f->file->name());
+		f->file->seek(f->curr_pos);
+	}
 #endif
 
-
 	nmemb *= size;
 	if (f->curr_pos > (int) f->len)
 		nmemb = 0;
@@ -93,10 +92,10 @@
 	f->file->seek(f->start + f->curr_pos);
 	result = f->file->read(ptr, nmemb);
 #ifdef __SYMBIAN32__
-    // For symbian we now store the last read position and then close the file
-    if(f->file){
-        f->file->close();
-        }
+	// For symbian we now store the last read position and then close the file
+	if (f->file) {
+		f->file->close();
+	}
 #endif
 	if (result == -1) {
 		f->curr_pos = f->file->pos() - f->start;
@@ -118,12 +117,12 @@
 	}
 
 #ifdef __SYMBIAN32__
-    // For symbian we must check that an alternative file pointer is created, see if its open
-    // If not re-open file and seek to the last read position
-    if(f->file && !f->file->isOpen()){
-        f->file->open(f->file->name());
-        f->file->seek(f->curr_pos);
-        }
+	// For symbian we must check that an alternative file pointer is created, see if its open
+	// If not re-open file and seek to the last read position
+	if (f->file && !f->file->isOpen()) {
+		f->file->open(f->file->name());
+		f->file->seek(f->curr_pos);
+	}
 #endif
 
 	f->file->seek(offset, whence);
@@ -131,9 +130,9 @@
 
 #ifdef __SYMBIAN32__
     // For symbian we now store the last read position and then close the file
-    if(f->file){
-        f->file->close();
-        }
+	if (f->file) {
+		f->file->close();
+	}
 #endif
 
 	return f->curr_pos;
@@ -180,13 +179,13 @@
 	file_info *f = new file_info;
 
 #if defined(__SYMBIAN32__)
-    // Symbian can't share filehandles between different threads.
-    // So create a new file  and seek that to the other filehandles position
-    f->file= new (ELeave)File;
-    f->file->open(_file->name());
-    f->file->seek(_file->pos());
+	// Symbian can't share filehandles between different threads.
+	// So create a new file  and seek that to the other filehandles position
+	f->file = new File;
+	f->file->open(_file->name());
+	f->file->seek(_file->pos());
 #else
-    f->file = _file;
+	f->file = _file;
 #endif
 
 	f->start = 0;
@@ -197,14 +196,14 @@
 	bool err = (ov_open_callbacks((void *) f, &_ov_file, NULL, 0, g_File_wrap) < 0);
 	if (err) {
 #ifdef __SYMBIAN32__
-        delete f->file;
+		delete f->file;
 #endif
 		delete f;
 	} else {
 #ifndef __SYMBIAN32__
-        _file->incRef();
+		_file->incRef();
 #endif	
-            }
+    }
 
 	return err;
 }
@@ -224,9 +223,9 @@
 
 #ifdef USE_TREMOR // In Tremor, the ov_time_seek() and ov_time_seek_page() calls take seeking positions in milliseconds as 64 bit integers, rather than in seconds as doubles as in Vorbisfile.
 #if defined(__SYMBIAN32__) && defined(__GCC32__) // SumthinWicked says: fixing "relocation truncated to fit: ARM_26 __fixdfdi" during linking on GCC, see portdefs.h
-    ov_time_seek(&_ov_file, (ogg_int64_t)scumm_fixdfdi(startFrame / 75.0 * 1000));
+	ov_time_seek(&_ov_file, (ogg_int64_t)scumm_fixdfdi(startFrame / 75.0 * 1000));
 #else
-    ov_time_seek(&_ov_file, (ogg_int64_t)(startFrame / 75.0 * 1000));
+	ov_time_seek(&_ov_file, (ogg_int64_t)(startFrame / 75.0 * 1000));
 #endif
 #else
     ov_time_seek(&_ov_file, startFrame / 75.0);
@@ -380,13 +379,13 @@
 	file_info *f = new file_info;
 
 #if defined(__SYMBIAN32__)
-    // Symbian can't share filehandles between different threads.
-    // So create a new file  and seek that to the other filehandles position
-    f->file= new (ELeave)File;
-    f->file->open(file->name());
-    f->file->seek(file->pos());
+	// Symbian can't share filehandles between different threads.
+	// So create a new file  and seek that to the other filehandles position
+	f->file = new File;
+	f->file->open(file->name());
+	f->file->seek(file->pos());
 #else
-    f->file = file;
+	f->file = file;
 #endif
     f->start = file->pos();
 	f->len = size;
@@ -399,10 +398,9 @@
         return 0;
         } else {
 #ifndef __SYMBIAN32__
-        file->incRef();
+		file->incRef();
 #endif
-        return new VorbisInputStream(ov_file, 0, true);
-            }
-    }
-
+		return new VorbisInputStream(ov_file, 0, true);
+		}
+	}
 #endif





More information about the Scummvm-git-logs mailing list