Permalink
Browse files

Android Changes to support my recent refactoring.

git-svn-id: https://xnatouch.svn.codeplex.com/svn@59464 ffd33b8c-2492-42e0-bdc5-587b920b7d6d
  • Loading branch information...
1 parent 951533e commit 33f11a28e98edb03b06a7535517af4c14940e234 SND\CartBlanche_cp committed Mar 17, 2011
Showing with 32 additions and 0 deletions.
  1. +16 −0 MonoGame.Framework/Android/Audio/Sound.cs
  2. +16 −0 MonoGame.Framework/Android/Media/Song.cs
@@ -105,7 +105,17 @@ public void Play()
Sound.Enqueue(_player.Start);
}
+
+ public void Pause()
+ {
+ if (this._player == null)
+ return;
+ lock (Sound.WorkItems) {
+ _player.Pause();
+ }
+ }
+
public void Stop()
{
if (this._player == null)
@@ -115,6 +125,12 @@ public void Stop()
_player.Stop();
}
}
+
+ public float Pan
+ {
+ get;
+ set;
+ }
internal bool IsPrepared { get; private set; }
@@ -98,6 +98,11 @@ internal void Play()
_sound.Play();
}
+ internal void Pause()
+ {
+ _sound.Pause();
+ }
+
internal void Stop()
{
_sound.Stop();
@@ -137,6 +142,17 @@ public TimeSpan Duration
return new TimeSpan(0, 0, _sound._player.Duration);
}
}
+
+ public TimeSpan Position
+ {
+ get
+ {
+ if (_sound == null)
+ return new TimeSpan(0);
+
+ return new TimeSpan(0, 0, _sound._player.CurrentPosition);
+ }
+ }
public bool IsProtected
{

0 comments on commit 33f11a2

Please sign in to comment.