Changeset 190 for trunk/Utilities/GeneratePcmWavFile
- Timestamp:
- Jul 1, 2013, 11:51:18 PM (10 years ago)
- Location:
- trunk/Utilities/GeneratePcmWavFile
- Files:
-
- 1 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Utilities/GeneratePcmWavFile/GeneratePcmWavFile.cpp
r65 r190 21 21 // CGenericFilterGraph 22 22 23 class CGenericFilterGraph24 {25 public:26 #if _DEVELOPMENT27 BOOL m_bShowDestructorMessageBox;28 #endif // _DEVELOPMENT29 CComPtr<IFilterGraph2> m_pFilterGraph;30 CComPtr<IMediaControl> m_pMediaControl;31 CComPtr<IMediaEventEx> m_pMediaEventEx;32 CComPtr<IMediaFilter> m_pMediaFilter;33 CComPtr<IMediaPosition> m_pMediaPosition;34 35 public:36 // CGenericFilterGraph37 CGenericFilterGraph(BOOL bShowDestructorMessageBox = FALSE) throw()38 {39 bShowDestructorMessageBox;40 #if _DEVELOPMENT41 m_bShowDestructorMessageBox = bShowDestructorMessageBox;42 #endif // _DEVELOPMENT43 }44 ~CGenericFilterGraph() throw()45 {46 #if _DEVELOPMENT47 if(m_pFilterGraph && m_bShowDestructorMessageBox)48 AtlMessageBox(GetActiveWindow(), _T("DirectShow Filter Graph is about to be Released - Break In"), _T("Debug"), MB_ICONWARNING | MB_OK);49 #endif // _DEVELOPMENT50 }51 VOID CoCreateInstance(const CLSID& ClassIdentifier = CLSID_FilterGraph)52 {53 __C(m_pFilterGraph.CoCreateInstance(ClassIdentifier));54 m_pMediaControl = CComQIPtr<IMediaControl>(m_pFilterGraph);55 m_pMediaEventEx = CComQIPtr<IMediaEventEx>(m_pFilterGraph);56 m_pMediaFilter = CComQIPtr<IMediaFilter>(m_pFilterGraph);57 m_pMediaPosition = CComQIPtr<IMediaPosition>(m_pFilterGraph);58 __D(m_pMediaControl && m_pMediaEventEx && m_pMediaFilter && m_pMediaPosition, E_NOINTERFACE);59 }60 VOID SetShowDestructorMessageBox(BOOL bShowDestructorMessageBox = TRUE)61 {62 bShowDestructorMessageBox;63 #if _DEVELOPMENT64 m_bShowDestructorMessageBox = bShowDestructorMessageBox;65 #endif // _DEVELOPMENT66 }67 operator const CComPtr<IFilterGraph2>& () const throw()68 {69 return m_pFilterGraph;70 }71 const CComPtr<IFilterGraph2>& operator -> () const throw()72 {73 return m_pFilterGraph;74 }75 };23 //class CGenericFilterGraph 24 //{ 25 //public: 26 // #if _DEVELOPMENT 27 // BOOL m_bShowDestructorMessageBox; 28 // #endif // _DEVELOPMENT 29 // CComPtr<IFilterGraph2> m_pFilterGraph; 30 // CComPtr<IMediaControl> m_pMediaControl; 31 // CComPtr<IMediaEventEx> m_pMediaEventEx; 32 // CComPtr<IMediaFilter> m_pMediaFilter; 33 // CComPtr<IMediaPosition> m_pMediaPosition; 34 35 //public: 36 //// CGenericFilterGraph 37 // CGenericFilterGraph(BOOL bShowDestructorMessageBox = FALSE) throw() 38 // { 39 // bShowDestructorMessageBox; 40 // #if _DEVELOPMENT 41 // m_bShowDestructorMessageBox = bShowDestructorMessageBox; 42 // #endif // _DEVELOPMENT 43 // } 44 // ~CGenericFilterGraph() throw() 45 // { 46 // #if _DEVELOPMENT 47 // if(m_pFilterGraph && m_bShowDestructorMessageBox) 48 // AtlMessageBox(GetActiveWindow(), _T("DirectShow Filter Graph is about to be Released - Break In"), _T("Debug"), MB_ICONWARNING | MB_OK); 49 // #endif // _DEVELOPMENT 50 // } 51 // VOID CoCreateInstance(const CLSID& ClassIdentifier = CLSID_FilterGraph) 52 // { 53 // __C(m_pFilterGraph.CoCreateInstance(ClassIdentifier)); 54 // m_pMediaControl = CComQIPtr<IMediaControl>(m_pFilterGraph); 55 // m_pMediaEventEx = CComQIPtr<IMediaEventEx>(m_pFilterGraph); 56 // m_pMediaFilter = CComQIPtr<IMediaFilter>(m_pFilterGraph); 57 // m_pMediaPosition = CComQIPtr<IMediaPosition>(m_pFilterGraph); 58 // __D(m_pMediaControl && m_pMediaEventEx && m_pMediaFilter && m_pMediaPosition, E_NOINTERFACE); 59 // } 60 // VOID SetShowDestructorMessageBox(BOOL bShowDestructorMessageBox = TRUE) 61 // { 62 // bShowDestructorMessageBox; 63 // #if _DEVELOPMENT 64 // m_bShowDestructorMessageBox = bShowDestructorMessageBox; 65 // #endif // _DEVELOPMENT 66 // } 67 // operator const CComPtr<IFilterGraph2>& () const throw() 68 // { 69 // return m_pFilterGraph; 70 // } 71 // const CComPtr<IFilterGraph2>& operator -> () const throw() 72 // { 73 // return m_pFilterGraph; 74 // } 75 //}; 76 76 77 77 //////////////////////////////////////////////////////// … … 242 242 if(FALSE) 243 243 { 244 const DOUBLE pfSignalFrequencies[ 5] = { 1000, 1000, 1000, 1000, 1000};245 const DOUBLE pfSignalAmplitudes[ 5] = { m_fSignalAmplitude, 0, 0, 0, 0 };244 const DOUBLE pfSignalFrequencies[6] = { 1001, 1001, 1001, 1001, 1001, 1001 }; 245 const DOUBLE pfSignalAmplitudes[6] = { 0, 0, m_fSignalAmplitude, 0, 0, 0 }; 246 246 SHORT* pnSampleData = (SHORT*) (Properties.pbBuffer + nIndex); 247 _A(DIM(pfSignalFrequencies) == DIM(pfSignalAmplitudes)); 248 _A(pWaveFormatEx->nChannels <= DIM(pfSignalFrequencies)); 247 249 for(WORD nChannelIndex = 0; nChannelIndex < pWaveFormatEx->nChannels; nChannelIndex++) 248 250 { … … 405 407 CModule() throw() 406 408 { 407 #if defined(_DEBUG) 408 AtlTraceLoadSettings(NULL); 409 #endif // defined(_DEBUG) 409 AtlTraceSetDefaultSettings(); 410 410 _Z4(atlTraceRefcount, 4, _T("this 0x%p\n"), this); 411 411 ZeroMemory(&m_WaveFormatEx, sizeof m_WaveFormatEx); -
trunk/Utilities/GeneratePcmWavFile/GeneratePcmWavFile.sln
r5 r190 1 1 2 2 Microsoft Visual Studio Solution File, Format Version 11.00 3 # Visual Studio 201 03 # Visual Studio 2012 4 4 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GeneratePcmWavFile", "GeneratePcmWavFile.vcxproj", "{3877BEF8-254A-40A4-89F2-4AC049490800}" 5 5 EndProject -
trunk/Utilities/GeneratePcmWavFile/GeneratePcmWavFile.vcxproj
r5 r190 154 154 </ItemDefinitionGroup> 155 155 <ItemGroup> 156 <None Include="ReadMe.txt" />157 </ItemGroup>158 <ItemGroup>159 156 <ClInclude Include="stdafx.h" /> 160 157 <ClInclude Include="targetver.h" /> -
trunk/Utilities/GeneratePcmWavFile/GeneratePcmWavFile.vcxproj.filters
r5 r190 14 14 <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions> 15 15 </Filter> 16 </ItemGroup>17 <ItemGroup>18 <None Include="ReadMe.txt" />19 16 </ItemGroup> 20 17 <ItemGroup>
Note: See TracChangeset
for help on using the changeset viewer.