///////////////////////////////////////////////////////////////////////////////////////////
// Sound.h
//
//  Definition of the Sound class, which serves to contain a sound effect or music 
// file, played back using DirectMusic.

#pragma once

#include "DirectMusic.h"

using namespace System;
using namespace System::ComponentModel;

namespace Sunlight
{
    namespace DirectX
    {
        namespace SoundMusic
        {
            // Contains a sound effect or music file for DirectMusic.
            __gc public class Sound
            {
            protected:
                IDirectMusicSegment8    *m_pSegment;

                bool    m_bIsLoaded;
                String *m_pFilename;

                // Load this sound object into memory.
                virtual void Load();
                // Unload this object from memory.
                virtual void Unload();

            public:
                Sound();
                ~Sound();

                // Play this object from the beginning.
                virtual void Play();
                // Stop the playback of this object.
                virtual void Stop();

                // Prepare this object for playback later.
                virtual void Prepare();

                // Filename of this sound object.
                __property String *get_Filename();
                __property void set_Filename(String *);

                DirectMusic *DirectMusicObject;
            };
        }
    }
}