www.pudn.com > WMACompressor.zip > WmaWriterConfig.h


// 
//  THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY 
//  KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 
//  IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR 
//  PURPOSE. IT CAN BE DISTRIBUTED FREE OF CHARGE AS LONG AS THIS HEADER  
//  REMAINS UNCHANGED. 
// 
//  Email:  yetiicb@hotmail.com 
// 
//  Copyright (C) 2002-2004 Idael Cardoso.  
// 
#pragma once 
 
using namespace System; 
using namespace System::Runtime::InteropServices; 
using namespace System::Runtime::Serialization; 
using namespace Yeti::MMedia; 
using namespace WaveLib; 
 
#include "WmaWriterProfile.h" 
 
namespace Yeti 
{ 
  namespace MMedia 
  { 
    namespace Wmf 
    { 
      [Serializable] 
      public __gc class WmaWriterConfig : public AudioWriterConfig 
      { 
      protected: 
        WmaWriterProfile* m_Profile; 
 
        WmaWriterConfig(SerializationInfo* info, StreamingContext context) 
          :AudioWriterConfig(info, context) 
        { 
          m_Profile = dynamic_cast(info->GetValue(S"WmaWriterConfig.Profile", __typeof(WmaWriterProfile))); 
        } 
      public: 
        WmaWriterConfig(WaveFormat* format, WmaWriterProfile* profile) 
          :AudioWriterConfig(format) 
        { 
          m_Profile = profile; 
        } 
 
        WmaWriterConfig(WaveFormat* format) 
          :AudioWriterConfig(format) 
        { 
          m_Profile = new WmaWriterProfile(); 
        } 
 
        WmaWriterConfig() 
          :AudioWriterConfig(new WaveFormat(44100, 16, 2)) 
        { 
          m_Profile = new WmaWriterProfile(); 
        } 
 
        virtual void GetObjectData(SerializationInfo* info, StreamingContext context) 
        { 
          __super::GetObjectData(info, context); 
          info->AddValue(S"WmaWriterConfig.Profile", m_Profile, m_Profile->GetType()); 
        } 
 
        __property WmaWriterProfile* get_Profile() 
        { 
          return m_Profile; 
        } 
        __property void set_Profile(WmaWriterProfile* profile) 
        { 
          m_Profile = profile; 
        } 
      }; 
    } 
  } 
}