Преглед изворни кода

All audio resources and components now use the automated script export functionality

BearishSun пре 8 година
родитељ
комит
2fe81b4f2d
25 измењених фајлова са 103 додато и 1536 уклоњено
  1. 16 8
      Source/BansheeCore/Include/BsAudio.h
  2. 11 3
      Source/BansheeCore/Include/BsAudioClip.h
  3. 30 41
      Source/BansheeCore/Include/BsAudioSource.h
  4. 6 6
      Source/BansheeCore/Include/BsCAudioListener.h
  5. 23 1
      Source/BansheeCore/Include/BsCAudioSource.h
  6. 2 0
      Source/BansheeUtility/Include/BsPrerequisitesUtil.h
  7. 1 1
      Source/CMakeLists.txt
  8. 13 2
      Source/MBansheeEditor/Windows/Library/ImportOptions.cs
  9. 0 94
      Source/MBansheeEngine/Audio/Audio.cs
  10. 0 158
      Source/MBansheeEngine/Audio/AudioClip.cs
  11. 0 92
      Source/MBansheeEngine/Audio/AudioListener.cs
  12. 0 340
      Source/MBansheeEngine/Audio/AudioSource.cs
  13. 0 70
      Source/MBansheeEngine/Audio/Interop/NativeAudioListener.cs
  14. 0 161
      Source/MBansheeEngine/Audio/Interop/NativeAudioSource.cs
  15. 0 6
      Source/MBansheeEngine/MBansheeEngine.csproj
  16. 0 8
      Source/SBansheeEngine/CMakeSources.cmake
  17. 0 58
      Source/SBansheeEngine/Include/BsScriptAudio.h
  18. 0 44
      Source/SBansheeEngine/Include/BsScriptAudioClip.h
  19. 0 38
      Source/SBansheeEngine/Include/BsScriptAudioListener.h
  20. 0 49
      Source/SBansheeEngine/Include/BsScriptAudioSource.h
  21. 1 1
      Source/SBansheeEngine/Source/BsScriptAssemblyManager.cpp
  22. 0 82
      Source/SBansheeEngine/Source/BsScriptAudio.cpp
  23. 0 88
      Source/SBansheeEngine/Source/BsScriptAudioClip.cpp
  24. 0 57
      Source/SBansheeEngine/Source/BsScriptAudioListener.cpp
  25. 0 128
      Source/SBansheeEngine/Source/BsScriptAudioSource.cpp

+ 16 - 8
Source/BansheeCore/Include/BsAudio.h

@@ -13,13 +13,13 @@ namespace bs
 	 */
 	 */
 
 
 	/** Identifier for a device that can be used for playing audio. */
 	/** Identifier for a device that can be used for playing audio. */
-	struct AudioDevice
+	struct BS_SCRIPT_EXPORT(m:Audio,pl:true) AudioDevice
 	{
 	{
 		WString name;
 		WString name;
 	};
 	};
 
 
 	/** Provides global functionality relating to sounds and music. */
 	/** Provides global functionality relating to sounds and music. */
