[xiph-commits] r8797 - in trunk/oggdsf: sln/oggdsf_all src/lib/core/ogg/libOOOgg src/lib/core/ogg/libOOOggSeek src/lib/player/libDSPlayDotNET

illiminable at motherfish-iii.xiph.org illiminable at motherfish-iii.xiph.org
Thu Jan 27 07:07:19 PST 2005


Author: illiminable
Date: 2005-01-27 07:07:06 -0800 (Thu, 27 Jan 2005)
New Revision: 8797

Modified:
   trunk/oggdsf/sln/oggdsf_all/oggdsf_all.sln
   trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPaginatorSettings.cpp
   trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoAnxSeekTable.cpp
   trunk/oggdsf/src/lib/player/libDSPlayDotNET/DSPlay.cpp
   trunk/oggdsf/src/lib/player/libDSPlayDotNET/DSPlay.h
Log:
* Add volume and balance controls to dsplay

Modified: trunk/oggdsf/sln/oggdsf_all/oggdsf_all.sln
===================================================================
--- trunk/oggdsf/sln/oggdsf_all/oggdsf_all.sln	2005-01-26 21:40:57 UTC (rev 8796)
+++ trunk/oggdsf/sln/oggdsf_all/oggdsf_all.sln	2005-01-27 15:07:06 UTC (rev 8797)
@@ -1181,6 +1181,14 @@
 		{2DA569EC-3E22-4BC9-A242-C7A56EB9C6F4} = {2DA569EC-3E22-4BC9-A242-C7A56EB9C6F4}
 	EndProjectSection
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CMMLRip", "..\..\src\tools\CMMLRip\CMMLRip.vcproj", "{0A99562D-4B28-4F0C-93B2-06186069B9C0}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CMMLValidate", "..\..\src\tools\CMMLValidate\CMMLValidate.vcproj", "{C1EEEFFD-5E6D-414D-A86B-104F8B4A5C40}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
 Global
 	GlobalSection(SolutionConfiguration) = preSolution
 		Debug = Debug
@@ -2670,6 +2678,46 @@
 		{6F8DE2AB-BF7A-4A4C-96F0-52BE1D992834}.Release_SSE.Build.0 = Release|Win32
 		{6F8DE2AB-BF7A-4A4C-96F0-52BE1D992834}.Release_SSE2.ActiveCfg = Release|Win32
 		{6F8DE2AB-BF7A-4A4C-96F0-52BE1D992834}.Release_SSE2.Build.0 = Release|Win32
