37 lines
733 B
C#
37 lines
733 B
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
using System.Text;
|
|||
|
using System.Threading.Tasks;
|
|||
|
using Windows.Media.Playback;
|
|||
|
|
|||
|
namespace Audio_Router
|
|||
|
{
|
|||
|
class AudioPlayback
|
|||
|
{
|
|||
|
public MediaPlayer Player { get; private set; }
|
|||
|
|
|||
|
|
|||
|
static AudioPlayback instance;
|
|||
|
public static AudioPlayback Instance
|
|||
|
{
|
|||
|
get
|
|||
|
{
|
|||
|
if (instance is null)
|
|||
|
{
|
|||
|
instance = new AudioPlayback();
|
|||
|
}
|
|||
|
return instance;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
private AudioPlayback()
|
|||
|
{
|
|||
|
Player = new MediaPlayer()
|
|||
|
{
|
|||
|
AutoPlay = false
|
|||
|
};
|
|||
|
}
|
|||
|
}
|
|||
|
}
|