-	class BS_CORE_EXPORT Audio : public Module<Audio>
+	class BS_CORE_EXPORT BS_SCRIPT_EXPORT(m:Audio) Audio : public Module<Audio>
 	{
 	{
 	public:
 	public:
 		virtual ~Audio() {}
 		virtual ~Audio() {}
@@ -34,28 +34,36 @@ namespace bs
 		 */
 		 */
 		void play(const HAudioClip& clip, const Vector3& position = Vector3::ZERO, float volume = 1.0f);
 		void play(const HAudioClip& clip, const Vector3& position = Vector3::ZERO, float volume = 1.0f);
 
 
-		/** Sets global audio volume. In range [0, 1]. */
+		/** Determines global audio volume. In range [0, 1]. */
+		BS_SCRIPT_EXPORT(n:Volume,pr:setter)
 		virtual void setVolume(float volume) = 0;
 		virtual void setVolume(float volume) = 0;
 
 
-		/** Returns global audio volume. In range [0, 1]. */
+		/** @copydoc setVolume() */
+		BS_SCRIPT_EXPORT(n:Volume,pr:getter)
 		virtual float getVolume() const = 0;
 		virtual float getVolume() const = 0;
 
 
-		/** Pauses audio reproduction globally. */
+		/** Determines if audio reproduction is paused globally. */
+		BS_SCRIPT_EXPORT(n:Paused,pr:setter)
 		virtual void setPaused(bool paused) = 0;
 		virtual void setPaused(bool paused) = 0;
 
 
-		/** Checks is audio reproduction currently paused. */
+		/** @copydoc setPaused() */
+		BS_SCRIPT_EXPORT(n:Paused,pr:getter)
 		virtual bool isPaused() const = 0;
 		virtual bool isPaused() const = 0;
 
 
-		/** Changes the device on which is the audio played back on. */
+		/** Determines the device on which is the audio played back on. */
+		BS_SCRIPT_EXPORT(n:ActiveDevice,pr:setter)
 		virtual void setActiveDevice(const AudioDevice& device) = 0;
 		virtual void setActiveDevice(const AudioDevice& device) = 0;
 
 
-		/** Retrieves the identifier of the device that the audio is currently being played back on. */
+		/** @copydoc setActiveDevice() */
+		BS_SCRIPT_EXPORT(n:ActiveDevice,pr:getter)
 		virtual AudioDevice getActiveDevice() const = 0;
 		virtual AudioDevice getActiveDevice() const = 0;
 		
 		
 		/** Returns the default audio device identifier. */
 		/** Returns the default audio device identifier. */
+		BS_SCRIPT_EXPORT(n:DefaultDevice,pr:getter)
 		virtual AudioDevice getDefaultDevice() const = 0;
 		virtual AudioDevice getDefaultDevice() const = 0;
 
 
 		/** Returns a list of all available audio devices. */
 		/** Returns a list of all available audio devices. */
+		BS_SCRIPT_EXPORT(n:AllDevices,pr:getter)
 		virtual const Vector<AudioDevice>& getAllDevices() const = 0;
 		virtual const Vector<AudioDevice>& getAllDevices() const = 0;
 
 
 		/** @name Internal
 		/** @name Internal

+ 11 - 3
Source/BansheeCore/Include/BsAudioClip.h

@@ -12,14 +12,14 @@ namespace bs
 	 */
 	 */
 
 
 	/** Valid internal engine audio formats. */
 	/** Valid internal engine audio formats. */
-	enum class AudioFormat
+	enum class BS_SCRIPT_EXPORT(m:Audio) AudioFormat
 	{
 	{
 		PCM, /**< Pulse code modulation audio ("raw" uncompressed audio). */
 		PCM, /**< Pulse code modulation audio ("raw" uncompressed audio). */
 		VORBIS /**< Vorbis compressed audio. */
 		VORBIS /**< Vorbis compressed audio. */
 	};
 	};
 
 
 	/** Modes that determine how and when is audio data read. */
 	/** Modes that determine how and when is audio data read. */
-	enum class AudioReadMode
+	enum class BS_SCRIPT_EXPORT(m:Audio) AudioReadMode
 	{
 	{
 		/** Entire audio clip will be loaded and decompressed. Uses most memory but has lowest CPU impact. */
 		/** Entire audio clip will be loaded and decompressed. Uses most memory but has lowest CPU impact. */
 		LoadDecompressed, 
 		LoadDecompressed, 
@@ -72,18 +72,21 @@ namespace bs
 	 * Audio clip stores audio data in a compressed or uncompressed format. Clips can be provided to audio sources or
 	 * Audio clip stores audio data in a compressed or uncompressed format. Clips can be provided to audio sources or
 	 * other audio methods to be played.
 	 * other audio methods to be played.
 	 */
 	 */
-	class BS_CORE_EXPORT AudioClip : public Resource
+	class BS_CORE_EXPORT BS_SCRIPT_EXPORT(m:Audio) AudioClip : public Resource
 	{
 	{
 	public:
 	public:
 		virtual ~AudioClip() { }
 		virtual ~AudioClip() { }
 
 
 		/** Returns the size of a single sample, in bits. */
 		/** Returns the size of a single sample, in bits. */
+		BS_SCRIPT_EXPORT(n:BitDepth,pr:getter)
 		UINT32 getBitDepth() const { return mDesc.bitDepth; }
 		UINT32 getBitDepth() const { return mDesc.bitDepth; }
 		
 		
 		/** Returns how many samples per second is the audio encoded in. */
 		/** Returns how many samples per second is the audio encoded in. */
+		BS_SCRIPT_EXPORT(n:SampleRate,pr:getter)
 		UINT32 getFrequency() const { return mDesc.frequency; }
 		UINT32 getFrequency() const { return mDesc.frequency; }
 
 
 		/** Returns the number of channels provided by the clip. */
 		/** Returns the number of channels provided by the clip. */
+		BS_SCRIPT_EXPORT(n:NumChannels,pr:getter)
 		UINT32 getNumChannels() const { return mDesc.numChannels; }
 		UINT32 getNumChannels() const { return mDesc.numChannels; }
 
 
 		/** 
 		/** 
@@ -91,6 +94,7 @@ namespace bs
 		 *
 		 *
 		 * @see	AudioFormat
 		 * @see	AudioFormat
 		 */
 		 */
+		BS_SCRIPT_EXPORT(n:Format,pr:getter)
 		AudioFormat getFormat() const { return mDesc.format; }
 		AudioFormat getFormat() const { return mDesc.format; }
 
 
 		/** 
 		/** 
@@ -98,15 +102,19 @@ namespace bs
 		 *
 		 *
 		 * @see	AudioReadMode
 		 * @see	AudioReadMode
 		 */
 		 */
+		BS_SCRIPT_EXPORT(n:ReadMode,pr:getter)
 		AudioReadMode getReadMode() const { return mDesc.readMode; }
 		AudioReadMode getReadMode() const { return mDesc.readMode; }
 
 
 		/** Returns the length of the audio clip, in seconds. */
 		/** Returns the length of the audio clip, in seconds. */
+		BS_SCRIPT_EXPORT(n:Duration,pr:getter)
 		float getLength() const { return mLength; }
 		float getLength() const { return mLength; }
 
 
 		/** Returns the total number of samples in the clip (includes all channels). */
 		/** Returns the total number of samples in the clip (includes all channels). */
+		BS_SCRIPT_EXPORT(n:NumSamples,pr:getter)
 		UINT32 getNumSamples() const { return mNumSamples; }
 		UINT32 getNumSamples() const { return mNumSamples; }
 
 
 		/** Determines will the clip be played a spatial 3D sound, or as a normal sound (for example music). */
 		/** Determines will the clip be played a spatial 3D sound, or as a normal sound (for example music). */
+		BS_SCRIPT_EXPORT(n:Is3D,pr:getter)
 		bool is3D() const { return mDesc.is3D; }
 		bool is3D() const { return mDesc.is3D; }
 
 
 		/**
 		/**

+ 30 - 41
Source/BansheeCore/Include/BsAudioSource.h

@@ -13,7 +13,7 @@ namespace bs
 	 */
 	 */
 
 
 	/** Valid states in which AudioSource can be in. */
 	/** Valid states in which AudioSource can be in. */
-	enum class AudioSourceState
+	enum class BS_SCRIPT_EXPORT() AudioSourceState
 	{
 	{
 		Playing, /**< Source is currently playing. */
 		Playing, /**< Source is currently playing. */
 		Paused, /**< Source is currently paused (play will resume from paused point). */
 		Paused, /**< Source is currently paused (play will resume from paused point). */
@@ -32,79 +32,73 @@ namespace bs
 	public:
 	public:
 		virtual ~AudioSource() { }
 		virtual ~AudioSource() { }
 
 
-		/** Sets the audio clip to play. */
+		/** Aaudio clip to play. */
 		virtual void setClip(const HAudioClip& clip);
 		virtual void setClip(const HAudioClip& clip);
 
 
-		/** Returns the attached audio clip. */
+		/** @copydoc setClip() */
 		HAudioClip getClip() const { return mAudioClip; }
 		HAudioClip getClip() const { return mAudioClip; }
 
 
-		/** Sets the world position of the source. Only relevant for spatial (3D) sources. */
+		/** 
+		 * World position of the source. Determines volume/pitch in relation to AudioListener's position. Only relevant
+		 * for spatial (3D) sources. 
+		 */
 		virtual void setPosition(const Vector3& position);
 		virtual void setPosition(const Vector3& position);
 
 
-		/** Returns the world position of the source. Only relevant for spatial (3D) sources. */
+		/** @copydoc setPosition() */
 		Vector3 getPosition() const { return mPosition; }
 		Vector3 getPosition() const { return mPosition; }
 
 
-		/** Sets the velocity of the source. Only relevant for spatial (3D) sources. */
+		/** 
+		 * Velocity of the source. Determines pitch in relation to AudioListener's position. Only relevant for spatial 
+		 * (3D) sources. 
+		 */
 		virtual void setVelocity(const Vector3& velocity);
 		virtual void setVelocity(const Vector3& velocity);
 
 
-		/** Gets the velocity of the source. Only relevant for spatial (3D) sources. */
+		/** @copydoc setVelocity() */
 		Vector3 getVelocity() const { return mVelocity; }
 		Vector3 getVelocity() const { return mVelocity; }
 
 
-		/** Sets the volume of the audio source, in [0, 1] range. */
+		/** Volume of the audio played from this source, in [0, 1] range. */
 		virtual void setVolume(float volume);
 		virtual void setVolume(float volume);
 
 
-		/** Retrieves the volume of the audio source, in [0, 1] range. */
+		/** @copydoc setVolume() */
 		float getVolume() const { return mVolume; }
 		float getVolume() const { return mVolume; }
 
 
-		/** Sets the pitch multiplier of the audio source. */
+		/** Determines the pitch of the played audio. 1 is the default. */
 		virtual void setPitch(float pitch);
 		virtual void setPitch(float pitch);
 
 
-		/** Gets the pitch multiplier of the audio source. */
+		/** @copydoc setPitch() */
 		float getPitch() const { return mPitch; }
 		float getPitch() const { return mPitch; }
 
 
-		/** Sets whether the audio clip should loop when it finishes playing. */
+		/** Determines whether the audio clip should loop when it finishes playing. */
 		virtual void setIsLooping(bool loop);
 		virtual void setIsLooping(bool loop);
 
 
-		/** Gets whether the audio clip should loop when it finishes playing. */
+		/** @copydoc setIsLooping() */
 		bool getIsLooping() const { return mLoop; }
 		bool getIsLooping() const { return mLoop; }
 
 
 		/** 
 		/** 
-		 * Sets the priority of the audio source. If more audio sources are playing than supported by the hardware, some
-		 * might get disabled. By setting a higher priority the audio source is guaranteed to be disabled after sources
+		 * Determines the priority of the audio source. If more audio sources are playing than supported by the hardware, 
+		 * some might get disabled. By setting a higher priority the audio source is guaranteed to be disabled after sources
 		 * with lower priority.
 		 * with lower priority.
 		 */
 		 */
 		virtual void setPriority(INT32 priority);
 		virtual void setPriority(INT32 priority);
 
 
-		/**
-		 * Gets the priority of the audio source. 
-		 *
-		 * @see	setPriority
-		 */
+		/** @copydoc setPriority() */
 		UINT32 getPriority() const { return mPriority; }
 		UINT32 getPriority() const { return mPriority; }
 
 
 		/** 
 		/** 
-		 * Returns the minimum distance at which audio attenuation starts. When the listener is closer to the source
+		 * Minimum distance at which audio attenuation starts. When the listener is closer to the source
 		 * than this value, audio is heard at full volume. Once farther away the audio starts attenuating.
 		 * than this value, audio is heard at full volume. Once farther away the audio starts attenuating.
 		 */
 		 */
 		virtual void setMinDistance(float distance);
 		virtual void setMinDistance(float distance);
 
 
-		/** 
-		 * Gets the minimum distance at which audio attenuation starts. 
-		 *
-		 * @see	setMinDistance
-		 */
+		/** @copydoc setMinDistance() */
 		float getMinDistance() const { return mMinDistance; }
 		float getMinDistance() const { return mMinDistance; }
 
 
 		/**
 		/**
-		 * Sets attenuation that controls how quickly does audio volume drop off as the listener moves further from the 
-		 * source.
+		 * Attenuation that controls how quickly does audio volume drop off as the listener moves further from the source.
 		 */
 		 */
 		virtual void setAttenuation(float attenuation);
 		virtual void setAttenuation(float attenuation);
 
 
-		/** 
-		 * Gets attenuation that controls how quickly does audio volume drop off as the listener moves further from the 
-		 * source.
-		 */
+		/** @copydoc setAttenuation() */
 		float getAttenuation() const { return mAttenuation; }
 		float getAttenuation() const { return mAttenuation; }
 
 
 		/** Starts playing the currently assigned audio clip. */
 		/** Starts playing the currently assigned audio clip. */
@@ -116,18 +110,13 @@ namespace bs
 		/** Stops audio playback, rewinding it to the start. */
 		/** Stops audio playback, rewinding it to the start. */
 		virtual void stop() = 0;
 		virtual void stop() = 0;
 
 
-		/**
-		 * Sets the time at which playback will begin.
-		 *
-		 * @param[in]	time	Time in seconds, in range [0, clipLength].
+		/** 
+		 * Determines the current time of playback. If playback hasn't yet started, it specifies the time at which playback
+		 * will start at. The time is in seconds, in range [0, clipLength]. 
 		 */
 		 */
 		virtual void setTime(float time) = 0;
 		virtual void setTime(float time) = 0;
 
 
-		/**
-		 * Returns the current playback time.
-		 *
-		 * @return	time	Time in seconds, in range [0, clipLength].
-		 */
+		/** @copydoc setTime() */
 		virtual float getTime() const = 0;
 		virtual float getTime() const = 0;
 
 
 		/** Returns the current state of the audio playback (playing/paused/stopped). */
 		/** Returns the current state of the audio playback (playing/paused/stopped). */

+ 6 - 6
Source/BansheeCore/Include/BsCAudioListener.h

@@ -15,11 +15,11 @@ namespace bs
 	/**
 	/**
 	 * @copydoc	AudioListener
 	 * @copydoc	AudioListener
 	 *
 	 *
-	 * Wraps AudioListener as a Component.
+	 * @note	Wraps AudioListener as a Component.
 	 */
 	 */
-    class BS_CORE_EXPORT CAudioListener : public Component
-    {
-    public:
+	class BS_CORE_EXPORT BS_SCRIPT_EXPORT(m:Audio,n:AudioListener) CAudioListener : public Component
+	{
+	public:
 		CAudioListener(const HSceneObject& parent);
 		CAudioListener(const HSceneObject& parent);
 		virtual ~CAudioListener() {}
 		virtual ~CAudioListener() {}
 		
 		
@@ -55,7 +55,7 @@ namespace bs
 
 
 		/** @copydoc Component::update() */
 		/** @copydoc Component::update() */
 		void update() override;
 		void update() override;
-    protected:
+	protected:
 		using Component::destroyInternal;
 		using Component::destroyInternal;
 
 
 		/** Creates the internal representation of the AudioListener and restores the values saved by the Component. */
 		/** Creates the internal representation of the AudioListener and restores the values saved by the Component. */
@@ -84,7 +84,7 @@ namespace bs
 
 
 	protected:
 	protected:
 		CAudioListener() {} // Serialization only
 		CAudioListener() {} // Serialization only
-     };
+	};
 
 
 	 /** @} */
 	 /** @} */
 }
 }

+ 23 - 1
Source/BansheeCore/Include/BsCAudioSource.h

@@ -17,76 +17,98 @@ namespace bs
 	 *
 	 *
 	 * Wraps AudioSource as a Component.
 	 * Wraps AudioSource as a Component.
 	 */
 	 */
-    class BS_CORE_EXPORT CAudioSource : public Component
+    class BS_CORE_EXPORT BS_SCRIPT_EXPORT(m:Audio,n:AudioSource) CAudioSource : public Component
     {
     {
     public:
     public:
 		CAudioSource(const HSceneObject& parent);
 		CAudioSource(const HSceneObject& parent);
 		virtual ~CAudioSource() {}
 		virtual ~CAudioSource() {}
 		
 		
 		/** @copydoc AudioSource::setClip */
 		/** @copydoc AudioSource::setClip */
+		BS_SCRIPT_EXPORT(n:Clip,pr:setter)
 		void setClip(const HAudioClip& clip);
 		void setClip(const HAudioClip& clip);
 
 
 		/** @copydoc AudioSource::getClip */
 		/** @copydoc AudioSource::getClip */
+		BS_SCRIPT_EXPORT(n:Clip,pr:getter)
 		HAudioClip getClip() const { return mAudioClip; }
 		HAudioClip getClip() const { return mAudioClip; }
 
 
 		/** @copydoc AudioSource::setVolume */
 		/** @copydoc AudioSource::setVolume */
+		BS_SCRIPT_EXPORT(n:Volume,pr:setter)
 		void setVolume(float volume);
 		void setVolume(float volume);
 
 
 		/** @copydoc AudioSource::getVolume */
 		/** @copydoc AudioSource::getVolume */
+		BS_SCRIPT_EXPORT(n:Volume,pr:getter)
 		float getVolume() const { return mVolume; }
 		float getVolume() const { return mVolume; }
 
 
 		/** @copydoc AudioSource::setPitch */
 		/** @copydoc AudioSource::setPitch */
+		BS_SCRIPT_EXPORT(n:Pitch,pr:setter)
 		void setPitch(float pitch);
 		void setPitch(float pitch);
 
 
 		/** @copydoc AudioSource::getPitch */
 		/** @copydoc AudioSource::getPitch */
+		BS_SCRIPT_EXPORT(n:Pitch,pr:getter)
 		float getPitch() const { return mPitch; }
 		float getPitch() const { return mPitch; }
 
 
 		/** @copydoc AudioSource::setIsLooping */
 		/** @copydoc AudioSource::setIsLooping */
+		BS_SCRIPT_EXPORT(n:Loop,pr:setter)
 		void setIsLooping(bool loop);
 		void setIsLooping(bool loop);
 
 
 		/** @copydoc AudioSource::getIsLooping */
 		/** @copydoc AudioSource::getIsLooping */
+		BS_SCRIPT_EXPORT(n:Loop,pr:getter)
 		bool getIsLooping() const { return mLoop; }
 		bool getIsLooping() const { return mLoop; }
 
 
 		/** @copydoc AudioSource::setPriority */
 		/** @copydoc AudioSource::setPriority */
+		BS_SCRIPT_EXPORT(n:Priority,pr:setter)
 		void setPriority(UINT32 priority);
 		void setPriority(UINT32 priority);
 
 
 		/** @copydoc AudioSource::getPriority */
 		/** @copydoc AudioSource::getPriority */
+		BS_SCRIPT_EXPORT(n:Priority,pr:getter)
 		UINT32 getPriority() const { return mPriority; }
 		UINT32 getPriority() const { return mPriority; }
 
 
 		/** @copydoc AudioSource::setMinDistance */
 		/** @copydoc AudioSource::setMinDistance */
+		BS_SCRIPT_EXPORT(n:MinDistance,pr:setter)
 		void setMinDistance(float distance);
 		void setMinDistance(float distance);
 
 
 		/** @copydoc AudioSource::getMinDistance */
 		/** @copydoc AudioSource::getMinDistance */
+		BS_SCRIPT_EXPORT(n:MinDistance,pr:getter)
 		float getMinDistance() const { return mMinDistance; }
 		float getMinDistance() const { return mMinDistance; }
 
 
 		/** @copydoc AudioSource::setAttenuation */
 		/** @copydoc AudioSource::setAttenuation */
+		BS_SCRIPT_EXPORT(n:Attenuation,pr:setter)
 		void setAttenuation(float attenuation);
 		void setAttenuation(float attenuation);
 
 
 		/** @copydoc AudioSource::getAttenuation */
 		/** @copydoc AudioSource::getAttenuation */
+		BS_SCRIPT_EXPORT(n:Attenuation,pr:getter)
 		float getAttenuation() const { return mAttenuation; }
 		float getAttenuation() const { return mAttenuation; }
 
 
 		/** @copydoc AudioSource::setTime */
 		/** @copydoc AudioSource::setTime */
+		BS_SCRIPT_EXPORT(n:Time,pr:setter)
 		void setTime(float time);
 		void setTime(float time);
 
 
 		/** @copydoc AudioSource::getTime */
 		/** @copydoc AudioSource::getTime */
+		BS_SCRIPT_EXPORT(n:Time,pr:getter)
 		float getTime() const;
 		float getTime() const;
 
 
 		/** Sets whether playback should start as soon as the component is enabled. */
 		/** Sets whether playback should start as soon as the component is enabled. */
+		BS_SCRIPT_EXPORT(n:PlayOnStart,pr:setter)
 		void setPlayOnStart(bool enable) { mPlayOnStart = enable; }
 		void setPlayOnStart(bool enable) { mPlayOnStart = enable; }
 
 
 		/** Determines should playback start as soon as the component is enabled. */
 		/** Determines should playback start as soon as the component is enabled. */
+		BS_SCRIPT_EXPORT(n:PlayOnStart,pr:getter)
 		bool getPlayOnStart() const { return mPlayOnStart; }
 		bool getPlayOnStart() const { return mPlayOnStart; }
 
 
 		/** @copydoc AudioSource::play */
 		/** @copydoc AudioSource::play */
+		BS_SCRIPT_EXPORT(n:Play)
 		void play();
 		void play();
 
 
 		/** @copydoc AudioSource::pause */
 		/** @copydoc AudioSource::pause */
+		BS_SCRIPT_EXPORT(n:Pause)
 		void pause();
 		void pause();
 
 
 		/** @copydoc AudioSource::stop */
 		/** @copydoc AudioSource::stop */
+		BS_SCRIPT_EXPORT(n:Stop)
 		void stop();
 		void stop();
 
 
 		/** @copydoc AudioSource::getState */
 		/** @copydoc AudioSource::getState */
+		BS_SCRIPT_EXPORT(n:State,pr:getter)
 		AudioSourceState getState() const;
 		AudioSourceState getState() const;
 
 
 		/** @name Internal
 		/** @name Internal

+ 2 - 0
Source/BansheeUtility/Include/BsPrerequisitesUtil.h

@@ -243,6 +243,8 @@
  *  - in - When enabled ensures only the interop C# method is generated, but not a public one. It is instead expected
  *  - in - When enabled ensures only the interop C# method is generated, but not a public one. It is instead expected
  *		   the user will manually implement the public method. Supported values are "true" or "false". Default is "false".
  *		   the user will manually implement the public method. Supported values are "true" or "false". Default is "false".
  *		   Only supported on methods.
  *		   Only supported on methods.
+ *  - m  - Specifies the name of the module to place the entry in. This determines the documentation group, and may also
+ *		   determine namespace and/or module (e.g. m:Animation to place it in the Animation module). Usable on types.
  */
  */
 
 
 #if BS_COMPILER == BS_COMPILER_CLANG
 #if BS_COMPILER == BS_COMPILER_CLANG

+ 1 - 1
Source/CMakeLists.txt

@@ -5,7 +5,7 @@ project (Banshee)
 set (BS_VERSION_MAJOR 0)
 set (BS_VERSION_MAJOR 0)
 set (BS_VERSION_MINOR 4)
 set (BS_VERSION_MINOR 4)
 
 
-set (BS_PREBUILT_DEPENDENCIES_VERSION 5)
+set (BS_PREBUILT_DEPENDENCIES_VERSION 6)
 set (BS_SRC_DEPENDENCIES_VERSION 12)
 set (BS_SRC_DEPENDENCIES_VERSION 12)
 
 
 # Configuration types
 # Configuration types

+ 13 - 2
Source/MBansheeEditor/Windows/Library/ImportOptions.cs

@@ -566,7 +566,7 @@ namespace BansheeEditor
     /// Determines how is a font rendered into the bitmap texture.
     /// Determines how is a font rendered into the bitmap texture.
     /// </summary>
     /// </summary>
 	public enum FontRenderMode // Note: Must match C++ enum FontRenderMode
 	public enum FontRenderMode // Note: Must match C++ enum FontRenderMode
-	{
+    {
         /// <summary>Render antialiased fonts without hinting (slightly more blurry).</summary>
         /// <summary>Render antialiased fonts without hinting (slightly more blurry).</summary>
 		Smooth,
 		Smooth,
         /// <summary>Render non-antialiased fonts without hinting (slightly more blurry).</summary>
         /// <summary>Render non-antialiased fonts without hinting (slightly more blurry).</summary>
@@ -575,7 +575,18 @@ namespace BansheeEditor
 		HintedSmooth,
 		HintedSmooth,
         /// <summary>Render non-antialiased fonts with hinting.</summary>
         /// <summary>Render non-antialiased fonts with hinting.</summary>
 		HintedRaster
 		HintedRaster
-	}
+    }
+
+    /// <summary>
+    /// Numbers of bits per audio sample.
+    /// </summary>
+    public enum AudioBitDepth
+    {
+        Bits8 = 8,
+        Bits16 = 16,
+        Bits24 = 24,
+        Bits32 = 32
+    }
 
 
     /// <summary>
     /// <summary>
     /// Provides various options for controlling how is an audio clip file imported.
     /// Provides various options for controlling how is an audio clip file imported.

+ 0 - 94
Source/MBansheeEngine/Audio/Audio.cs

@@ -1,94 +0,0 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-using System;
-using System.Runtime.CompilerServices;
-
-namespace BansheeEngine
-{
-    /// <summary>
-    /// Identifier for a device that can be used for playing audio.
-    /// </summary>
-    public class AudioDevice : ScriptObject
-    {
-        /// <summary>
-        /// Constructor for internal use by the runtime only.
-        /// </summary>
-        private AudioDevice() { }
-
-        /// <summary>
-        /// Name of the audio device.
-        /// </summary>
-        public string Name
-        {
-            get { return Internal_GetName(mCachedPtr); }
-        }
-
-        [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern string Internal_GetName(IntPtr thisPtr);
-    }
-
-    /// <summary>
-    /// Provides global functionality relating to sounds and music.
-    /// </summary>
-    public static class Audio
-    {
-        /// <summary>
-        /// Global audio volume. In range [0, 1].
-        /// </summary>
-        public static float Volume
-        {
-            get { return Internal_GetVolume(); }
-            set { Internal_SetVolume(value); }
-        }
-
-        /// <summary>
-        /// Device on which is the audio played back on.
-        /// </summary>
-        public static AudioDevice ActiveDevice
-        {
-            get { return Internal_GetActiveDevice(); }
-            set
-            {
-                IntPtr devicePtr = IntPtr.Zero;
-                if (value != null)
-                    devicePtr = value.GetCachedPtr();
-
-                Internal_SetActiveDevice(devicePtr);
-            }
-        }
-
-        /// <summary>
-        /// Returns the default audio device identifier.
-        /// </summary>
-        public static AudioDevice DefaultDevice
-        {
-            get { return Internal_GetDefaultDevice(); }
-        }
-
-        /// <summary>
-        /// Returns a list of all available audio devices
-        /// </summary>
-        public static AudioDevice[] AllDevices
-        {
-            get { return Internal_GetAllDevices(); }
-        }
-
-        [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern void Internal_SetVolume(float volume);
-
-        [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern float Internal_GetVolume();
-
-        [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern void Internal_SetActiveDevice(IntPtr device);
-
-        [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern AudioDevice Internal_GetActiveDevice();
-
-        [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern AudioDevice Internal_GetDefaultDevice();
-
-        [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern AudioDevice[] Internal_GetAllDevices();
-    }
-}

+ 0 - 158
Source/MBansheeEngine/Audio/AudioClip.cs

@@ -1,158 +0,0 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-using System;
-using System.Runtime.CompilerServices;
-
-namespace BansheeEngine
-{
-    /** @addtogroup Audio
-     *  @{
-     */
-
-    /// <summary>
-    /// Valid internal engine audio formats.
-    /// </summary>
-    public enum AudioFormat // Note: Must match C++ enum AudioFormat
-    {
-        /// <summary>Pulse code modulation audio ("raw" uncompressed audio).</summary>
-        PCM,
-        /// <summary>Vorbis compressed audio.</summary>
-	    VORBIS
-    }
-
-    /// <summary>
-    /// Modes that determine how and when is audio data read.
-    /// </summary>
-    public enum AudioReadMode // Note: Must match C++ enum AudioReadMode
-    {
-        /// <summary>
-        /// Entire audio clip will be loaded and decompressed. Uses most memory but has lowest CPU impact.
-        /// </summary>
-        LoadDecompressed, 
-        /// <summary>
-        /// Entire audio clip will be loaded, but will be decompressed while playing. Uses medium amount of memory and has
-        /// the highest CPU impact. 
-        /// </summary>
-		LoadCompressed,
-        /// <summary>
-        /// Audio will be slowly streamed from the disk, and decompressed if needed. Uses very little memory, and has either
-        /// low or high CPU impact depending if the audio is in a compressed format. Since data is streamed from the disk,
-        /// read speeds could also be a bottleneck.
-        /// </summary>
-		Stream
-    }
-
-    /// <summary>
-    /// Numbers of bits per audio sample.
-    /// </summary>
-    public enum AudioBitDepth
-    {
-        Bits8 = 8,
-        Bits16 = 16,
-        Bits24 = 24,
-        Bits32 = 32
-    }
-
-    /// <summary>
-    /// Audio clip stores audio data in a compressed or uncompressed format. Clips can be provided to audio sources or
-    /// other audio methods to be played.
-    /// </summary>
-    public class AudioClip : Resource
-    {
-        /// <summary>
-        /// Constructor for internal use by the runtime.
-        /// </summary>
-        private AudioClip()
-        { }
-
-        /// <summary>
-        /// Returns the size of a single sample, in bits.
-        /// </summary>
-        public int BitDepth
-        {
-            get { return Internal_GetBitDepth(mCachedPtr); }
-        }
-
-        /// <summary>
-        /// Returns how many samples per second is the audio encoded in.
-        /// </summary>
-        public int SampleRate
-        {
-            get { return Internal_GetSampleRate(mCachedPtr); }
-        }
-
-        /// <summary>
-        /// Returns the number of channels provided by the clip.
-        /// </summary>
-        public int NumChannels
-        {
-            get { return Internal_GetNumChannels(mCachedPtr); }
-        }
-
-        /// <summary>
-        /// Returns in which format is audio data stored in. 
-        /// </summary>
-        public AudioFormat Format
-        {
-            get { return Internal_GetAudioFormat(mCachedPtr); }
-        }
-
-        /// <summary>
-        /// Returns how is the audio data read/decoded. 
-        /// </summary>
-        public AudioReadMode ReadMode
-        {
-            get { return Internal_GetReadMode(mCachedPtr); }
-        }
-
-        /// <summary>
-        /// Returns the total number of samples in the clip (includes all channels).
-        /// </summary>
-        public int NumSamples
-        {
-            get { return Internal_GetNumSamples(mCachedPtr); }
-        }
-
-        /// <summary>
-        /// Returns the length of the audio clip, in seconds.
-        /// </summary>
-        public float Duration
-        {
-            get { return Internal_GetDuration(mCachedPtr); }
-        }
-
-        /// <summary>
-        /// Determines will the clip be played a spatial 3D sound, or as a normal sound (for example music).
-        /// </summary>
-        public bool Is3D
-        {
-            get { return Internal_GetIs3D(mCachedPtr); }
-        }
-
-        [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern int Internal_GetBitDepth(IntPtr thisPtr);
-
-        [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern int Internal_GetSampleRate(IntPtr thisPtr);
-
-        [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern int Internal_GetNumChannels(IntPtr thisPtr);
-
-        [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern AudioFormat Internal_GetAudioFormat(IntPtr thisPtr);
-
-        [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern AudioReadMode Internal_GetReadMode(IntPtr thisPtr);
-
-        [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern int Internal_GetNumSamples(IntPtr thisPtr);
-
-        [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern float Internal_GetDuration(IntPtr thisPtr);
-
-        [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern bool Internal_GetIs3D(IntPtr thisPtr);
-    }
-
-    /** @} */
-}

+ 0 - 92
Source/MBansheeEngine/Audio/AudioListener.cs

@@ -1,92 +0,0 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-namespace BansheeEngine
-{
-    /** @addtogroup Audio
-     *  @{
-     */
-
-    /// <summary>
-    /// Represents a listener that hears audio sources. For spatial audio the volume and pitch of played audio is determined
-    /// by the distance, orientation and velocity differences between the source and the listener.
-    /// </summary>
-    public abstract class AudioListener : ManagedComponent
-    {
-        internal NativeAudioListener native;
-
-        private Vector3 lastPosition;
-        private Vector3 velocity;
-
-        /// <summary>
-        /// Updates the transform of the internal listener representation from the transform of the component's scene
-        /// object.
-        /// </summary>
-        protected void UpdateTransform()
-        {
-            native.Position = SceneObject.Position;
-            native.Direction = SceneObject.Forward;
-            native.Up = SceneObject.Up;
-            native.Velocity = velocity;
-        }
-        
-        private void OnInitialize()
-        {
-            NotifyFlags = TransformChangedFlags.Transform;
-        }
-
-        private void OnUpdate()
-        {
-            Vector3 worldPos = SceneObject.Position;
-            velocity = (worldPos - lastPosition)/Time.FrameDelta;
-            lastPosition = worldPos;
-        }
-
-        private void OnEnable()
-        {
-            RestoreNative();
-        }
-
-        private void OnDisable()
-        {
-            DestroyNative();
-        }
-
-        private void OnDestroy()
-        {
-            DestroyNative();
-        }
-
-        private void OnTransformChanged(TransformChangedFlags flags)
-        {
-            if (!SceneObject.Active)
-                return;
-
-            if ((flags & (TransformChangedFlags.Parent | TransformChangedFlags.Transform)) != 0)
-                UpdateTransform();
-        }
-
-        /// <summary>
-        /// Destroys the internal listener representation.
-        /// </summary>
-        private void DestroyNative()
-        {
-            if (native != null)
-            {
-                native.Destroy();
-                native = null;
-            }
-        }
-
-        /// <summary>
-        /// Creates the internal representation of the listener and restores the values saved by the component.
-        /// </summary>
-        private void RestoreNative()
-        {
-            native = new NativeAudioListener();
-
-            UpdateTransform();
-        }
-    }
-
-    /** @} */
-}

+ 0 - 340
Source/MBansheeEngine/Audio/AudioSource.cs

@@ -1,340 +0,0 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-namespace BansheeEngine
-{
-    /** @addtogroup Audio
-     *  @{
-     */
-
-    /// <summary>
-    /// Valid states in which AudioSource can be in.
-    /// </summary>
-    public enum AudioSourceState // Note: Must match C++ enum AudioSourceState
-    {
-        /// <summary>
-        /// Source is currently playing.
-        /// </summary>
-        Playing,
-        /// <summary>
-        /// Source is currently paused (play will resume from paused point).
-        /// </summary>
-		Paused,
-        /// <summary>
-        /// Source is currently stopped (play will resume from start).
-        /// </summary>
-		Stopped
-    }
-
-    /// <summary>
-    /// Represents a source for emitting audio. Audio can be played spatially (gun shot), or normally (music). Each audio
-    /// source must have an AudioClip to play-back, and it can also have a position in the case of spatial(3D) audio.
-    /// 
-    /// Whether or not an audio source is spatial is controlled by the assigned AudioClip.The volume and the pitch of a
-    /// spatial audio source is controlled by its position and the AudioListener's position/direction/velocity.
-    /// </summary>
-    public abstract class AudioSource : ManagedComponent
-    {
-        internal NativeAudioSource native;
-
-        [SerializeField]
-        internal SerializableData serializableData = new SerializableData();
-
-        private Vector3 lastPosition;
-        private Vector3 velocity;
-
-        /// <summary>
-        /// Audio clip that will be played.
-        /// </summary>
-        public AudioClip Clip
-        {
-            get { return serializableData.audioClip; }
-            set
-            {
-                if (serializableData.audioClip == value)
-                    return;
-
-                serializableData.audioClip = value;
-
-                if (native != null)
-                    native.Clip = value;
-            }
-        }
-
-        /// <summary>
-        /// Volume of the audio source, in [0, 1] range.
-        /// </summary>
-        public float Volume
-        {
-            get { return serializableData.volume; }
-            set
-            {
-                if (serializableData.volume == value)
-                    return;
-
-                serializableData.volume = value;
-
-                if (native != null)
-                    native.Volume = value;
-            }
-        }
-
-        /// <summary>
-        /// Pitch of the audio source.
-        /// </summary>
-        public float Pitch
-        {
-            get { return serializableData.pitch; }
-            set
-            {
-                if (serializableData.pitch == value)
-                    return;
-
-                serializableData.pitch = value;
-
-                if (native != null)
-                    native.Pitch = value;
-            }
-        }
-
-        /// <summary>
-        /// Determines whether the audio clip should loop when it finishes playing.
-        /// </summary>
-        public bool Loop
-        {
-            get { return serializableData.loop; }
-            set
-            {
-                if (serializableData.loop == value)
-                    return;
-
-                serializableData.loop = value;
-
-                if (native != null)
-                    native.Loop = value;
-            }
-        }
-
-        /// <summary>
-        /// Sets the priority of the audio source. If more audio sources are playing than supported by the hardware, some
-        /// might get disabled. By setting a higher priority the audio source is guaranteed to be disabled after sources
-        /// with lower priority.
-        /// </summary>
-        public uint Priority
-        {
-            get { return serializableData.priority; }
-            set
-            {
-                if (serializableData.priority == value)
-                    return;
-
-                serializableData.priority = value;
-
-                if (native != null)
-                    native.Priority = value;
-            }
-        }
-
-        /// <summary>
-        /// Minimum distance at which audio attenuation starts. When the listener is closer to the source than this value, 
-        /// audio is heard at full volume. Once farther away the audio starts attenuating.
-        /// </summary>
-        public float MinDistance
-        {
-            get { return serializableData.minDistance; }
-            set
-            {
-                if (serializableData.minDistance == value)
-                    return;
-
-                serializableData.minDistance = value;
-
-                if (native != null)
-                    native.MinDistance = value;
-            }
-        }
-
-        /// <summary>
-        /// Determines how quickly does audio volume drop off as the listener moves further from the source.
-        /// </summary>
-        public float Attenuation
-        {
-            get { return serializableData.attenuation; }
-            set
-            {
-                if (serializableData.attenuation == value)
-                    return;
-
-                serializableData.attenuation = value;
-
-                if (native != null)
-                    native.Attenuation = value;
-            }
-        }
-
-        /// <summary>
-        /// Playback position in seconds.
-        /// </summary>
-        public float Time
-        {
-            get
-            {
-                if (native != null)
-                    return native.Time;
-
-                return 0.0f;
-            }
-            set
-            {
-                if (native != null)
-                    native.Time = value;
-            }
-        }
-
-        /// <summary>
-        /// Determines if the playback of the audio clip should start as soon as the component is initialized.
-        /// </summary>
-        public bool PlayOnStart
-        {
-            get { return serializableData.playOnStart; }
-            set { serializableData.playOnStart = value; }
-        }
-
-        /// <summary>
-        /// Returns the current state of the audio playback (playing/paused/stopped).
-        /// </summary>
-        public AudioSourceState State
-        {
-            get
-            {
-                if (native != null)
-                    return native.State;
-
-                return AudioSourceState.Stopped;
-            }
-        }
-
-        /// <summary>
-        /// Starts playing the currently assigned audio clip.
-        /// </summary>
-        public void Play()
-        {
-            if (native != null)
-                native.Play();
-        }
-
-        /// <summary>
-        /// Pauses audio playback.
-        /// </summary>
-        public void Pause()
-        {
-            if (native != null)
-                native.Pause();
-        }
-
-        /// <summary>
-        /// Stops audio playback, rewinding it to the start.
-        /// </summary>
-        public void Stop()
-        {
-            if (native != null)
-                native.Stop();
-        }
-
-        /// <summary>
-        /// Updates the transform of the internal source representation from the transform of the component's scene
-        /// object.
-        /// </summary>
-        protected void UpdateTransform()
-        {
-            native.Position = SceneObject.Position;
-            native.Velocity = velocity;
-        }
-
-        private void OnInitialize()
-        {
-            NotifyFlags = TransformChangedFlags.Transform;
-        }
-
-        private void OnUpdate()
-        {
-            Vector3 worldPos = SceneObject.Position;
-            velocity = (worldPos - lastPosition) / BansheeEngine.Time.FrameDelta;
-            lastPosition = worldPos;
-        }
-
-        private void OnEnable()
-        {
-            RestoreNative();
-
-            if (serializableData.playOnStart)
-                Play();
-        }
-
-        private void OnDisable()
-        {
-            DestroyNative();
-        }
-
-        private void OnDestroy()
-        {
-            DestroyNative();
-        }
-
-        private void OnTransformChanged(TransformChangedFlags flags)
-        {
-            if (!SceneObject.Active)
-                return;
-
-            if ((flags & (TransformChangedFlags.Parent | TransformChangedFlags.Transform)) != 0)
-                UpdateTransform();
-        }
-
-        /// <summary>
-        /// Destroys the internal source representation.
-        /// </summary>
-        private void DestroyNative()
-        {
-            if (native != null)
-            {
-                native.Destroy();
-                native = null;
-            }
-        }
-
-        /// <summary>
-        /// Creates the internal representation of the source and restores the values saved by the component.
-        /// </summary>
-        private void RestoreNative()
-        {
-            native = new NativeAudioSource();
-
-            native.Clip = serializableData.audioClip;
-            native.Volume = serializableData.volume;
-            native.Pitch = serializableData.pitch;
-            native.Loop = serializableData.loop;
-            native.Priority = serializableData.priority;
-            native.MinDistance = serializableData.minDistance;
-            native.Attenuation = serializableData.attenuation;
-
-            UpdateTransform();
-        }
-
-        /// <summary>
-        /// Holds all data the listener component needs to persist through serialization.
-        /// </summary>
-        [SerializeObject]
-        internal class SerializableData
-        {
-            public AudioClip audioClip;
-            public float volume = 1.0f;
-            public float pitch = 1.0f;
-            public bool loop = false;
-            public uint priority = 0;
-            public float minDistance = 1.0f;
-            public float attenuation = 1.0f;
-            public bool playOnStart = true;
-        }
-    }
-
-    /** @} */
-}

+ 0 - 70
Source/MBansheeEngine/Audio/Interop/NativeAudioListener.cs

@@ -1,70 +0,0 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-using System;
-using System.Runtime.CompilerServices;
-
-namespace BansheeEngine
-{
-    /** @cond INTEROP */
-    /** @addtogroup Interop
-     *  @{
-     */
-
-    /// <summary>
-    /// Wrapper around the native AudioListener class.
-    /// <see cref="AudioListener"/>
-    /// </summary>
-    internal class NativeAudioListener : ScriptObject
-    {
-        public NativeAudioListener()
-        {
-            Internal_CreateInstance(this);
-        }
-
-        public Vector3 Position
-        {
-            set { Internal_SetPosition(mCachedPtr, ref value); }
-        }
-
-        public Vector3 Direction
-        {
-            set { Internal_SetDirection(mCachedPtr, ref value); }
-        }
-
-        public Vector3 Up
-        {
-            set { Internal_SetUp(mCachedPtr, ref value); }
-        }
-
-        public Vector3 Velocity
-        {
-            set { Internal_SetVelocity(mCachedPtr, ref value); }
-        }
-
-        public void Destroy()
-        {
-            Internal_Destroy(mCachedPtr);
-        }
-
-        [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern void Internal_CreateInstance(NativeAudioListener instance);
-
-        [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern void Internal_Destroy(IntPtr thisPtr);
-
-        [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern void Internal_SetPosition(IntPtr thisPtr, ref Vector3 pos);
-
-        [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern void Internal_SetDirection(IntPtr thisPtr, ref Vector3 direction);
-
-        [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern void Internal_SetUp(IntPtr thisPtr, ref Vector3 up);
-
-        [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern void Internal_SetVelocity(IntPtr thisPtr, ref Vector3 velocity);
-    }
-
-    /** @} */
-    /** @endcond */
-}

+ 0 - 161
Source/MBansheeEngine/Audio/Interop/NativeAudioSource.cs

@@ -1,161 +0,0 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-using System;
-using System.Runtime.CompilerServices;
-
-namespace BansheeEngine
-{
-    /** @cond INTEROP */
-    /** @addtogroup Interop
-     *  @{
-     */
-
-    /// <summary>
-    /// Wrapper around the native AudioSource class.
-    /// <see cref="AudioSource"/>
-    /// </summary>
-    internal class NativeAudioSource : ScriptObject
-    {
-        public NativeAudioSource()
-        {
-            Internal_CreateInstance(this);
-        }
-
-        public Vector3 Position
-        {
-            set { Internal_SetPosition(mCachedPtr, ref value); }
-        }
-
-        public Vector3 Velocity
-        {
-            set { Internal_SetVelocity(mCachedPtr, ref value); }
-        }
-
-        public AudioClip Clip
-        {
-            set
-            {
-                IntPtr clipPtr = IntPtr.Zero;
-                if (value != null)
-                    clipPtr = value.GetCachedPtr();
-
-                Internal_SetClip(mCachedPtr, clipPtr);
-            }
-        }
-
-        public float Volume
-        {
-            set { Internal_SetVolume(mCachedPtr, value); }
-        }
-
-        public float Pitch
-        {
-            set { Internal_SetPitch(mCachedPtr, value); }
-        }
-
-        public bool Loop
-        {
-            set { Internal_SetIsLooping(mCachedPtr, value); }
-        }
-
-        public uint Priority
-        {
-            set { Internal_SetPriority(mCachedPtr, value); }
-        }
-
-        public float MinDistance
-        {
-            set { Internal_SetMinDistance(mCachedPtr, value); }
-        }
-
-        public float Attenuation
-        {
-            set { Internal_SetAttenuation(mCachedPtr, value); }
-        }
-
-        public float Time
-        {
-            get { return Internal_GetTime(mCachedPtr); }
-            set { Internal_SetTime(mCachedPtr, value); }
-        }
-
-        public AudioSourceState State
-        {
-            get { return (AudioSourceState)Internal_GetState(mCachedPtr); }
-        }
-
-        public void Play()
-        {
-            Internal_Play(mCachedPtr);
-        }
-
-        public void Pause()
-        {
-            Internal_Pause(mCachedPtr);
-        }
-
-        public void Stop()
-        {
-            Internal_Stop(mCachedPtr);
-        }
-
-        public void Destroy()
-        {
-            Internal_Destroy(mCachedPtr);
-        }
-
-        [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern void Internal_CreateInstance(NativeAudioSource instance);
-
-        [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern void Internal_Destroy(IntPtr thisPtr);
-
-        [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern void Internal_SetPosition(IntPtr thisPtr, ref Vector3 pos);
-
-        [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern void Internal_SetVelocity(IntPtr thisPtr, ref Vector3 velocity);
-
-        [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern void Internal_SetClip(IntPtr thisPtr, IntPtr clip);
-
-        [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern void Internal_SetVolume(IntPtr thisPtr, float volume);
-
-        [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern void Internal_SetPitch(IntPtr thisPtr, float pitch);
-
-        [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern void Internal_SetIsLooping(IntPtr thisPtr, bool loop);
-
-        [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern void Internal_SetPriority(IntPtr thisPtr, uint priority);
-
-        [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern void Internal_SetMinDistance(IntPtr thisPtr, float distance);
-
-        [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern void Internal_SetAttenuation(IntPtr thisPtr, float attenuation);
-
-        [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern void Internal_SetTime(IntPtr thisPtr, float position);
-
-        [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern float Internal_GetTime(IntPtr thisPtr);
-
-        [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern void Internal_Play(IntPtr thisPtr);
-
-        [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern void Internal_Pause(IntPtr thisPtr);
-
-        [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern void Internal_Stop(IntPtr thisPtr);
-
-        [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern int Internal_GetState(IntPtr thisPtr);
-    }
-
-    /** @} */
-    /** @endcond */
-}

+ 0 - 6
Source/MBansheeEngine/MBansheeEngine.csproj

@@ -47,12 +47,6 @@
     <Compile Include="Animation\Animation.cs" />
     <Compile Include="Animation\Animation.cs" />
     <Compile Include="Animation\Bone.cs" />
     <Compile Include="Animation\Bone.cs" />
     <Compile Include="Animation\Interop\NativeAnimation.cs" />
     <Compile Include="Animation\Interop\NativeAnimation.cs" />
-    <Compile Include="Audio\Audio.cs" />
-    <Compile Include="Audio\AudioClip.cs" />
-    <Compile Include="Audio\AudioListener.cs" />
-    <Compile Include="Audio\AudioSource.cs" />
-    <Compile Include="Audio\Interop\NativeAudioListener.cs" />
-    <Compile Include="Audio\Interop\NativeAudioSource.cs" />
     <Compile Include="GUI\GUICanvas.cs" />
     <Compile Include="GUI\GUICanvas.cs" />
     <Compile Include="GUI\GUIScrollBar.cs" />
     <Compile Include="GUI\GUIScrollBar.cs" />
     <Compile Include="Rendering\RenderSettings.cs" />
     <Compile Include="Rendering\RenderSettings.cs" />

+ 0 - 8
Source/SBansheeEngine/CMakeSources.cmake

@@ -126,10 +126,6 @@ set(BS_SBANSHEEENGINE_INC_WRAPPERS
 	"Include/BsScriptResources.h"
 	"Include/BsScriptResources.h"
 	"Include/BsScriptResourceRef.h"
 	"Include/BsScriptResourceRef.h"
 	"Include/BsScriptRenderSettings.h"
 	"Include/BsScriptRenderSettings.h"
-	"Include/BsScriptAudioClip.h"
-	"Include/BsScriptAudio.h"
-	"Include/BsScriptAudioSource.h"
-	"Include/BsScriptAudioListener.h"
 	"Include/BsScriptAnimation.h"
 	"Include/BsScriptAnimation.h"
 	"Include/BsScriptManagedComponent.h"
 	"Include/BsScriptManagedComponent.h"
 	"Include/BsScriptQuaternion.h"
 	"Include/BsScriptQuaternion.h"
@@ -249,10 +245,6 @@ set(BS_SBANSHEEENGINE_SRC_WRAPPERS
 	"Source/BsScriptRenderTarget.cpp"
 	"Source/BsScriptRenderTarget.cpp"
 	"Source/BsScriptRenderable.cpp"
 	"Source/BsScriptRenderable.cpp"
 	"Source/BsScriptRenderSettings.cpp"
 	"Source/BsScriptRenderSettings.cpp"
-	"Source/BsScriptAudioClip.cpp"
-	"Source/BsScriptAudio.cpp"
-	"Source/BsScriptAudioSource.cpp"
-	"Source/BsScriptAudioListener.cpp"
 	"Source/BsScriptAnimation.cpp"
 	"Source/BsScriptAnimation.cpp"
 	"Source/BsScriptManagedComponent.cpp"
 	"Source/BsScriptManagedComponent.cpp"
 	"Source/BsScriptQuaternion.cpp"
 	"Source/BsScriptQuaternion.cpp"

+ 0 - 58
Source/SBansheeEngine/Include/BsScriptAudio.h

@@ -1,58 +0,0 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptObject.h"
-#include "BsAudio.h"
-
-namespace bs
-{
-	/** @addtogroup ScriptInteropEngine
-	 *  @{
-	 */
-
-	/** Interop class between C++ & CLR for AudioDevice. */
-	class BS_SCR_BE_EXPORT ScriptAudioDevice : public ScriptObject<ScriptAudioDevice>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "AudioDevice")
-
-		/** Converts a native audio device into its managed counterpart. */
-		static MonoObject* create(const AudioDevice& device);
-
-		/** Returns the native audio device. */
-		const AudioDevice& getDevice() const { return mDevice; }
-	private:
-		ScriptAudioDevice(MonoObject* instance, const AudioDevice& device);
-
-		AudioDevice mDevice;
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static MonoString* internal_GetName(ScriptAudioDevice* thisPtr);
-	};
-
-	/**	Interop class between C++ & CLR for Audio. */
-	class BS_SCR_BE_EXPORT ScriptAudio : public ScriptObject<ScriptAudio>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Audio")
-
-	private:
-		ScriptAudio(MonoObject* instance);
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static void internal_SetVolume(float volume);
-		static float internal_GetVolume();
-		static void internal_SetActiveDevice(ScriptAudioDevice* device);
-		static MonoObject* internal_GetActiveDevice();
-		static MonoObject* internal_GetDefaultDevice();
-		static MonoArray* internal_GetAllDevices();
-	};
-
-	/** @} */
-}

+ 0 - 44
Source/SBansheeEngine/Include/BsScriptAudioClip.h

@@ -1,44 +0,0 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptResource.h"
-#include "BsAudioClip.h"
-
-namespace bs
-{
-	/** @addtogroup ScriptInteropEngine
-	 *  @{
-	 */
-
-	/**	Interop class between C++ & CLR for AudioClip. */
-	class BS_SCR_BE_EXPORT ScriptAudioClip : public TScriptResource<ScriptAudioClip, AudioClip>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "AudioClip")
-
-		/**	Creates an empty, uninitialized managed instance of the resource interop object. */
-		static MonoObject* createInstance();
-
-	private:
-		friend class ScriptResourceManager;
-		friend class BuiltinResourceTypes;
-
-		ScriptAudioClip(MonoObject* instance, const HAudioClip& audioClip);
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static UINT32 internal_GetBitDepth(ScriptAudioClip* thisPtr);
-		static UINT32 internal_GetSampleRate(ScriptAudioClip* thisPtr);
-		static UINT32 internal_GetNumChannels(ScriptAudioClip* thisPtr);
-		static AudioFormat internal_GetAudioFormat(ScriptAudioClip* thisPtr);
-		static AudioReadMode internal_GetReadMode(ScriptAudioClip* thisPtr);
-		static UINT32 internal_GetNumSamples(ScriptAudioClip* thisPtr);
-		static float internal_GetDuration(ScriptAudioClip* thisPtr);
-		static bool internal_GetIs3D(ScriptAudioClip* thisPtr);
-	};
-
-	/** @} */
-}

+ 0 - 38
Source/SBansheeEngine/Include/BsScriptAudioListener.h

@@ -1,38 +0,0 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptObject.h"
-
-namespace bs
-{
-	/** @addtogroup ScriptInteropEngine
-	 *  @{
-	 */
-
-	/** Interop class between C++ & CLR for AudioListener. */
-	class BS_SCR_BE_EXPORT ScriptAudioListener : public ScriptObject<ScriptAudioListener>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "NativeAudioListener")
-
-	private:
-		ScriptAudioListener(MonoObject* instance, const SPtr<AudioListener>& listener);
-
-		SPtr<AudioListener> mListener;
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static void internal_CreateInstance(MonoObject* instance);
-		static void internal_Destroy(ScriptAudioListener* thisPtr);
-
-		static void internal_SetPosition(ScriptAudioListener* thisPtr, Vector3* position);
-		static void internal_SetDirection(ScriptAudioListener* thisPtr, Vector3* direction);
-		static void internal_SetUp(ScriptAudioListener* thisPtr, Vector3* up);
-		static void internal_SetVelocity(ScriptAudioListener* thisPtr, Vector3* velocity);
-	};
-
-	/** @} */
-}

+ 0 - 49
Source/SBansheeEngine/Include/BsScriptAudioSource.h

@@ -1,49 +0,0 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptObject.h"
-
-namespace bs
-{
-	/** @addtogroup ScriptInteropEngine
-	 *  @{
-	 */
-
-	/** Interop class between C++ & CLR for AudioSource. */
-	class BS_SCR_BE_EXPORT ScriptAudioSource : public ScriptObject<ScriptAudioSource>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "NativeAudioSource")
-
-	private:
-		ScriptAudioSource(MonoObject* instance, const SPtr<AudioSource>& source);
-
-		SPtr<AudioSource> mSource;
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static void internal_CreateInstance(MonoObject* instance);
-		static void internal_Destroy(ScriptAudioSource* thisPtr);
-
-		static void internal_SetPosition(ScriptAudioSource* thisPtr, Vector3* position);
-		static void internal_SetVelocity(ScriptAudioSource* thisPtr, Vector3* velocity);
-		static void internal_SetClip(ScriptAudioSource* thisPtr, ScriptAudioClip* clip);
-		static void internal_SetVolume(ScriptAudioSource* thisPtr, float volume);
-		static void internal_SetPitch(ScriptAudioSource* thisPtr, float pitch);
-		static void internal_SetIsLooping(ScriptAudioSource* thisPtr, bool loop);
-		static void internal_SetPriority(ScriptAudioSource* thisPtr, UINT32 priority);
-		static void internal_SetMinDistance(ScriptAudioSource* thisPtr, float distance);
-		static void internal_SetAttenuation(ScriptAudioSource* thisPtr, float attenuation);
-		static void internal_SetTime(ScriptAudioSource* thisPtr, float position);
-		static float internal_GetTime(ScriptAudioSource* thisPtr);
-		static void internal_Play(ScriptAudioSource* thisPtr);
-		static void internal_Pause(ScriptAudioSource* thisPtr);
-		static void internal_Stop(ScriptAudioSource* thisPtr);
-		static UINT32 internal_GetState(ScriptAudioSource* thisPtr);
-	};
-
-	/** @} */
-}

+ 1 - 1
Source/SBansheeEngine/Source/BsScriptAssemblyManager.cpp

@@ -43,13 +43,13 @@
 #include "BsScriptPrefab.h"
 #include "BsScriptPrefab.h"
 #include "BsScriptStringTable.h"
 #include "BsScriptStringTable.h"
 #include "BsScriptGUISkin.h"
 #include "BsScriptGUISkin.h"
-#include "BsScriptAudioClip.h"
 #include "BsBuiltinResourceLookup.h"
 #include "BsBuiltinResourceLookup.h"
 
 
 #include "BsScriptMesh.generated.h"
 #include "BsScriptMesh.generated.h"
 #include "BsScriptPhysicsMesh.generated.h"
 #include "BsScriptPhysicsMesh.generated.h"
 #include "BsScriptPhysicsMaterial.generated.h"
 #include "BsScriptPhysicsMaterial.generated.h"
 #include "BsScriptAnimationClip.generated.h"
 #include "BsScriptAnimationClip.generated.h"
+#include "BsScriptAudioClip.generated.h"
 
 
 namespace bs
 namespace bs
 {
 {

+ 0 - 82
Source/SBansheeEngine/Source/BsScriptAudio.cpp

@@ -1,82 +0,0 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#include "BsScriptAudio.h"
-#include "BsMonoMethod.h"
-#include "BsMonoUtil.h"
-
-namespace bs
-{
-	ScriptAudioDevice::ScriptAudioDevice(MonoObject* instance, const AudioDevice& device)
-		:ScriptObject(instance), mDevice(device)
-	{ }
-
-	void ScriptAudioDevice::initRuntimeData()
-	{
-		metaData.scriptClass->addInternalCall("Internal_GetName", &ScriptAudioDevice::internal_GetName);
-	}
-
-	MonoObject* ScriptAudioDevice::create(const AudioDevice& device)
-	{
-		MonoObject* instance = metaData.scriptClass->createInstance();
-
-		new (bs_alloc<ScriptAudioDevice>()) ScriptAudioDevice(instance, device);
-		return instance;
-	}
-
-	MonoString* ScriptAudioDevice::internal_GetName(ScriptAudioDevice* thisPtr)
-	{
-		return MonoUtil::wstringToMono(thisPtr->getDevice().name);
-	}
-
-	ScriptAudio::ScriptAudio(MonoObject* instance)
-		:ScriptObject(instance)
-	{ }
-
-	void ScriptAudio::initRuntimeData()
-	{
-		metaData.scriptClass->addInternalCall("Internal_SetVolume", &ScriptAudio::internal_SetVolume);
-		metaData.scriptClass->addInternalCall("Internal_GetVolume", &ScriptAudio::internal_GetVolume);
-		metaData.scriptClass->addInternalCall("Internal_SetActiveDevice", &ScriptAudio::internal_SetActiveDevice);
-		metaData.scriptClass->addInternalCall("Internal_GetActiveDevice", &ScriptAudio::internal_GetActiveDevice);
-		metaData.scriptClass->addInternalCall("Internal_GetDefaultDevice", &ScriptAudio::internal_GetDefaultDevice);
-		metaData.scriptClass->addInternalCall("Internal_GetAllDevices", &ScriptAudio::internal_GetAllDevices);
-	}
-
-	void ScriptAudio::internal_SetVolume(float volume)
-	{
-		gAudio().setVolume(volume);
-	}
-
-	float ScriptAudio::internal_GetVolume()
-	{
-		return gAudio().getVolume();
-	}
-
-	void ScriptAudio::internal_SetActiveDevice(ScriptAudioDevice* device)
-	{
-		gAudio().setActiveDevice(device->getDevice());
-	}
-
-	MonoObject* ScriptAudio::internal_GetActiveDevice()
-	{
-		return ScriptAudioDevice::create(gAudio().getActiveDevice());
-	}
-
-	MonoObject* ScriptAudio::internal_GetDefaultDevice()
-	{
-		return ScriptAudioDevice::create(gAudio().getDefaultDevice());
-	}
-
-	MonoArray* ScriptAudio::internal_GetAllDevices()
-	{
-		const Vector<AudioDevice>& devices = gAudio().getAllDevices();
-
-		UINT32 numDevices = (UINT32)devices.size();
-		ScriptArray scriptArray = ScriptArray::create<ScriptAudioDevice>(numDevices);
-
-		for (UINT32 i = 0; i < numDevices; i++)
-			scriptArray.set(i, ScriptAudioDevice::create(devices[i]));
-
-		return scriptArray.getInternal();
-	}
-}

+ 0 - 88
Source/SBansheeEngine/Source/BsScriptAudioClip.cpp

@@ -1,88 +0,0 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#include "BsScriptAudioClip.h"
-#include "BsScriptResourceManager.h"
-#include "BsScriptMeta.h"
-#include "BsMonoClass.h"
-
-namespace bs
-{
-	ScriptAudioClip::ScriptAudioClip(MonoObject* instance, const HAudioClip& audioClip)
-		:TScriptResource(instance, audioClip)
-	{
-
-	}
-
-	void ScriptAudioClip::initRuntimeData()
-	{
-		metaData.scriptClass->addInternalCall("Internal_GetBitDepth", &ScriptAudioClip::internal_GetBitDepth);
-		metaData.scriptClass->addInternalCall("Internal_GetSampleRate", &ScriptAudioClip::internal_GetSampleRate);
-		metaData.scriptClass->addInternalCall("Internal_GetNumChannels", &ScriptAudioClip::internal_GetNumChannels);
-		metaData.scriptClass->addInternalCall("Internal_GetAudioFormat", &ScriptAudioClip::internal_GetAudioFormat);
-		metaData.scriptClass->addInternalCall("Internal_GetReadMode", &ScriptAudioClip::internal_GetReadMode);
-		metaData.scriptClass->addInternalCall("Internal_GetNumSamples", &ScriptAudioClip::internal_GetNumSamples);
-		metaData.scriptClass->addInternalCall("Internal_GetDuration", &ScriptAudioClip::internal_GetDuration);
-		metaData.scriptClass->addInternalCall("Internal_GetIs3D", &ScriptAudioClip::internal_GetIs3D);
-	}
-
-	UINT32 ScriptAudioClip::internal_GetBitDepth(ScriptAudioClip* thisPtr)
-	{
-		HAudioClip audioClip = thisPtr->getHandle();
-
-		return audioClip->getBitDepth();
-	}
-
-	UINT32 ScriptAudioClip::internal_GetSampleRate(ScriptAudioClip* thisPtr)
-	{
-		HAudioClip audioClip = thisPtr->getHandle();
-
-		return audioClip->getFrequency();
-	}
-
-	UINT32 ScriptAudioClip::internal_GetNumChannels(ScriptAudioClip* thisPtr)
-	{
-		HAudioClip audioClip = thisPtr->getHandle();
-
-		return audioClip->getNumChannels();
-	}
-
-	AudioFormat ScriptAudioClip::internal_GetAudioFormat(ScriptAudioClip* thisPtr)
-	{
-		HAudioClip audioClip = thisPtr->getHandle();
-
-		return audioClip->getFormat();
-	}
-
-	AudioReadMode ScriptAudioClip::internal_GetReadMode(ScriptAudioClip* thisPtr)
-	{
-		HAudioClip audioClip = thisPtr->getHandle();
-
-		return audioClip->getReadMode();
-	}
-
-	UINT32 ScriptAudioClip::internal_GetNumSamples(ScriptAudioClip* thisPtr)
-	{
-		HAudioClip audioClip = thisPtr->getHandle();
-
-		return audioClip->getNumSamples();
-	}
-
-	float ScriptAudioClip::internal_GetDuration(ScriptAudioClip* thisPtr)
-	{
-		HAudioClip audioClip = thisPtr->getHandle();
-
-		return audioClip->getLength();
-	}
-
-	bool ScriptAudioClip::internal_GetIs3D(ScriptAudioClip* thisPtr)
-	{
-		HAudioClip audioClip = thisPtr->getHandle();
-
-		return audioClip->is3D();
-	}
-
-	MonoObject* ScriptAudioClip::createInstance()
-	{
-		return metaData.scriptClass->createInstance();
-	}
-}

+ 0 - 57
Source/SBansheeEngine/Source/BsScriptAudioListener.cpp

@@ -1,57 +0,0 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#include "BsScriptAudioListener.h"
-#include "BsMonoUtil.h"
-#include "BsMonoClass.h"
-#include "BsMonoMethod.h"
-#include "BsAudioListener.h"
-
-using namespace std::placeholders;
-
-namespace bs
-{
-	ScriptAudioListener::ScriptAudioListener(MonoObject* instance, const SPtr<AudioListener>& listener)
-		:ScriptObject(instance), mListener(listener)
-	{ }
-
-	void ScriptAudioListener::initRuntimeData()
-	{
-		metaData.scriptClass->addInternalCall("Internal_CreateInstance", &ScriptAudioListener::internal_CreateInstance);
-		metaData.scriptClass->addInternalCall("Internal_Destroy", &ScriptAudioListener::internal_Destroy);
-		metaData.scriptClass->addInternalCall("Internal_SetPosition", &ScriptAudioListener::internal_SetPosition);
-		metaData.scriptClass->addInternalCall("Internal_SetDirection", &ScriptAudioListener::internal_SetDirection);
-		metaData.scriptClass->addInternalCall("Internal_SetUp", &ScriptAudioListener::internal_SetUp);
-		metaData.scriptClass->addInternalCall("Internal_SetVelocity", &ScriptAudioListener::internal_SetVelocity);
-	}
-
-	void ScriptAudioListener::internal_CreateInstance(MonoObject* instance)
-	{
-		SPtr<AudioListener> listener = AudioListener::create();
-		new (bs_alloc<ScriptAudioListener>()) ScriptAudioListener(instance, listener);
-	}
-
-	void ScriptAudioListener::internal_Destroy(ScriptAudioListener* thisPtr)
-	{
-		thisPtr->mListener = nullptr;
-	}
-
-	void ScriptAudioListener::internal_SetPosition(ScriptAudioListener* thisPtr, Vector3* position)
-	{
-		thisPtr->mListener->setPosition(*position);
-	}
-
-	void ScriptAudioListener::internal_SetDirection(ScriptAudioListener* thisPtr, Vector3* direction)
-	{
-		thisPtr->mListener->setDirection(*direction);
-	}
-
-	void ScriptAudioListener::internal_SetUp(ScriptAudioListener* thisPtr, Vector3* up)
-	{
-		thisPtr->mListener->setUp(*up);
-	}
-
-	void ScriptAudioListener::internal_SetVelocity(ScriptAudioListener* thisPtr, Vector3* velocity)
-	{
-		thisPtr->mListener->setVelocity(*velocity);
-	}
-}

+ 0 - 128
Source/SBansheeEngine/Source/BsScriptAudioSource.cpp

@@ -1,128 +0,0 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#include "BsScriptAudioSource.h"
-#include "BsMonoUtil.h"
-#include "BsMonoClass.h"
-#include "BsMonoMethod.h"
-#include "BsAudioSource.h"
-#include "BsScriptAudioClip.h"
-
-using namespace std::placeholders;
-
-namespace bs
-{
-	ScriptAudioSource::ScriptAudioSource(MonoObject* instance, const SPtr<AudioSource>& source)
-		:ScriptObject(instance), mSource(source)
-	{ }
-
-	void ScriptAudioSource::initRuntimeData()
-	{
-		metaData.scriptClass->addInternalCall("Internal_CreateInstance", &ScriptAudioSource::internal_CreateInstance);
-		metaData.scriptClass->addInternalCall("Internal_Destroy", &ScriptAudioSource::internal_Destroy);
-		metaData.scriptClass->addInternalCall("Internal_SetPosition", &ScriptAudioSource::internal_SetPosition);
-		metaData.scriptClass->addInternalCall("Internal_SetVelocity", &ScriptAudioSource::internal_SetVelocity);
-		metaData.scriptClass->addInternalCall("Internal_SetClip", &ScriptAudioSource::internal_SetClip);
-		metaData.scriptClass->addInternalCall("Internal_SetVolume", &ScriptAudioSource::internal_SetVolume);
-		metaData.scriptClass->addInternalCall("Internal_SetPitch", &ScriptAudioSource::internal_SetPitch);
-		metaData.scriptClass->addInternalCall("Internal_SetIsLooping", &ScriptAudioSource::internal_SetIsLooping);
-		metaData.scriptClass->addInternalCall("Internal_SetPriority", &ScriptAudioSource::internal_SetPriority);
-		metaData.scriptClass->addInternalCall("Internal_SetMinDistance", &ScriptAudioSource::internal_SetMinDistance);
-		metaData.scriptClass->addInternalCall("Internal_SetAttenuation", &ScriptAudioSource::internal_SetAttenuation);
-		metaData.scriptClass->addInternalCall("Internal_Play", &ScriptAudioSource::internal_Play);
-		metaData.scriptClass->addInternalCall("Internal_Pause", &ScriptAudioSource::internal_Pause);
-		metaData.scriptClass->addInternalCall("Internal_Stop", &ScriptAudioSource::internal_Stop);
-		metaData.scriptClass->addInternalCall("Internal_SetTime", &ScriptAudioSource::internal_SetTime);
-		metaData.scriptClass->addInternalCall("Internal_GetTime", &ScriptAudioSource::internal_GetTime);
-		metaData.scriptClass->addInternalCall("Internal_GetState", &ScriptAudioSource::internal_GetState);
-	}
-
-	void ScriptAudioSource::internal_CreateInstance(MonoObject* instance)
-	{
-		SPtr<AudioSource> source = AudioSource::create();
-		new (bs_alloc<ScriptAudioSource>()) ScriptAudioSource(instance, source);
-	}
-
-	void ScriptAudioSource::internal_Destroy(ScriptAudioSource* thisPtr)
-	{
-		thisPtr->mSource = nullptr;
-	}
-
-	void ScriptAudioSource::internal_SetPosition(ScriptAudioSource* thisPtr, Vector3* position)
-	{
-		thisPtr->mSource->setPosition(*position);
-	}
-
-	void ScriptAudioSource::internal_SetVelocity(ScriptAudioSource* thisPtr, Vector3* velocity)
-	{
-		thisPtr->mSource->setVelocity(*velocity);
-	}
-
-	void ScriptAudioSource::internal_SetClip(ScriptAudioSource* thisPtr, ScriptAudioClip* clip)
-	{
-		HAudioClip audioClip;
-		if (clip != nullptr)
-			audioClip = clip->getHandle();
-
-		thisPtr->mSource->setClip(audioClip);
-	}
-
-	void ScriptAudioSource::internal_SetVolume(ScriptAudioSource* thisPtr, float volume)
-	{
-		thisPtr->mSource->setVolume(volume);
-	}
-
-	void ScriptAudioSource::internal_SetPitch(ScriptAudioSource* thisPtr, float pitch)
-	{
-		thisPtr->mSource->setPitch(pitch);
-	}
-
-	void ScriptAudioSource::internal_SetIsLooping(ScriptAudioSource* thisPtr, bool loop)
-	{
-		thisPtr->mSource->setIsLooping(loop);
-	}
-
-	void ScriptAudioSource::internal_SetPriority(ScriptAudioSource* thisPtr, UINT32 priority)
-	{
-		thisPtr->mSource->setPriority(priority);
-	}
-
-	void ScriptAudioSource::internal_SetMinDistance(ScriptAudioSource* thisPtr, float distance)
-	{
-		thisPtr->mSource->setMinDistance(distance);
-	}
-
-	void ScriptAudioSource::internal_SetAttenuation(ScriptAudioSource* thisPtr, float attenuation)
-	{
-		thisPtr->mSource->setAttenuation(attenuation);
-	}
-
-	void ScriptAudioSource::internal_Play(ScriptAudioSource* thisPtr)
-	{
-		thisPtr->mSource->play();
-	}
-
-	void ScriptAudioSource::internal_Pause(ScriptAudioSource* thisPtr)
-	{
-		thisPtr->mSource->pause();
-	}
-
-	void ScriptAudioSource::internal_Stop(ScriptAudioSource* thisPtr)
-	{
-		thisPtr->mSource->stop();
-	}
-
-	void ScriptAudioSource::internal_SetTime(ScriptAudioSource* thisPtr, float position)
-	{
-		thisPtr->mSource->setTime(position);
-	}
-
-	float ScriptAudioSource::internal_GetTime(ScriptAudioSource* thisPtr)
-	{
-		return thisPtr->mSource->getTime();
-	}
-
-	UINT32 ScriptAudioSource::internal_GetState(ScriptAudioSource* thisPtr)
-	{
-		return (UINT32)thisPtr->mSource->getState();
-	}
-}