[SCM] Packaging for teeworlds branch, master, updated. 2d194e7bcb49237986bfb29cff0414babba9d907

Felix Geyer debfx-pkg at fobos.de
Mon May 9 14:24:44 UTC 2011


The following commit has been merged in the master branch:
commit dfb75d31f1faf6008e97bf390510aa93b2284dae
Author: Felix Geyer <debfx-pkg at fobos.de>
Date:   Mon May 9 13:51:03 2011 +0200

    Fix new-wavpack.patch.

diff --git a/debian/patches/new-wavpack.patch b/debian/patches/new-wavpack.patch
index 923a8ab..1b049cc 100644
--- a/debian/patches/new-wavpack.patch
+++ b/debian/patches/new-wavpack.patch
@@ -1,7 +1,7 @@
 diff -Nur teeworlds-0.6.0.orig/src/engine/client/sound.cpp teeworlds-0.6.0/src/engine/client/sound.cpp
 --- teeworlds-0.6.0.orig/src/engine/client/sound.cpp	2011-04-09 21:15:25.000000000 +0200
-+++ teeworlds-0.6.0/src/engine/client/sound.cpp	2011-05-09 11:16:20.140095357 +0200
-@@ -305,17 +305,13 @@
++++ teeworlds-0.6.0/src/engine/client/sound.cpp	2011-05-09 13:46:50.503228772 +0200
+@@ -305,17 +305,14 @@
  	pSample->m_NumFrames = NumFrames;
  }
  
@@ -16,33 +16,49 @@ diff -Nur teeworlds-0.6.0.orig/src/engine/client/sound.cpp teeworlds-0.6.0/src/e
  	int SampleID = -1;
  	char aError[100];
  	WavpackContext *pContext;
-+	char completeFilename[512];
++	char aWholePath[1024];
++	IOHANDLE File;
  	
  	// don't waste memory on sound when we are stress testing
  	if(g_Config.m_DbgStress)
-@@ -328,19 +324,13 @@
+@@ -328,19 +325,23 @@
  	if(!m_pStorage)
  		return -1;
  
 -	ms_File = m_pStorage->OpenFile(pFilename, IOFLAG_READ, IStorage::TYPE_ALL);
 -	if(!ms_File)
--	{
--		dbg_msg("sound/wv", "failed to open file. filename='%s'", pFilename);
--		return -1;
--	}
--
++	File = m_pStorage->OpenFile(pFilename, IOFLAG_READ, IStorage::TYPE_ALL, aWholePath, sizeof(aWholePath));
++	if(!File)
+ 	{
+ 		dbg_msg("sound/wv", "failed to open file. filename='%s'", pFilename);
+ 		return -1;
+ 	}
++	else
++	{
++		io_close(File);
++	}
+ 
  	SampleID = AllocID();
  	if(SampleID < 0)
  		return -1;
  	pSample = &m_aSamples[SampleID];
  
 -	pContext = WavpackOpenFileInput(ReadData, aError);
-+	engine_getpath(completeFilename, sizeof(completeFilename), pFilename, IOFLAG_READ);
-+	pContext = WavpackOpenFileInput(completeFilename, error, OPEN_2CH_MAX, 0);
++	pContext = WavpackOpenFileInput(aWholePath, aError, OPEN_2CH_MAX, 0);
  	if (pContext)
  	{
  		int m_aSamples = WavpackGetNumSamples(pContext);
-@@ -482,7 +472,5 @@
+@@ -395,9 +396,6 @@
+ 		dbg_msg("sound/wv", "failed to open %s: %s", pFilename, aError);
+ 	}
+ 
+-	io_close(ms_File);
+-	ms_File = NULL;
+-
+ 	if(g_Config.m_Debug)
+ 		dbg_msg("sound/wv", "loaded %s", pFilename);
+ 
+@@ -482,7 +480,5 @@
  	lock_release(m_SoundLock);
  }
  
@@ -52,7 +68,7 @@ diff -Nur teeworlds-0.6.0.orig/src/engine/client/sound.cpp teeworlds-0.6.0/src/e
  
 diff -Nur teeworlds-0.6.0.orig/src/engine/client/sound.h teeworlds-0.6.0/src/engine/client/sound.h
 --- teeworlds-0.6.0.orig/src/engine/client/sound.h	2011-04-09 21:15:25.000000000 +0200
-+++ teeworlds-0.6.0/src/engine/client/sound.h	2011-05-09 11:15:16.739801319 +0200
++++ teeworlds-0.6.0/src/engine/client/sound.h	2011-05-09 13:36:49.520299304 +0200
 @@ -19,10 +19,6 @@
  
  	static void RateConvert(int SampleID);

-- 
Packaging for teeworlds



More information about the Pkg-games-commits mailing list