+		{0A99562D-4B28-4F0C-93B2-06186069B9C0}.Debug.ActiveCfg = Debug|Win32
+		{0A99562D-4B28-4F0C-93B2-06186069B9C0}.Debug.Build.0 = Debug|Win32
+		{0A99562D-4B28-4F0C-93B2-06186069B9C0}.Debug Unicode.ActiveCfg = Debug|Win32
+		{0A99562D-4B28-4F0C-93B2-06186069B9C0}.Debug Unicode.Build.0 = Debug|Win32
+		{0A99562D-4B28-4F0C-93B2-06186069B9C0}.Debug__cdecl.ActiveCfg = Debug|Win32
+		{0A99562D-4B28-4F0C-93B2-06186069B9C0}.Debug__cdecl.Build.0 = Debug|Win32
+		{0A99562D-4B28-4F0C-93B2-06186069B9C0}.MakeFile.ActiveCfg = Release|Win32
+		{0A99562D-4B28-4F0C-93B2-06186069B9C0}.MakeFile.Build.0 = Release|Win32
+		{0A99562D-4B28-4F0C-93B2-06186069B9C0}.Release.ActiveCfg = Release|Win32
+		{0A99562D-4B28-4F0C-93B2-06186069B9C0}.Release.Build.0 = Release|Win32
+		{0A99562D-4B28-4F0C-93B2-06186069B9C0}.Release Unicode.ActiveCfg = Release|Win32
+		{0A99562D-4B28-4F0C-93B2-06186069B9C0}.Release Unicode.Build.0 = Release|Win32
+		{0A99562D-4B28-4F0C-93B2-06186069B9C0}.Release__cdecl.ActiveCfg = Release|Win32
+		{0A99562D-4B28-4F0C-93B2-06186069B9C0}.Release__cdecl.Build.0 = Release|Win32
+		{0A99562D-4B28-4F0C-93B2-06186069B9C0}.Release_NoDotNET.ActiveCfg = Release|Win32
+		{0A99562D-4B28-4F0C-93B2-06186069B9C0}.Release_NoDotNET.Build.0 = Release|Win32
+		{0A99562D-4B28-4F0C-93B2-06186069B9C0}.Release_SSE.ActiveCfg = Release|Win32
+		{0A99562D-4B28-4F0C-93B2-06186069B9C0}.Release_SSE.Build.0 = Release|Win32
+		{0A99562D-4B28-4F0C-93B2-06186069B9C0}.Release_SSE2.ActiveCfg = Release|Win32
+		{0A99562D-4B28-4F0C-93B2-06186069B9C0}.Release_SSE2.Build.0 = Release|Win32
+		{C1EEEFFD-5E6D-414D-A86B-104F8B4A5C40}.Debug.ActiveCfg = Debug|Win32
+		{C1EEEFFD-5E6D-414D-A86B-104F8B4A5C40}.Debug.Build.0 = Debug|Win32
+		{C1EEEFFD-5E6D-414D-A86B-104F8B4A5C40}.Debug Unicode.ActiveCfg = Debug|Win32
+		{C1EEEFFD-5E6D-414D-A86B-104F8B4A5C40}.Debug Unicode.Build.0 = Debug|Win32
+		{C1EEEFFD-5E6D-414D-A86B-104F8B4A5C40}.Debug__cdecl.ActiveCfg = Debug|Win32
+		{C1EEEFFD-5E6D-414D-A86B-104F8B4A5C40}.Debug__cdecl.Build.0 = Debug|Win32
+		{C1EEEFFD-5E6D-414D-A86B-104F8B4A5C40}.MakeFile.ActiveCfg = Release|Win32
+		{C1EEEFFD-5E6D-414D-A86B-104F8B4A5C40}.MakeFile.Build.0 = Release|Win32
+		{C1EEEFFD-5E6D-414D-A86B-104F8B4A5C40}.Release.ActiveCfg = Release|Win32
+		{C1EEEFFD-5E6D-414D-A86B-104F8B4A5C40}.Release.Build.0 = Release|Win32
+		{C1EEEFFD-5E6D-414D-A86B-104F8B4A5C40}.Release Unicode.ActiveCfg = Release|Win32
+		{C1EEEFFD-5E6D-414D-A86B-104F8B4A5C40}.Release Unicode.Build.0 = Release|Win32
+		{C1EEEFFD-5E6D-414D-A86B-104F8B4A5C40}.Release__cdecl.ActiveCfg = Release|Win32
+		{C1EEEFFD-5E6D-414D-A86B-104F8B4A5C40}.Release__cdecl.Build.0 = Release|Win32
+		{C1EEEFFD-5E6D-414D-A86B-104F8B4A5C40}.Release_NoDotNET.ActiveCfg = Release|Win32
+		{C1EEEFFD-5E6D-414D-A86B-104F8B4A5C40}.Release_NoDotNET.Build.0 = Release|Win32
+		{C1EEEFFD-5E6D-414D-A86B-104F8B4A5C40}.Release_SSE.ActiveCfg = Release|Win32
+		{C1EEEFFD-5E6D-414D-A86B-104F8B4A5C40}.Release_SSE.Build.0 = Release|Win32
+		{C1EEEFFD-5E6D-414D-A86B-104F8B4A5C40}.Release_SSE2.ActiveCfg = Release|Win32
+		{C1EEEFFD-5E6D-414D-A86B-104F8B4A5C40}.Release_SSE2.Build.0 = Release|Win32
 	EndGlobalSection
 	GlobalSection(SolutionItems) = postSolution
 	EndGlobalSection

Modified: trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPaginatorSettings.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPaginatorSettings.cpp	2005-01-26 21:40:57 UTC (rev 8796)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPaginatorSettings.cpp	2005-01-27 15:07:06 UTC (rev 8797)
@@ -38,7 +38,7 @@
 	,	mTargetPageSize(4096)
 	,	mMinPageSize(4096)
 	,	mNumHeaders(0)
-	,	mMaxPacksPerPage(0)
+	,	mMaxPacksPerPage(1)
 {
 }
 

Modified: trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoAnxSeekTable.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoAnxSeekTable.cpp	2005-01-26 21:40:57 UTC (rev 8796)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoAnxSeekTable.cpp	2005-01-27 15:07:06 UTC (rev 8797)
@@ -41,14 +41,6 @@
 		return true;
 	}
 
-	//if (mAnnodexSerialNo == inOggPage->header()->StreamSerialNo()) {
-	//	//Ignore this stuff.
-	//	return true;
-	//} else if (strncmp((const char*)inOggPage->getPacket(0)->packetData(), "AnxData", 7) == 0) {
-	//	//Seen all the annodex stuff.
-	//	mReadyForOgg = true;
-	//	return true;
-	//}
 
 	if (mReadyForOgg) {
 		if (mSkippedCMML == false) {

Modified: trunk/oggdsf/src/lib/player/libDSPlayDotNET/DSPlay.cpp
===================================================================
--- trunk/oggdsf/src/lib/player/libDSPlayDotNET/DSPlay.cpp	2005-01-26 21:40:57 UTC (rev 8796)
+++ trunk/oggdsf/src/lib/player/libDSPlayDotNET/DSPlay.cpp	2005-01-27 15:07:06 UTC (rev 8797)
@@ -54,6 +54,7 @@
 	,	mMediaControl(NULL)
 	,	mMediaSeeking(NULL)
 	,	mMediaEvent(NULL)
+	,	mBasicAudio(NULL)
 	,	mEventHandle(INVALID_HANDLE_VALUE)
 	//,	mDNCMMLCallbacks(NULL)
 	,	mDNMediaEvent(NULL)
@@ -68,6 +69,7 @@
 	,	mHeight(0)
 	,	mFileSize(0)
 	,	mVideoRenderType(VR_NONE)
+	
 
 
 {
@@ -146,12 +148,61 @@
 		HDC locHDC = GetDC(NULL);
 
 		mVMR9Window->RepaintVideo((HWND)((int)mWindowHandle), locHDC);
+	}
+}
 
 
+long DSPlay::getVolume() {
+	long retVolume = -10000;
+	if (mBasicAudio != NULL) {
+		HRESULT locHR = mBasicAudio->get_Volume(&retVolume);
+		if (locHR != S_OK) {
+			retVolume = -10000;
+		}
 	}
+	return retVolume;
+}
 
 
+long DSPlay::getBalance() {
+	long retBalance = 0;
+	if (mBasicAudio != NULL) {
+		HRESULT locHR = mBasicAudio->get_Balance(&retBalance);
+		if (locHR != S_OK) {
+			retBalance = 0;
+		}
+	}
+	return retBalance;
 }
+
+
+bool DSPlay::setVolume(long inVolume) {
+
+	if (mBasicAudio != NULL) {
+		HRESULT locHR = mBasicAudio->put_Volume(inVolume);
+		if (locHR == S_OK) {
+			return true;
+		} else {
+			return false;
+		}
+	} else {
+		return false;
+	}
+}
+
+
+bool DSPlay::setBalance(long inBalance) {
+	if (mBasicAudio != NULL) {
+		HRESULT locHR = mBasicAudio->put_Balance(inBalance);
+		if (locHR == S_OK) {
+			return true;
+		} else {
+			return false;
+		}
+	} else {
+		return false;
+	}
+}
 void DSPlay::releaseInterfaces() {
 
 	mVideoRenderType = VR_NONE;
@@ -180,6 +231,15 @@
 		mMediaEvent = NULL;
 	}
 
+	if (mBasicAudio != NULL) {
+		numRef = 
+			mBasicAudio->Release();
+
+		*debugLog<<"BasicAudio count = "<<numRef<<endl;
+		mBasicAudio = NULL;
+	}
+
+
 	if (mCMMLAppControl != NULL) {
 		numRef = 
 			mCMMLAppControl->Release();
@@ -488,8 +548,17 @@
 		mEventHandle = locEventHandle;
 	}
 
+	//Get the IBasicAudio Interface
+	IBasicAudio* locBasicAudio = NULL;
+	locHR = mGraphBuilder->QueryInterface(IID_IBasicAudio, (void**)&locBasicAudio);
+	if (locHR == S_OK) {
+		mBasicAudio = locBasicAudio;
+	} else {
+		mBasicAudio = NULL;
+	}
 
 
+
 //	if (FAILED(hr))
 
 	return true;

Modified: trunk/oggdsf/src/lib/player/libDSPlayDotNET/DSPlay.h
===================================================================
--- trunk/oggdsf/src/lib/player/libDSPlayDotNET/DSPlay.h	2005-01-26 21:40:57 UTC (rev 8796)
+++ trunk/oggdsf/src/lib/player/libDSPlayDotNET/DSPlay.h	2005-01-27 15:07:06 UTC (rev 8797)
@@ -93,6 +93,18 @@
 		/// Stop the media file.
 		bool stop();
 
+		/// Gets the current volume setting 100 units per db ie 10,000 = 100db
+		long getVolume();
+
+		/// Gets the balance of the channels. Divide by 100 to get attenuation. -10,000 = right channel silent.
+		long getBalance();
+
+		/// Sets the current volume (-10,000 to 10,000)
+		bool setVolume(long inVolume);
+
+		///Sets the current balance (-10,000 to 10,000)
+		bool setBalance(long inBalance);
+
 		/// Seek to the specified time in 100 nanoseconds units. ie 10 000 000 per second.
 		Int64 seek(Int64 inTime);
 
@@ -136,6 +148,7 @@
 		IMediaControl* mMediaControl;
 		IMediaSeeking* mMediaSeeking;
 		IMediaEvent* mMediaEvent;
+		IBasicAudio* mBasicAudio;
 		ICMMLAppControl* mCMMLAppControl;
 		IVideoWindow* mVideoWindow;
 



More information about the commits mailing list