├── CardReader
├── README.md
├── CardReader
│ ├── .vs
│ │ └── CardReader
│ │ │ └── v14
│ │ │ └── .suo
│ ├── CardReader
│ │ ├── Assets
│ │ │ ├── StoreLogo.png
│ │ │ ├── SplashScreen.scale-200.png
│ │ │ ├── LockScreenLogo.scale-200.png
│ │ │ ├── Square150x150Logo.scale-200.png
│ │ │ ├── Square44x44Logo.scale-200.png
│ │ │ ├── Wide310x150Logo.scale-200.png
│ │ │ └── Square44x44Logo.targetsize-24_altform-unplated.png
│ │ ├── CardReader_TemporaryKey.pfx
│ │ ├── ApplicationInsights.config
│ │ ├── RecognitionType.cs
│ │ ├── App.xaml
│ │ ├── CardReader.csproj.user
│ │ ├── project.json
│ │ ├── Properties
│ │ │ ├── AssemblyInfo.cs
│ │ │ └── Default.rd.xml
│ │ ├── Package.appxmanifest
│ │ ├── CardRecognizer.cs
│ │ ├── MainPage.xaml
│ │ ├── App.xaml.cs
│ │ └── CardReader.csproj
│ └── CardReader.sln
└── CardReader Exercises
│ ├── CardReader_Exercise 1.zip
│ ├── CardReader_Exercise 2.zip
│ ├── CardReader_Exercise 3.zip
│ ├── CardReader_Exercise 4.zip
│ ├── How To Build Card Reader.docx
│ ├── How To Build Card Reader.html
│ └── How To Build Card Reader_files
│ ├── image001.jpg
│ ├── image002.jpg
│ ├── image003.png
│ ├── image004.png
│ ├── image005.png
│ ├── image006.jpg
│ ├── image007.jpg
│ ├── image008.png
│ ├── image009.jpg
│ └── image010.png
├── MusicSync
├── MusicSync Exercises
│ ├── MusicServer_Exercise 1.zip
│ ├── MusicServer_Exercise 2.zip
│ ├── MusicServer_Exercise 3.zip
│ ├── MusicServer_Exercise 4.zip
│ ├── MusicServer_Exercise 5.zip
│ ├── MusicServer_Exercise 6.zip
│ ├── How To Build Music Sync.docx
│ ├── How To Build Music Sync.html
│ └── How To Build Music Sync_files
│ │ ├── image001.jpg
│ │ ├── image002.png
│ │ ├── image003.png
│ │ ├── image004.jpg
│ │ ├── image005.jpg
│ │ ├── image006.jpg
│ │ ├── image007.jpg
│ │ ├── image008.jpg
│ │ ├── image009.jpg
│ │ └── image010.png
├── MusicSync
│ └── MusicServer
│ │ ├── MusicServer
│ │ ├── Assets
│ │ │ ├── StoreLogo.png
│ │ │ ├── SplashScreen.scale-200.png
│ │ │ ├── LockScreenLogo.scale-200.png
│ │ │ ├── Square44x44Logo.scale-200.png
│ │ │ ├── Wide310x150Logo.scale-200.png
│ │ │ ├── Square150x150Logo.scale-200.png
│ │ │ └── Square44x44Logo.targetsize-24_altform-unplated.png
│ │ ├── App.xaml
│ │ ├── project.json
│ │ ├── Speaker.cs
│ │ ├── Properties
│ │ │ ├── AssemblyInfo.cs
│ │ │ └── Default.rd.xml
│ │ ├── Package.appxmanifest
│ │ ├── MainPage.xaml
│ │ ├── App.xaml.cs
│ │ ├── MainPage.xaml.cs
│ │ ├── MusicServer.csproj
│ │ └── Publisher.cs
│ │ ├── VirtualSpeaker
│ │ ├── Assets
│ │ │ ├── StoreLogo.png
│ │ │ ├── SplashScreen.scale-200.png
│ │ │ ├── LockScreenLogo.scale-200.png
│ │ │ ├── Square44x44Logo.scale-200.png
│ │ │ ├── Wide310x150Logo.scale-200.png
│ │ │ ├── Square150x150Logo.scale-200.png
│ │ │ └── Square44x44Logo.targetsize-24_altform-unplated.png
│ │ ├── App.xaml
│ │ ├── project.json
│ │ ├── Properties
│ │ │ ├── AssemblyInfo.cs
│ │ │ └── Default.rd.xml
│ │ ├── MainPage.xaml
│ │ ├── MainPage.xaml.cs
│ │ ├── Package.appxmanifest
│ │ ├── App.xaml.cs
│ │ └── VirtualSpeaker.csproj
│ │ ├── MusicSubscriber
│ │ ├── MessageType.cs
│ │ ├── project.json
│ │ ├── Properties
│ │ │ └── AssemblyInfo.cs
│ │ ├── MusicSubscriber.csproj
│ │ └── Subscriber.cs
│ │ └── MusicServer.sln
└── README.md
├── FaceTheremin
├── FaceTheremin
│ ├── FaceTheremin
│ │ ├── Assets
│ │ │ ├── drum_1_1.mp3
│ │ │ ├── drum_1_2.mp3
│ │ │ ├── drum_1_3.mp3
│ │ │ ├── drum_1_4.mp3
│ │ │ ├── drum_1_5.mp3
│ │ │ ├── drum_1_6.mp3
│ │ │ ├── drum_1_7.mp3
│ │ │ ├── drum_1_8.mp3
│ │ │ ├── drum_2_1.mp3
│ │ │ ├── drum_2_2.mp3
│ │ │ ├── drum_2_3.mp3
│ │ │ ├── drum_2_4.mp3
│ │ │ ├── drum_2_5.mp3
│ │ │ ├── drum_2_6.mp3
│ │ │ ├── drum_2_7.mp3
│ │ │ ├── drum_2_8.mp3
│ │ │ ├── snd_1_1.mp3
│ │ │ ├── snd_1_2.mp3
│ │ │ ├── snd_1_3.mp3
│ │ │ ├── snd_1_4.mp3
│ │ │ ├── snd_1_5.mp3
│ │ │ ├── snd_1_6.mp3
│ │ │ ├── snd_1_7.mp3
│ │ │ ├── snd_1_8.mp3
│ │ │ ├── snd_2_1.mp3
│ │ │ ├── snd_2_2.mp3
│ │ │ ├── snd_2_3.mp3
│ │ │ ├── snd_2_4.mp3
│ │ │ ├── snd_2_5.mp3
│ │ │ ├── snd_2_6.mp3
│ │ │ ├── snd_2_7.mp3
│ │ │ ├── snd_2_8.mp3
│ │ │ ├── StoreLogo.png
│ │ │ ├── synth_1_1.mp3
│ │ │ ├── synth_1_2.mp3
│ │ │ ├── synth_1_3.mp3
│ │ │ ├── synth_1_4.mp3
│ │ │ ├── synth_1_5.mp3
│ │ │ ├── synth_1_6.mp3
│ │ │ ├── synth_1_7.mp3
│ │ │ ├── synth_1_8.mp3
│ │ │ ├── synth_2_1.mp3
│ │ │ ├── synth_2_2.mp3
│ │ │ ├── synth_2_3.mp3
│ │ │ ├── synth_2_4.mp3
│ │ │ ├── synth_2_5.mp3
│ │ │ ├── synth_2_6.mp3
│ │ │ ├── synth_2_7.mp3
│ │ │ ├── synth_2_8.mp3
│ │ │ ├── SplashScreen.scale-200.png
│ │ │ ├── LockScreenLogo.scale-200.png
│ │ │ ├── Square44x44Logo.scale-200.png
│ │ │ ├── Wide310x150Logo.scale-200.png
│ │ │ ├── Square150x150Logo.scale-200.png
│ │ │ └── Square44x44Logo.targetsize-24_altform-unplated.png
│ │ ├── AssetsHolidaySpecial
│ │ │ ├── snd_1_1.mp3
│ │ │ ├── snd_1_2.mp3
│ │ │ ├── snd_1_3.mp3
│ │ │ ├── snd_1_4.mp3
│ │ │ ├── snd_1_5.mp3
│ │ │ ├── snd_1_6.mp3
│ │ │ ├── snd_1_7.mp3
│ │ │ ├── snd_1_8.mp3
│ │ │ ├── snd_2_1.mp3
│ │ │ ├── snd_2_2.mp3
│ │ │ ├── snd_2_3.mp3
│ │ │ ├── snd_2_4.mp3
│ │ │ ├── snd_2_5.mp3
│ │ │ ├── snd_2_6.mp3
│ │ │ ├── snd_2_7.mp3
│ │ │ ├── snd_2_8.mp3
│ │ │ ├── drum_1_1.mp3
│ │ │ ├── drum_1_2.mp3
│ │ │ ├── drum_1_3.mp3
│ │ │ ├── drum_1_4.mp3
│ │ │ ├── drum_1_5.mp3
│ │ │ ├── drum_1_6.mp3
│ │ │ ├── drum_1_7.mp3
│ │ │ ├── drum_1_8.mp3
│ │ │ ├── drum_2_1.mp3
│ │ │ ├── drum_2_2.mp3
│ │ │ ├── drum_2_3.mp3
│ │ │ ├── drum_2_4.mp3
│ │ │ ├── drum_2_5.mp3
│ │ │ ├── drum_2_6.mp3
│ │ │ ├── drum_2_7.mp3
│ │ │ ├── drum_2_8.mp3
│ │ │ ├── synth_1_1.mp3
│ │ │ ├── synth_1_2.mp3
│ │ │ ├── synth_1_3.mp3
│ │ │ ├── synth_1_4.mp3
│ │ │ ├── synth_1_5.mp3
│ │ │ ├── synth_1_6.mp3
│ │ │ ├── synth_1_7.mp3
│ │ │ ├── synth_1_8.mp3
│ │ │ ├── synth_2_1.mp3
│ │ │ ├── synth_2_2.mp3
│ │ │ ├── synth_2_3.mp3
│ │ │ ├── synth_2_4.mp3
│ │ │ ├── synth_2_5.mp3
│ │ │ ├── synth_2_6.mp3
│ │ │ ├── synth_2_7.mp3
│ │ │ └── synth_2_8.mp3
│ │ ├── project.json
│ │ ├── Cell.cs
│ │ ├── App.xaml
│ │ ├── Properties
│ │ │ ├── AssemblyInfo.cs
│ │ │ └── Default.rd.xml
│ │ ├── Package.appxmanifest
│ │ ├── MainPage.xaml
│ │ ├── App.xaml.cs
│ │ ├── AudioMatrix.cs
│ │ ├── FaceMatrix.cs
│ │ ├── MainPage.xaml.cs
│ │ └── FaceTheremin.csproj
│ └── FaceTheremin.sln
├── FaceTheremin Exercises
│ └── Coding4Fun - FaceTheremin Exercises.docx
└── README.md
├── LICENSE
├── README.md
└── SECURITY.md
/CardReader/README.md:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/CardReader/CardReader/.vs/CardReader/v14/.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/CardReader/CardReader/.vs/CardReader/v14/.suo
--------------------------------------------------------------------------------
/CardReader/CardReader/CardReader/Assets/StoreLogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/CardReader/CardReader/CardReader/Assets/StoreLogo.png
--------------------------------------------------------------------------------
/MusicSync/MusicSync Exercises/MusicServer_Exercise 1.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/MusicSync/MusicSync Exercises/MusicServer_Exercise 1.zip
--------------------------------------------------------------------------------
/MusicSync/MusicSync Exercises/MusicServer_Exercise 2.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/MusicSync/MusicSync Exercises/MusicServer_Exercise 2.zip
--------------------------------------------------------------------------------
/MusicSync/MusicSync Exercises/MusicServer_Exercise 3.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/MusicSync/MusicSync Exercises/MusicServer_Exercise 3.zip
--------------------------------------------------------------------------------
/MusicSync/MusicSync Exercises/MusicServer_Exercise 4.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/MusicSync/MusicSync Exercises/MusicServer_Exercise 4.zip
--------------------------------------------------------------------------------
/MusicSync/MusicSync Exercises/MusicServer_Exercise 5.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/MusicSync/MusicSync Exercises/MusicServer_Exercise 5.zip
--------------------------------------------------------------------------------
/MusicSync/MusicSync Exercises/MusicServer_Exercise 6.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/MusicSync/MusicSync Exercises/MusicServer_Exercise 6.zip
--------------------------------------------------------------------------------
/CardReader/CardReader Exercises/CardReader_Exercise 1.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/CardReader/CardReader Exercises/CardReader_Exercise 1.zip
--------------------------------------------------------------------------------
/CardReader/CardReader Exercises/CardReader_Exercise 2.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/CardReader/CardReader Exercises/CardReader_Exercise 2.zip
--------------------------------------------------------------------------------
/CardReader/CardReader Exercises/CardReader_Exercise 3.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/CardReader/CardReader Exercises/CardReader_Exercise 3.zip
--------------------------------------------------------------------------------
/CardReader/CardReader Exercises/CardReader_Exercise 4.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/CardReader/CardReader Exercises/CardReader_Exercise 4.zip
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/drum_1_1.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/drum_1_1.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/drum_1_2.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/drum_1_2.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/drum_1_3.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/drum_1_3.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/drum_1_4.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/drum_1_4.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/drum_1_5.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/drum_1_5.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/drum_1_6.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/drum_1_6.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/drum_1_7.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/drum_1_7.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/drum_1_8.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/drum_1_8.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/drum_2_1.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/drum_2_1.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/drum_2_2.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/drum_2_2.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/drum_2_3.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/drum_2_3.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/drum_2_4.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/drum_2_4.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/drum_2_5.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/drum_2_5.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/drum_2_6.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/drum_2_6.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/drum_2_7.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/drum_2_7.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/drum_2_8.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/drum_2_8.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/snd_1_1.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/snd_1_1.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/snd_1_2.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/snd_1_2.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/snd_1_3.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/snd_1_3.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/snd_1_4.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/snd_1_4.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/snd_1_5.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/snd_1_5.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/snd_1_6.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/snd_1_6.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/snd_1_7.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/snd_1_7.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/snd_1_8.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/snd_1_8.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/snd_2_1.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/snd_2_1.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/snd_2_2.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/snd_2_2.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/snd_2_3.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/snd_2_3.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/snd_2_4.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/snd_2_4.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/snd_2_5.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/snd_2_5.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/snd_2_6.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/snd_2_6.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/snd_2_7.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/snd_2_7.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/snd_2_8.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/snd_2_8.mp3
--------------------------------------------------------------------------------
/MusicSync/MusicSync Exercises/How To Build Music Sync.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/MusicSync/MusicSync Exercises/How To Build Music Sync.docx
--------------------------------------------------------------------------------
/MusicSync/MusicSync Exercises/How To Build Music Sync.html:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/MusicSync/MusicSync Exercises/How To Build Music Sync.html
--------------------------------------------------------------------------------
/CardReader/CardReader Exercises/How To Build Card Reader.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/CardReader/CardReader Exercises/How To Build Card Reader.docx
--------------------------------------------------------------------------------
/CardReader/CardReader Exercises/How To Build Card Reader.html:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/CardReader/CardReader Exercises/How To Build Card Reader.html
--------------------------------------------------------------------------------
/CardReader/CardReader/CardReader/CardReader_TemporaryKey.pfx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/CardReader/CardReader/CardReader/CardReader_TemporaryKey.pfx
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/StoreLogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/StoreLogo.png
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/synth_1_1.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/synth_1_1.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/synth_1_2.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/synth_1_2.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/synth_1_3.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/synth_1_3.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/synth_1_4.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/synth_1_4.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/synth_1_5.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/synth_1_5.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/synth_1_6.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/synth_1_6.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/synth_1_7.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/synth_1_7.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/synth_1_8.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/synth_1_8.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/synth_2_1.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/synth_2_1.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/synth_2_2.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/synth_2_2.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/synth_2_3.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/synth_2_3.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/synth_2_4.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/synth_2_4.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/synth_2_5.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/synth_2_5.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/synth_2_6.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/synth_2_6.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/synth_2_7.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/synth_2_7.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/synth_2_8.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/synth_2_8.mp3
--------------------------------------------------------------------------------
/CardReader/CardReader/CardReader/Assets/SplashScreen.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/CardReader/CardReader/CardReader/Assets/SplashScreen.scale-200.png
--------------------------------------------------------------------------------
/MusicSync/MusicSync/MusicServer/MusicServer/Assets/StoreLogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/MusicSync/MusicSync/MusicServer/MusicServer/Assets/StoreLogo.png
--------------------------------------------------------------------------------
/CardReader/CardReader/CardReader/Assets/LockScreenLogo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/CardReader/CardReader/CardReader/Assets/LockScreenLogo.scale-200.png
--------------------------------------------------------------------------------
/MusicSync/MusicSync/MusicServer/VirtualSpeaker/Assets/StoreLogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/MusicSync/MusicSync/MusicServer/VirtualSpeaker/Assets/StoreLogo.png
--------------------------------------------------------------------------------
/CardReader/CardReader/CardReader/Assets/Square150x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/CardReader/CardReader/CardReader/Assets/Square150x150Logo.scale-200.png
--------------------------------------------------------------------------------
/CardReader/CardReader/CardReader/Assets/Square44x44Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/CardReader/CardReader/CardReader/Assets/Square44x44Logo.scale-200.png
--------------------------------------------------------------------------------
/CardReader/CardReader/CardReader/Assets/Wide310x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/CardReader/CardReader/CardReader/Assets/Wide310x150Logo.scale-200.png
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/snd_1_1.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/snd_1_1.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/snd_1_2.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/snd_1_2.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/snd_1_3.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/snd_1_3.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/snd_1_4.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/snd_1_4.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/snd_1_5.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/snd_1_5.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/snd_1_6.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/snd_1_6.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/snd_1_7.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/snd_1_7.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/snd_1_8.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/snd_1_8.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/snd_2_1.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/snd_2_1.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/snd_2_2.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/snd_2_2.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/snd_2_3.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/snd_2_3.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/snd_2_4.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/snd_2_4.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/snd_2_5.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/snd_2_5.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/snd_2_6.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/snd_2_6.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/snd_2_7.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/snd_2_7.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/snd_2_8.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/snd_2_8.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/SplashScreen.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/SplashScreen.scale-200.png
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/drum_1_1.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/drum_1_1.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/drum_1_2.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/drum_1_2.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/drum_1_3.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/drum_1_3.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/drum_1_4.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/drum_1_4.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/drum_1_5.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/drum_1_5.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/drum_1_6.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/drum_1_6.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/drum_1_7.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/drum_1_7.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/drum_1_8.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/drum_1_8.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/drum_2_1.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/drum_2_1.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/drum_2_2.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/drum_2_2.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/drum_2_3.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/drum_2_3.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/drum_2_4.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/drum_2_4.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/drum_2_5.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/drum_2_5.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/drum_2_6.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/drum_2_6.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/drum_2_7.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/drum_2_7.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/drum_2_8.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/drum_2_8.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/synth_1_1.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/synth_1_1.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/synth_1_2.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/synth_1_2.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/synth_1_3.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/synth_1_3.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/synth_1_4.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/synth_1_4.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/synth_1_5.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/synth_1_5.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/synth_1_6.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/synth_1_6.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/synth_1_7.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/synth_1_7.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/synth_1_8.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/synth_1_8.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/synth_2_1.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/synth_2_1.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/synth_2_2.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/synth_2_2.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/synth_2_3.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/synth_2_3.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/synth_2_4.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/synth_2_4.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/synth_2_5.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/synth_2_5.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/synth_2_6.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/synth_2_6.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/synth_2_7.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/synth_2_7.mp3
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/synth_2_8.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/AssetsHolidaySpecial/synth_2_8.mp3
--------------------------------------------------------------------------------
/MusicSync/MusicSync Exercises/How To Build Music Sync_files/image001.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/MusicSync/MusicSync Exercises/How To Build Music Sync_files/image001.jpg
--------------------------------------------------------------------------------
/MusicSync/MusicSync Exercises/How To Build Music Sync_files/image002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/MusicSync/MusicSync Exercises/How To Build Music Sync_files/image002.png
--------------------------------------------------------------------------------
/MusicSync/MusicSync Exercises/How To Build Music Sync_files/image003.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/MusicSync/MusicSync Exercises/How To Build Music Sync_files/image003.png
--------------------------------------------------------------------------------
/MusicSync/MusicSync Exercises/How To Build Music Sync_files/image004.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/MusicSync/MusicSync Exercises/How To Build Music Sync_files/image004.jpg
--------------------------------------------------------------------------------
/MusicSync/MusicSync Exercises/How To Build Music Sync_files/image005.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/MusicSync/MusicSync Exercises/How To Build Music Sync_files/image005.jpg
--------------------------------------------------------------------------------
/MusicSync/MusicSync Exercises/How To Build Music Sync_files/image006.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/MusicSync/MusicSync Exercises/How To Build Music Sync_files/image006.jpg
--------------------------------------------------------------------------------
/MusicSync/MusicSync Exercises/How To Build Music Sync_files/image007.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/MusicSync/MusicSync Exercises/How To Build Music Sync_files/image007.jpg
--------------------------------------------------------------------------------
/MusicSync/MusicSync Exercises/How To Build Music Sync_files/image008.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/MusicSync/MusicSync Exercises/How To Build Music Sync_files/image008.jpg
--------------------------------------------------------------------------------
/MusicSync/MusicSync Exercises/How To Build Music Sync_files/image009.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/MusicSync/MusicSync Exercises/How To Build Music Sync_files/image009.jpg
--------------------------------------------------------------------------------
/MusicSync/MusicSync Exercises/How To Build Music Sync_files/image010.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/MusicSync/MusicSync Exercises/How To Build Music Sync_files/image010.png
--------------------------------------------------------------------------------
/CardReader/CardReader Exercises/How To Build Card Reader_files/image001.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/CardReader/CardReader Exercises/How To Build Card Reader_files/image001.jpg
--------------------------------------------------------------------------------
/CardReader/CardReader Exercises/How To Build Card Reader_files/image002.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/CardReader/CardReader Exercises/How To Build Card Reader_files/image002.jpg
--------------------------------------------------------------------------------
/CardReader/CardReader Exercises/How To Build Card Reader_files/image003.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/CardReader/CardReader Exercises/How To Build Card Reader_files/image003.png
--------------------------------------------------------------------------------
/CardReader/CardReader Exercises/How To Build Card Reader_files/image004.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/CardReader/CardReader Exercises/How To Build Card Reader_files/image004.png
--------------------------------------------------------------------------------
/CardReader/CardReader Exercises/How To Build Card Reader_files/image005.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/CardReader/CardReader Exercises/How To Build Card Reader_files/image005.png
--------------------------------------------------------------------------------
/CardReader/CardReader Exercises/How To Build Card Reader_files/image006.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/CardReader/CardReader Exercises/How To Build Card Reader_files/image006.jpg
--------------------------------------------------------------------------------
/CardReader/CardReader Exercises/How To Build Card Reader_files/image007.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/CardReader/CardReader Exercises/How To Build Card Reader_files/image007.jpg
--------------------------------------------------------------------------------
/CardReader/CardReader Exercises/How To Build Card Reader_files/image008.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/CardReader/CardReader Exercises/How To Build Card Reader_files/image008.png
--------------------------------------------------------------------------------
/CardReader/CardReader Exercises/How To Build Card Reader_files/image009.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/CardReader/CardReader Exercises/How To Build Card Reader_files/image009.jpg
--------------------------------------------------------------------------------
/CardReader/CardReader Exercises/How To Build Card Reader_files/image010.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/CardReader/CardReader Exercises/How To Build Card Reader_files/image010.png
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin Exercises/Coding4Fun - FaceTheremin Exercises.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin Exercises/Coding4Fun - FaceTheremin Exercises.docx
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/LockScreenLogo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/LockScreenLogo.scale-200.png
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/Square44x44Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/Square44x44Logo.scale-200.png
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/Wide310x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/Wide310x150Logo.scale-200.png
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/Square150x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/Square150x150Logo.scale-200.png
--------------------------------------------------------------------------------
/MusicSync/MusicSync/MusicServer/MusicServer/Assets/SplashScreen.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/MusicSync/MusicSync/MusicServer/MusicServer/Assets/SplashScreen.scale-200.png
--------------------------------------------------------------------------------
/MusicSync/MusicSync/MusicServer/MusicServer/Assets/LockScreenLogo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/MusicSync/MusicSync/MusicServer/MusicServer/Assets/LockScreenLogo.scale-200.png
--------------------------------------------------------------------------------
/MusicSync/MusicSync/MusicServer/MusicServer/Assets/Square44x44Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/MusicSync/MusicSync/MusicServer/MusicServer/Assets/Square44x44Logo.scale-200.png
--------------------------------------------------------------------------------
/MusicSync/MusicSync/MusicServer/MusicServer/Assets/Wide310x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/MusicSync/MusicSync/MusicServer/MusicServer/Assets/Wide310x150Logo.scale-200.png
--------------------------------------------------------------------------------
/MusicSync/MusicSync/MusicServer/VirtualSpeaker/Assets/SplashScreen.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/MusicSync/MusicSync/MusicServer/VirtualSpeaker/Assets/SplashScreen.scale-200.png
--------------------------------------------------------------------------------
/MusicSync/MusicSync/MusicServer/MusicServer/Assets/Square150x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/MusicSync/MusicSync/MusicServer/MusicServer/Assets/Square150x150Logo.scale-200.png
--------------------------------------------------------------------------------
/MusicSync/MusicSync/MusicServer/VirtualSpeaker/Assets/LockScreenLogo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/MusicSync/MusicSync/MusicServer/VirtualSpeaker/Assets/LockScreenLogo.scale-200.png
--------------------------------------------------------------------------------
/MusicSync/MusicSync/MusicServer/VirtualSpeaker/Assets/Square44x44Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/MusicSync/MusicSync/MusicServer/VirtualSpeaker/Assets/Square44x44Logo.scale-200.png
--------------------------------------------------------------------------------
/MusicSync/MusicSync/MusicServer/VirtualSpeaker/Assets/Wide310x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/MusicSync/MusicSync/MusicServer/VirtualSpeaker/Assets/Wide310x150Logo.scale-200.png
--------------------------------------------------------------------------------
/MusicSync/MusicSync/MusicServer/VirtualSpeaker/Assets/Square150x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/MusicSync/MusicSync/MusicServer/VirtualSpeaker/Assets/Square150x150Logo.scale-200.png
--------------------------------------------------------------------------------
/CardReader/CardReader/CardReader/ApplicationInsights.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/CardReader/CardReader/CardReader/Assets/Square44x44Logo.targetsize-24_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/CardReader/CardReader/CardReader/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Assets/Square44x44Logo.targetsize-24_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/FaceTheremin/FaceTheremin/FaceTheremin/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
--------------------------------------------------------------------------------
/MusicSync/MusicSync/MusicServer/MusicServer/Assets/Square44x44Logo.targetsize-24_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/MusicSync/MusicSync/MusicServer/MusicServer/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
--------------------------------------------------------------------------------
/MusicSync/MusicSync/MusicServer/VirtualSpeaker/Assets/Square44x44Logo.targetsize-24_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/Coding4Fun/HEAD/MusicSync/MusicSync/MusicServer/VirtualSpeaker/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
--------------------------------------------------------------------------------
/CardReader/CardReader/CardReader/RecognitionType.cs:
--------------------------------------------------------------------------------
1 | namespace CardReader
2 | {
3 | public enum RecognitionType
4 | {
5 | Other,
6 | Email,
7 | WebPage,
8 | Name,
9 | PhoneNumber,
10 | Number
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/MusicSync/MusicSync/MusicServer/MusicSubscriber/MessageType.cs:
--------------------------------------------------------------------------------
1 | namespace MusicSubscriber
2 | {
3 | public enum MessageType
4 | {
5 | Unknown,
6 | Message,
7 | Media,
8 | Play,
9 | Stop,
10 | Ready
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/CardReader/CardReader/CardReader/App.xaml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/MusicSync/MusicSync/MusicServer/MusicServer/App.xaml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/MusicSync/MusicSync/MusicServer/VirtualSpeaker/App.xaml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/project.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0"
4 | },
5 | "frameworks": {
6 | "uap10.0": {}
7 | },
8 | "runtimes": {
9 | "win10-arm": {},
10 | "win10-arm-aot": {},
11 | "win10-x86": {},
12 | "win10-x86-aot": {},
13 | "win10-x64": {},
14 | "win10-x64-aot": {}
15 | }
16 | }
--------------------------------------------------------------------------------
/CardReader/CardReader/CardReader/CardReader.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 30F105C9-681E-420b-A277-7C086EAD8A4E
5 | true
6 |
7 |
--------------------------------------------------------------------------------
/MusicSync/MusicSync/MusicServer/MusicSubscriber/project.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0"
4 | },
5 | "frameworks": {
6 | "uap10.0": {}
7 | },
8 | "runtimes": {
9 | "win10-arm": {},
10 | "win10-arm-aot": {},
11 | "win10-x86": {},
12 | "win10-x86-aot": {},
13 | "win10-x64": {},
14 | "win10-x64-aot": {}
15 | }
16 | }
--------------------------------------------------------------------------------
/CardReader/CardReader/CardReader/project.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "Microsoft.ApplicationInsights": "1.0.0",
4 | "Microsoft.ApplicationInsights.PersistenceChannel": "1.0.0",
5 | "Microsoft.ApplicationInsights.WindowsApps": "1.0.0",
6 | "Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0"
7 | },
8 | "frameworks": {
9 | "uap10.0": {}
10 | },
11 | "runtimes": {
12 | "win10-arm": {},
13 | "win10-arm-aot": {},
14 | "win10-x86": {},
15 | "win10-x86-aot": {},
16 | "win10-x64": {},
17 | "win10-x64-aot": {}
18 | }
19 | }
--------------------------------------------------------------------------------
/MusicSync/MusicSync/MusicServer/MusicServer/project.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "Microsoft.ApplicationInsights": "1.0.0",
4 | "Microsoft.ApplicationInsights.PersistenceChannel": "1.0.0",
5 | "Microsoft.ApplicationInsights.WindowsApps": "1.0.0",
6 | "Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0"
7 | },
8 | "frameworks": {
9 | "uap10.0": {}
10 | },
11 | "runtimes": {
12 | "win10-arm": {},
13 | "win10-arm-aot": {},
14 | "win10-x86": {},
15 | "win10-x86-aot": {},
16 | "win10-x64": {},
17 | "win10-x64-aot": {}
18 | }
19 | }
--------------------------------------------------------------------------------
/MusicSync/MusicSync/MusicServer/VirtualSpeaker/project.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "Microsoft.ApplicationInsights": "1.0.0",
4 | "Microsoft.ApplicationInsights.PersistenceChannel": "1.0.0",
5 | "Microsoft.ApplicationInsights.WindowsApps": "1.0.0",
6 | "Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0"
7 | },
8 | "frameworks": {
9 | "uap10.0": {}
10 | },
11 | "runtimes": {
12 | "win10-arm": {},
13 | "win10-arm-aot": {},
14 | "win10-x86": {},
15 | "win10-x86-aot": {},
16 | "win10-x64": {},
17 | "win10-x64-aot": {}
18 | }
19 | }
--------------------------------------------------------------------------------
/MusicSync/MusicSync/MusicServer/MusicServer/Speaker.cs:
--------------------------------------------------------------------------------
1 | using Windows.Networking.Sockets;
2 |
3 | namespace MusicServer
4 | {
5 | ///
6 | /// Speaker class encapsulates the information on a
7 | /// virtual speaker
8 | ///
9 | public class Speaker
10 | {
11 | public string Name { get; set; }
12 | public string Address { get; set; }
13 | public string Status { get; set; }
14 | public StreamSocket Socket { get; set; }
15 |
16 | public override string ToString()
17 | {
18 | return string.Format("{0}:{1} {2}", Name, Address, Status);
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Cell.cs:
--------------------------------------------------------------------------------
1 | //*********************************************************
2 | //
3 | // Copyright (c) Microsoft. All rights reserved.
4 | // This code is licensed under the MIT License (MIT).
5 | // THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
6 | // ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
7 | // IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
8 | // PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
9 | //
10 | //*********************************************************
11 |
12 | namespace FaceTheremin
13 | {
14 | ///
15 | /// Simple coordinates structure
16 | ///
17 | public struct Cell
18 | {
19 | public int X { get; }
20 | public int Y { get; }
21 |
22 | public Cell(int x, int y)
23 | {
24 | X = x;
25 | Y = y;
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/App.xaml:
--------------------------------------------------------------------------------
1 |
13 |
14 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) Microsoft Corporation
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
23 |
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("FaceTheremin")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("FaceTheremin")]
13 | [assembly: AssemblyCopyright("Copyright © 2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Version information for an assembly consists of the following four values:
18 | //
19 | // Major Version
20 | // Minor Version
21 | // Build Number
22 | // Revision
23 | //
24 | // You can specify all the values or you can default the Build and Revision Numbers
25 | // by using the '*' as shown below:
26 | // [assembly: AssemblyVersion("1.0.*")]
27 | [assembly: AssemblyVersion("1.0.0.0")]
28 | [assembly: AssemblyFileVersion("1.0.0.0")]
29 | [assembly: ComVisible(false)]
--------------------------------------------------------------------------------
/CardReader/CardReader/CardReader/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("CardReader")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("CardReader")]
13 | [assembly: AssemblyCopyright("Copyright © 2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Version information for an assembly consists of the following four values:
18 | //
19 | // Major Version
20 | // Minor Version
21 | // Build Number
22 | // Revision
23 | //
24 | // You can specify all the values or you can default the Build and Revision Numbers
25 | // by using the '*' as shown below:
26 | // [assembly: AssemblyVersion("1.0.*")]
27 | [assembly: AssemblyVersion("1.0.0.0")]
28 | [assembly: AssemblyFileVersion("1.0.0.0")]
29 | [assembly: ComVisible(false)]
--------------------------------------------------------------------------------
/MusicSync/MusicSync/MusicServer/MusicServer/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("MusicServer")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("MusicServer")]
13 | [assembly: AssemblyCopyright("Copyright © 2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Version information for an assembly consists of the following four values:
18 | //
19 | // Major Version
20 | // Minor Version
21 | // Build Number
22 | // Revision
23 | //
24 | // You can specify all the values or you can default the Build and Revision Numbers
25 | // by using the '*' as shown below:
26 | // [assembly: AssemblyVersion("1.0.*")]
27 | [assembly: AssemblyVersion("1.0.0.0")]
28 | [assembly: AssemblyFileVersion("1.0.0.0")]
29 | [assembly: ComVisible(false)]
--------------------------------------------------------------------------------
/MusicSync/MusicSync/MusicServer/VirtualSpeaker/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("VirtualSpeaker")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("VirtualSpeaker")]
13 | [assembly: AssemblyCopyright("Copyright © 2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Version information for an assembly consists of the following four values:
18 | //
19 | // Major Version
20 | // Minor Version
21 | // Build Number
22 | // Revision
23 | //
24 | // You can specify all the values or you can default the Build and Revision Numbers
25 | // by using the '*' as shown below:
26 | // [assembly: AssemblyVersion("1.0.*")]
27 | [assembly: AssemblyVersion("1.0.0.0")]
28 | [assembly: AssemblyFileVersion("1.0.0.0")]
29 | [assembly: ComVisible(false)]
--------------------------------------------------------------------------------
/MusicSync/MusicSync/MusicServer/MusicSubscriber/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("MusicSubscriber")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("MusicSubscriber")]
13 | [assembly: AssemblyCopyright("Copyright © 2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Version information for an assembly consists of the following four values:
18 | //
19 | // Major Version
20 | // Minor Version
21 | // Build Number
22 | // Revision
23 | //
24 | // You can specify all the values or you can default the Build and Revision Numbers
25 | // by using the '*' as shown below:
26 | // [assembly: AssemblyVersion("1.0.*")]
27 | [assembly: AssemblyVersion("1.0.0.0")]
28 | [assembly: AssemblyFileVersion("1.0.0.0")]
29 | [assembly: ComVisible(false)]
--------------------------------------------------------------------------------
/MusicSync/README.md:
--------------------------------------------------------------------------------
1 | # MusicSync
2 | ## Overview:
3 | MusicSync is a music streaming application designed to play one track on many Windows 10 machines simultaneously. There are three components in this solution. The first is the Server, or Publisher, called MusicServer. The second is the Speaker, or Subscriber called VirtualSpeaker. The final component is a runtime component which contains the Subscriber logic. This final component will be referenced in both the Server and Speaker projects as both will act as a Subscriber.
4 |
5 | The MusicServer application contains both a Publisher and a Subscriber. It is a Subscriber to its Publisher in order to play music on the local host device. The VirtualSpeaker application only contains a Subscriber.
6 |
7 | ## Technical requirements:
8 | * Some experience with C# and XAML.
9 | * [Visual Studio 2015 and Windows developer tooling.](https://dev.windows.com/en-us/downloads)
10 | * Ensure you are using [Windows 10 or better.](https://www.microsoft.com/en-us/windows/windows-10-upgrade)
11 |
12 | ## Getting started:
13 | To use these samples, download the entire samples ZIP or clone the repository. If you download the ZIP, you can then unzip the entire archive and use the samples in Visual Studio 2015. An overview of the code can be found in the FaceTheremin exercises folder.
14 |
15 |
16 |
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Properties/Default.rd.xml:
--------------------------------------------------------------------------------
1 |
17 |
18 |
19 |
20 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/CardReader/CardReader/CardReader/Properties/Default.rd.xml:
--------------------------------------------------------------------------------
1 |
17 |
18 |
19 |
20 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/MusicSync/MusicSync/MusicServer/MusicServer/Properties/Default.rd.xml:
--------------------------------------------------------------------------------
1 |
17 |
18 |
19 |
20 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/MusicSync/MusicSync/MusicServer/VirtualSpeaker/Properties/Default.rd.xml:
--------------------------------------------------------------------------------
1 |
17 |
18 |
19 |
20 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/MusicSync/MusicSync/MusicServer/VirtualSpeaker/MainPage.xaml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/MusicSync/MusicSync/MusicServer/VirtualSpeaker/MainPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using MusicSubscriber;
2 | using System.Collections.Generic;
3 | using Windows.Networking;
4 | using Windows.Networking.Connectivity;
5 | using Windows.UI.Xaml;
6 | using Windows.UI.Xaml.Controls;
7 |
8 | namespace VirtualSpeaker
9 | {
10 | public sealed partial class MainPage : Page
11 | {
12 | private Subscriber _subscriber;
13 |
14 | public MainPage()
15 | {
16 | InitializeComponent();
17 | Loaded += MainPage_Loaded;
18 | }
19 |
20 | private void MainPage_Loaded(object sender, RoutedEventArgs e)
21 | {
22 | HostIPAddressTextBlock.Text = GetThisIPAddress();
23 | _subscriber = new Subscriber();
24 | }
25 |
26 | private void ConnectButton_Click(object sender, RoutedEventArgs e)
27 | {
28 | string host = HostNameTextBox.Text;
29 | string name = SpeakerNameTextBox.Text;
30 | _subscriber.ConnectAsync(host, name);
31 | }
32 |
33 | private string GetThisIPAddress()
34 | {
35 | string lastHostName = string.Empty;
36 | IReadOnlyList hosts = NetworkInformation.GetHostNames();
37 | foreach (HostName host in hosts)
38 | {
39 | // The last host name is always this computer.
40 | if (host.Type == HostNameType.Ipv4)
41 | {
42 | lastHostName = host.DisplayName;
43 | }
44 | }
45 |
46 | return lastHostName;
47 | }
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/Package.appxmanifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | FaceTheremin
7 | nmca
8 | Assets\StoreLogo.png
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Coding4Fun
2 | These samples are designed for exploring the lighter side of development. Our goal is pretty simple; create fun and entertaining code samples that feature the more interesting APIs available on Windows 10. You can expect a variety of projects that include complete, well-commented source code, provided under the MIT open-source license, and documentation on how to build the sample.
3 | Each sample will list what is required but the requirements for most are simple:
4 |
5 | - Ensure you are using the most up-to-date version of [Windows 10](https://www.microsoft.com/en-us/windows/windows-10-upgrade)
6 | - [Visual Studio 2015 and Windows developer tooling](https://dev.windows.com/en-us/downloads)
7 |
8 | If Windows 10 Mobile is required, the emulator or device can be used.
9 |
10 | ## Using the samples
11 | To download the entire Coding4Fun example tree, [download via the master.zip](https://github.com/Microsoft/Coding4Fun/archive/master.zip) or clone the repository.
12 |
13 | ## Deeper dive
14 | The [Building Apps for Windows blog](http://blogs.windows.com/buildingapps/) is a great spot for deep dives into Window API features along with up-to-date news and announcements. For information about the programming models, platforms, languages, and APIs demonstrated in these examples, please refer to the guidance, tutorials, and reference topics provided in the Windows 10 documentation available in the [Windows Developer Center.](https://dev.windows.com/) These samples are provided as-is in order to indicate or demonstrate the functionality of the programming models and feature APIs for Windows.
15 |
16 | Another great spot for samples is the [Universal Windows app samples on Github.](https://github.com/Microsoft/Windows-universal-samples)
17 |
--------------------------------------------------------------------------------
/MusicSync/MusicSync/MusicServer/MusicServer/Package.appxmanifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | MusicServer
7 | Chris
8 | Assets\StoreLogo.png
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/MusicSync/MusicSync/MusicServer/VirtualSpeaker/Package.appxmanifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | VirtualSpeaker
7 | Chris
8 | Assets\StoreLogo.png
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/CardReader/CardReader/CardReader/Package.appxmanifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | CardReader
7 | admin
8 | Assets\StoreLogo.png
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/MusicSync/MusicSync/MusicServer/MusicServer/MainPage.xaml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/FaceTheremin/README.md:
--------------------------------------------------------------------------------
1 | # FaceTheremin
2 | ## Overview
3 | A musical coding project that turns users into musical instruments using new media APIs.
4 |
5 | At the end of this project you will have a simple Windows 10 app that uses face detection on a live video stream from a camera to trigger musical events. Users will be able to make music by moving their faces to different positions on the screen. This is accomplished by creating a grid of cells and assigning a unique sound to each cell. When a face is detected within a cell, the sound is triggered. The FaceTracker API makes it possible for multiple people to join as it is able to track several faces at one time.
6 |
7 | Showcasing new APIs for image processing and low-latency audio.
8 |
9 | **Estimated time commitment:** 2 hours
10 |
11 | ## Technical requirements:
12 | * [Visual Studio 2015 and Windows developer tooling.](https://dev.windows.com/en-us/downloads)
13 | * Ensure you are using [Windows 10 or better.](https://www.microsoft.com/en-us/windows/windows-10-upgrade)
14 | * Hardware:
15 | * A device that supports video capture.
16 |
17 | ## Sample features:
18 | **Note:** Features in this app are subject to change.
19 | * [FaceTracker](https://msdn.microsoft.com/en-us/library/windows/apps/windows.media.faceanalysis.facetracker.aspx) – Detects faces in VideoFrame objects and tracks faces across subsequent video frames.
20 | * Part of [Windows.Media.FaceAnalysis](C:\Users\v-rehodg\Desktop\Windows.Media.FaceAnalysis) namespace which provides APIs for face detection in bitmaps or video frames.
21 | * [Audio Graphs class](https://msdn.microsoft.com/en-us/library/windows/apps/mt203787.aspx) - parent of all nodes that make up the graph.
22 | * [MediaCapture class](https://msdn.microsoft.com/en-us/library/windows/apps/windows.media.capture.mediacapture.aspx) – Provides functionality for capturing photos, audio, and videos from a capture device, such as a webcam.
23 |
24 | ## Getting started:
25 | To use these samples, download the entire samples ZIP or clone the repository. If you download the ZIP, you can then unzip the entire archive and use the samples in Visual Studio 2015. An overview of the code can be found in the FaceTheremin exercises folder.
26 |
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.23107.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FaceTheremin", "FaceTheremin\FaceTheremin.csproj", "{C80E92C9-F53A-452A-8F42-BE4FDA57B2CA}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|ARM = Debug|ARM
11 | Debug|x64 = Debug|x64
12 | Debug|x86 = Debug|x86
13 | Release|ARM = Release|ARM
14 | Release|x64 = Release|x64
15 | Release|x86 = Release|x86
16 | EndGlobalSection
17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
18 | {C80E92C9-F53A-452A-8F42-BE4FDA57B2CA}.Debug|ARM.ActiveCfg = Debug|ARM
19 | {C80E92C9-F53A-452A-8F42-BE4FDA57B2CA}.Debug|ARM.Build.0 = Debug|ARM
20 | {C80E92C9-F53A-452A-8F42-BE4FDA57B2CA}.Debug|ARM.Deploy.0 = Debug|ARM
21 | {C80E92C9-F53A-452A-8F42-BE4FDA57B2CA}.Debug|x64.ActiveCfg = Debug|x64
22 | {C80E92C9-F53A-452A-8F42-BE4FDA57B2CA}.Debug|x64.Build.0 = Debug|x64
23 | {C80E92C9-F53A-452A-8F42-BE4FDA57B2CA}.Debug|x64.Deploy.0 = Debug|x64
24 | {C80E92C9-F53A-452A-8F42-BE4FDA57B2CA}.Debug|x86.ActiveCfg = Debug|x86
25 | {C80E92C9-F53A-452A-8F42-BE4FDA57B2CA}.Debug|x86.Build.0 = Debug|x86
26 | {C80E92C9-F53A-452A-8F42-BE4FDA57B2CA}.Debug|x86.Deploy.0 = Debug|x86
27 | {C80E92C9-F53A-452A-8F42-BE4FDA57B2CA}.Release|ARM.ActiveCfg = Release|ARM
28 | {C80E92C9-F53A-452A-8F42-BE4FDA57B2CA}.Release|ARM.Build.0 = Release|ARM
29 | {C80E92C9-F53A-452A-8F42-BE4FDA57B2CA}.Release|ARM.Deploy.0 = Release|ARM
30 | {C80E92C9-F53A-452A-8F42-BE4FDA57B2CA}.Release|x64.ActiveCfg = Release|x64
31 | {C80E92C9-F53A-452A-8F42-BE4FDA57B2CA}.Release|x64.Build.0 = Release|x64
32 | {C80E92C9-F53A-452A-8F42-BE4FDA57B2CA}.Release|x64.Deploy.0 = Release|x64
33 | {C80E92C9-F53A-452A-8F42-BE4FDA57B2CA}.Release|x86.ActiveCfg = Release|x86
34 | {C80E92C9-F53A-452A-8F42-BE4FDA57B2CA}.Release|x86.Build.0 = Release|x86
35 | {C80E92C9-F53A-452A-8F42-BE4FDA57B2CA}.Release|x86.Deploy.0 = Release|x86
36 | EndGlobalSection
37 | GlobalSection(SolutionProperties) = preSolution
38 | HideSolutionNode = FALSE
39 | EndGlobalSection
40 | EndGlobal
41 |
--------------------------------------------------------------------------------
/CardReader/CardReader/CardReader.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.23107.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CardReader", "CardReader\CardReader.csproj", "{7911E40C-173D-470D-A2D9-F824F4872DC5}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|ARM = Debug|ARM
11 | Debug|x64 = Debug|x64
12 | Debug|x86 = Debug|x86
13 | Release|ARM = Release|ARM
14 | Release|x64 = Release|x64
15 | Release|x86 = Release|x86
16 | EndGlobalSection
17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
18 | {7911E40C-173D-470D-A2D9-F824F4872DC5}.Debug|ARM.ActiveCfg = Debug|ARM
19 | {7911E40C-173D-470D-A2D9-F824F4872DC5}.Debug|ARM.Build.0 = Debug|ARM
20 | {7911E40C-173D-470D-A2D9-F824F4872DC5}.Debug|ARM.Deploy.0 = Debug|ARM
21 | {7911E40C-173D-470D-A2D9-F824F4872DC5}.Debug|x64.ActiveCfg = Debug|x64
22 | {7911E40C-173D-470D-A2D9-F824F4872DC5}.Debug|x64.Build.0 = Debug|x64
23 | {7911E40C-173D-470D-A2D9-F824F4872DC5}.Debug|x64.Deploy.0 = Debug|x64
24 | {7911E40C-173D-470D-A2D9-F824F4872DC5}.Debug|x86.ActiveCfg = Debug|x86
25 | {7911E40C-173D-470D-A2D9-F824F4872DC5}.Debug|x86.Build.0 = Debug|x86
26 | {7911E40C-173D-470D-A2D9-F824F4872DC5}.Debug|x86.Deploy.0 = Debug|x86
27 | {7911E40C-173D-470D-A2D9-F824F4872DC5}.Release|ARM.ActiveCfg = Release|ARM
28 | {7911E40C-173D-470D-A2D9-F824F4872DC5}.Release|ARM.Build.0 = Release|ARM
29 | {7911E40C-173D-470D-A2D9-F824F4872DC5}.Release|ARM.Deploy.0 = Release|ARM
30 | {7911E40C-173D-470D-A2D9-F824F4872DC5}.Release|x64.ActiveCfg = Release|x64
31 | {7911E40C-173D-470D-A2D9-F824F4872DC5}.Release|x64.Build.0 = Release|x64
32 | {7911E40C-173D-470D-A2D9-F824F4872DC5}.Release|x64.Deploy.0 = Release|x64
33 | {7911E40C-173D-470D-A2D9-F824F4872DC5}.Release|x86.ActiveCfg = Release|x86
34 | {7911E40C-173D-470D-A2D9-F824F4872DC5}.Release|x86.Build.0 = Release|x86
35 | {7911E40C-173D-470D-A2D9-F824F4872DC5}.Release|x86.Deploy.0 = Release|x86
36 | EndGlobalSection
37 | GlobalSection(SolutionProperties) = preSolution
38 | HideSolutionNode = FALSE
39 | EndGlobalSection
40 | EndGlobal
41 |
--------------------------------------------------------------------------------
/CardReader/CardReader/CardReader/CardRecognizer.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Text.RegularExpressions;
3 |
4 | namespace CardReader
5 | {
6 | public static class CardRecognizer
7 | {
8 | public static Dictionary expressions = new Dictionary()
9 | {
10 | // regex taken from MSDN: http://msdn.microsoft.com/en-us/library/01escwtf(v=vs.110).aspx
11 | {
12 | RecognitionType.Email,
13 | @"^(?("")("".+?(? expression in expressions)
46 | {
47 | if (Regex.IsMatch(businessCardText, expression.Value))
48 | {
49 | type = expression.Key;
50 | break;
51 | }
52 | }
53 |
54 | return (type);
55 | }
56 | }
57 | }
--------------------------------------------------------------------------------
/CardReader/CardReader/CardReader/MainPage.xaml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
10 |
11 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/MainPage.xaml:
--------------------------------------------------------------------------------
1 |
13 |
14 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
37 |
38 |
42 |
51 |
52 |
53 |
54 |
58 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/SECURITY.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | ## Security
4 |
5 | Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
6 |
7 | If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below.
8 |
9 | ## Reporting Security Issues
10 |
11 | **Please do not report security vulnerabilities through public GitHub issues.**
12 |
13 | Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report).
14 |
15 | If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey).
16 |
17 | You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc).
18 |
19 | Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
20 |
21 | * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
22 | * Full paths of source file(s) related to the manifestation of the issue
23 | * The location of the affected source code (tag/branch/commit or direct URL)
24 | * Any special configuration required to reproduce the issue
25 | * Step-by-step instructions to reproduce the issue
26 | * Proof-of-concept or exploit code (if possible)
27 | * Impact of the issue, including how an attacker might exploit the issue
28 |
29 | This information will help us triage your report more quickly.
30 |
31 | If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs.
32 |
33 | ## Preferred Languages
34 |
35 | We prefer all communications to be in English.
36 |
37 | ## Policy
38 |
39 | Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd).
40 |
41 |
42 |
--------------------------------------------------------------------------------
/CardReader/CardReader/CardReader/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Windows.ApplicationModel;
3 | using Windows.ApplicationModel.Activation;
4 | using Windows.UI.Xaml;
5 | using Windows.UI.Xaml.Controls;
6 | using Windows.UI.Xaml.Navigation;
7 |
8 | namespace CardReader
9 | {
10 | ///
11 | /// Provides application-specific behavior to supplement the default Application class.
12 | ///
13 | sealed partial class App : Application
14 | {
15 | ///
16 | /// Initializes the singleton application object. This is the first line of authored code
17 | /// executed, and as such is the logical equivalent of main() or WinMain().
18 | ///
19 | public App()
20 | {
21 | Microsoft.ApplicationInsights.WindowsAppInitializer.InitializeAsync(
22 | Microsoft.ApplicationInsights.WindowsCollectors.Metadata |
23 | Microsoft.ApplicationInsights.WindowsCollectors.Session);
24 | InitializeComponent();
25 | Suspending += OnSuspending;
26 | }
27 |
28 | ///
29 | /// Invoked when the application is launched normally by the end user. Other entry points
30 | /// will be used such as when the application is launched to open a specific file.
31 | ///
32 | /// Details about the launch request and process.
33 | protected override void OnLaunched(LaunchActivatedEventArgs e)
34 | {
35 |
36 | #if DEBUG
37 | if (System.Diagnostics.Debugger.IsAttached)
38 | {
39 | DebugSettings.EnableFrameRateCounter = true;
40 | }
41 | #endif
42 |
43 | Frame rootFrame = Window.Current.Content as Frame;
44 |
45 | // Do not repeat app initialization when the Window already has content,
46 | // just ensure that the window is active
47 | if (rootFrame == null)
48 | {
49 | // Create a Frame to act as the navigation context and navigate to the first page
50 | rootFrame = new Frame();
51 |
52 | rootFrame.NavigationFailed += OnNavigationFailed;
53 |
54 | if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
55 | {
56 | //TODO: Load state from previously suspended application
57 | }
58 |
59 | // Place the frame in the current Window
60 | Window.Current.Content = rootFrame;
61 | }
62 |
63 | if (rootFrame.Content == null)
64 | {
65 | // When the navigation stack isn't restored navigate to the first page,
66 | // configuring the new page by passing required information as a navigation
67 | // parameter
68 | rootFrame.Navigate(typeof(MainPage), e.Arguments);
69 | }
70 | // Ensure the current window is active
71 | Window.Current.Activate();
72 | }
73 |
74 | ///
75 | /// Invoked when Navigation to a certain page fails
76 | ///
77 | /// The Frame which failed navigation
78 | /// Details about the navigation failure
79 | void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
80 | {
81 | throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
82 | }
83 |
84 | ///
85 | /// Invoked when application execution is being suspended. Application state is saved
86 | /// without knowing whether the application will be terminated or resumed with the contents
87 | /// of memory still intact.
88 | ///
89 | /// The source of the suspend request.
90 | /// Details about the suspend request.
91 | private void OnSuspending(object sender, SuspendingEventArgs e)
92 | {
93 | SuspendingDeferral deferral = e.SuspendingOperation.GetDeferral();
94 | //TODO: Save application state and stop any background activity
95 | deferral.Complete();
96 | }
97 | }
98 | }
99 |
--------------------------------------------------------------------------------
/MusicSync/MusicSync/MusicServer/MusicServer/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Windows.ApplicationModel;
3 | using Windows.ApplicationModel.Activation;
4 | using Windows.UI.Xaml;
5 | using Windows.UI.Xaml.Controls;
6 | using Windows.UI.Xaml.Navigation;
7 |
8 | namespace MusicServer
9 | {
10 | ///
11 | /// Provides application-specific behavior to supplement the default Application class.
12 | ///
13 | sealed partial class App : Application
14 | {
15 | ///
16 | /// Initializes the singleton application object. This is the first line of authored code
17 | /// executed, and as such is the logical equivalent of main() or WinMain().
18 | ///
19 | public App()
20 | {
21 | Microsoft.ApplicationInsights.WindowsAppInitializer.InitializeAsync(
22 | Microsoft.ApplicationInsights.WindowsCollectors.Metadata |
23 | Microsoft.ApplicationInsights.WindowsCollectors.Session);
24 | InitializeComponent();
25 | Suspending += OnSuspending;
26 | }
27 |
28 | ///
29 | /// Invoked when the application is launched normally by the end user. Other entry points
30 | /// will be used such as when the application is launched to open a specific file.
31 | ///
32 | /// Details about the launch request and process.
33 | protected override void OnLaunched(LaunchActivatedEventArgs e)
34 | {
35 |
36 | #if DEBUG
37 | if (System.Diagnostics.Debugger.IsAttached)
38 | {
39 | this.DebugSettings.EnableFrameRateCounter = true;
40 | }
41 | #endif
42 |
43 | Frame rootFrame = Window.Current.Content as Frame;
44 |
45 | // Do not repeat app initialization when the Window already has content,
46 | // just ensure that the window is active
47 | if (rootFrame == null)
48 | {
49 | // Create a Frame to act as the navigation context and navigate to the first page
50 | rootFrame = new Frame();
51 |
52 | rootFrame.NavigationFailed += OnNavigationFailed;
53 |
54 | if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
55 | {
56 | //TODO: Load state from previously suspended application
57 | }
58 |
59 | // Place the frame in the current Window
60 | Window.Current.Content = rootFrame;
61 | }
62 |
63 | if (rootFrame.Content == null)
64 | {
65 | // When the navigation stack isn't restored navigate to the first page,
66 | // configuring the new page by passing required information as a navigation
67 | // parameter
68 | rootFrame.Navigate(typeof(MainPage), e.Arguments);
69 | }
70 | // Ensure the current window is active
71 | Window.Current.Activate();
72 | }
73 |
74 | ///
75 | /// Invoked when Navigation to a certain page fails
76 | ///
77 | /// The Frame which failed navigation
78 | /// Details about the navigation failure
79 | void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
80 | {
81 | throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
82 | }
83 |
84 | ///
85 | /// Invoked when application execution is being suspended. Application state is saved
86 | /// without knowing whether the application will be terminated or resumed with the contents
87 | /// of memory still intact.
88 | ///
89 | /// The source of the suspend request.
90 | /// Details about the suspend request.
91 | private void OnSuspending(object sender, SuspendingEventArgs e)
92 | {
93 | SuspendingDeferral deferral = e.SuspendingOperation.GetDeferral();
94 | //TODO: Save application state and stop any background activity
95 | deferral.Complete();
96 | }
97 | }
98 | }
99 |
--------------------------------------------------------------------------------
/MusicSync/MusicSync/MusicServer/VirtualSpeaker/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Windows.ApplicationModel;
3 | using Windows.ApplicationModel.Activation;
4 | using Windows.UI.Xaml;
5 | using Windows.UI.Xaml.Controls;
6 | using Windows.UI.Xaml.Navigation;
7 |
8 | namespace VirtualSpeaker
9 | {
10 | ///
11 | /// Provides application-specific behavior to supplement the default Application class.
12 | ///
13 | sealed partial class App : Application
14 | {
15 | ///
16 | /// Initializes the singleton application object. This is the first line of authored code
17 | /// executed, and as such is the logical equivalent of main() or WinMain().
18 | ///
19 | public App()
20 | {
21 | Microsoft.ApplicationInsights.WindowsAppInitializer.InitializeAsync(
22 | Microsoft.ApplicationInsights.WindowsCollectors.Metadata |
23 | Microsoft.ApplicationInsights.WindowsCollectors.Session);
24 | InitializeComponent();
25 | Suspending += OnSuspending;
26 | }
27 |
28 | ///
29 | /// Invoked when the application is launched normally by the end user. Other entry points
30 | /// will be used such as when the application is launched to open a specific file.
31 | ///
32 | /// Details about the launch request and process.
33 | protected override void OnLaunched(LaunchActivatedEventArgs e)
34 | {
35 |
36 | #if DEBUG
37 | if (System.Diagnostics.Debugger.IsAttached)
38 | {
39 | DebugSettings.EnableFrameRateCounter = true;
40 | }
41 | #endif
42 |
43 | Frame rootFrame = Window.Current.Content as Frame;
44 |
45 | // Do not repeat app initialization when the Window already has content,
46 | // just ensure that the window is active
47 | if (rootFrame == null)
48 | {
49 | // Create a Frame to act as the navigation context and navigate to the first page
50 | rootFrame = new Frame();
51 |
52 | rootFrame.NavigationFailed += OnNavigationFailed;
53 |
54 | if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
55 | {
56 | //TODO: Load state from previously suspended application
57 | }
58 |
59 | // Place the frame in the current Window
60 | Window.Current.Content = rootFrame;
61 | }
62 |
63 | if (rootFrame.Content == null)
64 | {
65 | // When the navigation stack isn't restored navigate to the first page,
66 | // configuring the new page by passing required information as a navigation
67 | // parameter
68 | rootFrame.Navigate(typeof(MainPage), e.Arguments);
69 | }
70 | // Ensure the current window is active
71 | Window.Current.Activate();
72 | }
73 |
74 | ///
75 | /// Invoked when Navigation to a certain page fails
76 | ///
77 | /// The Frame which failed navigation
78 | /// Details about the navigation failure
79 | void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
80 | {
81 | throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
82 | }
83 |
84 | ///
85 | /// Invoked when application execution is being suspended. Application state is saved
86 | /// without knowing whether the application will be terminated or resumed with the contents
87 | /// of memory still intact.
88 | ///
89 | /// The source of the suspend request.
90 | /// Details about the suspend request.
91 | private void OnSuspending(object sender, SuspendingEventArgs e)
92 | {
93 | SuspendingDeferral deferral = e.SuspendingOperation.GetDeferral();
94 | //TODO: Save application state and stop any background activity
95 | deferral.Complete();
96 | }
97 | }
98 | }
99 |
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/App.xaml.cs:
--------------------------------------------------------------------------------
1 | //*********************************************************
2 | //
3 | // Copyright (c) Microsoft. All rights reserved.
4 | // This code is licensed under the MIT License (MIT).
5 | // THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
6 | // ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
7 | // IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
8 | // PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
9 | //
10 | //*********************************************************
11 |
12 | using System;
13 | using Windows.ApplicationModel;
14 | using Windows.ApplicationModel.Activation;
15 | using Windows.UI.Xaml;
16 | using Windows.UI.Xaml.Controls;
17 | using Windows.UI.Xaml.Navigation;
18 |
19 | namespace FaceTheremin
20 | {
21 | ///
22 | /// Provides application-specific behavior to supplement the default Application class.
23 | ///
24 | sealed partial class App : Application
25 | {
26 | ///
27 | /// Initializes the singleton application object. This is the first line of authored code
28 | /// executed, and as such is the logical equivalent of main() or WinMain().
29 | ///
30 | public App()
31 | {
32 | this.InitializeComponent();
33 | this.Suspending += OnSuspending;
34 | }
35 |
36 | ///
37 | /// Invoked when the application is launched normally by the end user. Other entry points
38 | /// will be used such as when the application is launched to open a specific file.
39 | ///
40 | /// Details about the launch request and process.
41 | protected override void OnLaunched(LaunchActivatedEventArgs e)
42 | {
43 |
44 | //#if DEBUG
45 | // if (System.Diagnostics.Debugger.IsAttached)
46 | // {
47 | // this.DebugSettings.EnableFrameRateCounter = true;
48 | // }
49 | //#endif
50 |
51 | Frame rootFrame = Window.Current.Content as Frame;
52 |
53 | // Do not repeat app initialization when the Window already has content,
54 | // just ensure that the window is active
55 | if (rootFrame == null)
56 | {
57 | // Create a Frame to act as the navigation context and navigate to the first page
58 | rootFrame = new Frame();
59 |
60 | rootFrame.NavigationFailed += OnNavigationFailed;
61 |
62 | if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
63 | {
64 | //TODO: Load state from previously suspended application
65 | }
66 |
67 | // Place the frame in the current Window
68 | Window.Current.Content = rootFrame;
69 | }
70 |
71 | if (rootFrame.Content == null)
72 | {
73 | // When the navigation stack isn't restored navigate to the first page,
74 | // configuring the new page by passing required information as a navigation
75 | // parameter
76 | rootFrame.Navigate(typeof(MainPage), e.Arguments);
77 | }
78 | // Ensure the current window is active
79 | Window.Current.Activate();
80 | }
81 |
82 | ///
83 | /// Invoked when Navigation to a certain page fails
84 | ///
85 | /// The Frame which failed navigation
86 | /// Details about the navigation failure
87 | void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
88 | {
89 | throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
90 | }
91 |
92 | ///
93 | /// Invoked when application execution is being suspended. Application state is saved
94 | /// without knowing whether the application will be terminated or resumed with the contents
95 | /// of memory still intact.
96 | ///
97 | /// The source of the suspend request.
98 | /// Details about the suspend request.
99 | private void OnSuspending(object sender, SuspendingEventArgs e)
100 | {
101 | var deferral = e.SuspendingOperation.GetDeferral();
102 | //TODO: Save application state and stop any background activity
103 | deferral.Complete();
104 | }
105 | }
106 | }
107 |
--------------------------------------------------------------------------------
/MusicSync/MusicSync/MusicServer/MusicServer/MainPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using MusicSubscriber;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Diagnostics;
5 | using Windows.Networking;
6 | using Windows.Networking.Connectivity;
7 | using Windows.Storage;
8 | using Windows.Storage.Pickers;
9 | using Windows.Storage.Streams;
10 | using Windows.UI.Xaml;
11 | using Windows.UI.Xaml.Controls;
12 |
13 | namespace MusicServer
14 | {
15 | public sealed partial class MainPage : Page
16 | {
17 | private StorageFile _mediaFile;
18 | private Publisher _publisher;
19 | private Subscriber _subscriber;
20 | private bool _playing;
21 |
22 | public MainPage()
23 | {
24 | InitializeComponent();
25 | Loaded += MainPage_LoadedAsync;
26 | }
27 |
28 | private async void MainPage_LoadedAsync(object sender, RoutedEventArgs e)
29 | {
30 | //get the current IP address of this machine and display it
31 | HostIPAddressTextBlock.Text = GetThisIPAddress();
32 | //set up as a publisher and bind the UI to the list of virtual speakers
33 | _publisher = new Publisher();
34 | MessageLogListView.ItemsSource = _publisher.Speakers;
35 | bool init = await _publisher.Initialize();
36 |
37 | if (init)
38 | {
39 | //allow a new media file to be selected
40 | SelectMediaFileButton.IsEnabled = true;
41 | // create a virtual speaker for this local machine to listen to the music we send
42 | _subscriber = new Subscriber();
43 | //hardcoded to localhost and name for local speaker
44 | _subscriber.ConnectAsync("localhost", "Host Speaker");
45 | }
46 | else
47 | {
48 | Debug.WriteLine("Error: Publisher failed to initialize");
49 | }
50 | // listen for changes in the collection of virtual speakers
51 | _publisher.Speakers.CollectionChanged += Speakers_CollectionChanged;
52 | }
53 |
54 | private void Speakers_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
55 | {
56 | // if the virtual speakers all have received the media file and are ready to play
57 | if (_publisher.CheckSpeakersAreReady())
58 | {
59 | //Allow media file to be played if all speakers are ready
60 | PlayButton.IsEnabled = true;
61 | }
62 | else
63 | {
64 | PlayButton.IsEnabled = false;
65 | }
66 | }
67 |
68 | private async void SelectButton_Click(object sender, RoutedEventArgs e)
69 | {
70 | // load filepicker for user to select a media file
71 | FileOpenPicker filePicker = new FileOpenPicker();
72 | filePicker.SuggestedStartLocation = PickerLocationId.MusicLibrary;
73 | filePicker.FileTypeFilter.Add(".mp4");
74 | filePicker.FileTypeFilter.Add(".MOV");
75 | filePicker.FileTypeFilter.Add(".mp3");
76 | filePicker.FileTypeFilter.Add(".wav");
77 | filePicker.ViewMode = PickerViewMode.Thumbnail;
78 |
79 | _mediaFile = await filePicker.PickSingleFileAsync();
80 |
81 | if (_mediaFile != null)
82 | {
83 | Debug.WriteLine(_mediaFile.DisplayName);
84 | SendButton.IsEnabled = true;
85 | }
86 | }
87 |
88 | private async void SendButton_Click(object sender, RoutedEventArgs e)
89 | {
90 | // read the file and send it via the publisher
91 | using (IRandomAccessStream stream = await _mediaFile.OpenReadAsync())
92 | {
93 | byte[] fileBytes = new byte[stream.Size];
94 | using (DataReader reader = new DataReader(stream))
95 | {
96 | await reader.LoadAsync((uint)stream.Size);
97 | reader.ReadBytes(fileBytes);
98 | }
99 | _publisher.Send(fileBytes);
100 | }
101 | }
102 |
103 | private void PlayButton_Click(object sender, RoutedEventArgs e)
104 | {
105 | //toggle the state between play and stop
106 | if (!_playing)
107 | {
108 | _publisher.ToggleMediaState(MessageType.Play);
109 | PlayButton.Content = "Stop";
110 | }
111 | else
112 | {
113 | _publisher.ToggleMediaState(MessageType.Stop);
114 | PlayButton.Content = "Play";
115 | }
116 | //toggle the playing flag
117 | _playing = !_playing;
118 | }
119 |
120 | private string GetThisIPAddress()
121 | {
122 | string lastHostName = string.Empty;
123 | IReadOnlyList hosts = NetworkInformation.GetHostNames();
124 | foreach (HostName host in hosts)
125 | {
126 | // The last IPv4 host name is always this computer.
127 | if (host.Type == HostNameType.Ipv4)
128 | {
129 | lastHostName = host.DisplayName;
130 | }
131 | }
132 |
133 | return lastHostName;
134 | }
135 | }
136 | }
137 |
--------------------------------------------------------------------------------
/MusicSync/MusicSync/MusicServer/MusicServer.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.23107.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MusicServer", "MusicServer\MusicServer.csproj", "{FC2D32ED-D2CF-47A1-8E2A-8C9051C381AE}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VirtualSpeaker", "VirtualSpeaker\VirtualSpeaker.csproj", "{B4D3386F-A59B-49F8-BC2B-CE0109D7FAED}"
9 | EndProject
10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MusicSubscriber", "MusicSubscriber\MusicSubscriber.csproj", "{00CE63DB-CC74-4082-99CD-18C9756740F6}"
11 | EndProject
12 | Global
13 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
14 | Debug|Any CPU = Debug|Any CPU
15 | Debug|ARM = Debug|ARM
16 | Debug|x64 = Debug|x64
17 | Debug|x86 = Debug|x86
18 | Release|Any CPU = Release|Any CPU
19 | Release|ARM = Release|ARM
20 | Release|x64 = Release|x64
21 | Release|x86 = Release|x86
22 | EndGlobalSection
23 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
24 | {FC2D32ED-D2CF-47A1-8E2A-8C9051C381AE}.Debug|Any CPU.ActiveCfg = Debug|x86
25 | {FC2D32ED-D2CF-47A1-8E2A-8C9051C381AE}.Debug|ARM.ActiveCfg = Debug|ARM
26 | {FC2D32ED-D2CF-47A1-8E2A-8C9051C381AE}.Debug|ARM.Build.0 = Debug|ARM
27 | {FC2D32ED-D2CF-47A1-8E2A-8C9051C381AE}.Debug|ARM.Deploy.0 = Debug|ARM
28 | {FC2D32ED-D2CF-47A1-8E2A-8C9051C381AE}.Debug|x64.ActiveCfg = Debug|x64
29 | {FC2D32ED-D2CF-47A1-8E2A-8C9051C381AE}.Debug|x64.Build.0 = Debug|x64
30 | {FC2D32ED-D2CF-47A1-8E2A-8C9051C381AE}.Debug|x64.Deploy.0 = Debug|x64
31 | {FC2D32ED-D2CF-47A1-8E2A-8C9051C381AE}.Debug|x86.ActiveCfg = Debug|x86
32 | {FC2D32ED-D2CF-47A1-8E2A-8C9051C381AE}.Debug|x86.Build.0 = Debug|x86
33 | {FC2D32ED-D2CF-47A1-8E2A-8C9051C381AE}.Debug|x86.Deploy.0 = Debug|x86
34 | {FC2D32ED-D2CF-47A1-8E2A-8C9051C381AE}.Release|Any CPU.ActiveCfg = Release|x86
35 | {FC2D32ED-D2CF-47A1-8E2A-8C9051C381AE}.Release|ARM.ActiveCfg = Release|ARM
36 | {FC2D32ED-D2CF-47A1-8E2A-8C9051C381AE}.Release|ARM.Build.0 = Release|ARM
37 | {FC2D32ED-D2CF-47A1-8E2A-8C9051C381AE}.Release|ARM.Deploy.0 = Release|ARM
38 | {FC2D32ED-D2CF-47A1-8E2A-8C9051C381AE}.Release|x64.ActiveCfg = Release|x64
39 | {FC2D32ED-D2CF-47A1-8E2A-8C9051C381AE}.Release|x64.Build.0 = Release|x64
40 | {FC2D32ED-D2CF-47A1-8E2A-8C9051C381AE}.Release|x64.Deploy.0 = Release|x64
41 | {FC2D32ED-D2CF-47A1-8E2A-8C9051C381AE}.Release|x86.ActiveCfg = Release|x86
42 | {FC2D32ED-D2CF-47A1-8E2A-8C9051C381AE}.Release|x86.Build.0 = Release|x86
43 | {FC2D32ED-D2CF-47A1-8E2A-8C9051C381AE}.Release|x86.Deploy.0 = Release|x86
44 | {B4D3386F-A59B-49F8-BC2B-CE0109D7FAED}.Debug|Any CPU.ActiveCfg = Debug|x86
45 | {B4D3386F-A59B-49F8-BC2B-CE0109D7FAED}.Debug|ARM.ActiveCfg = Debug|ARM
46 | {B4D3386F-A59B-49F8-BC2B-CE0109D7FAED}.Debug|ARM.Build.0 = Debug|ARM
47 | {B4D3386F-A59B-49F8-BC2B-CE0109D7FAED}.Debug|ARM.Deploy.0 = Debug|ARM
48 | {B4D3386F-A59B-49F8-BC2B-CE0109D7FAED}.Debug|x64.ActiveCfg = Debug|x64
49 | {B4D3386F-A59B-49F8-BC2B-CE0109D7FAED}.Debug|x64.Build.0 = Debug|x64
50 | {B4D3386F-A59B-49F8-BC2B-CE0109D7FAED}.Debug|x64.Deploy.0 = Debug|x64
51 | {B4D3386F-A59B-49F8-BC2B-CE0109D7FAED}.Debug|x86.ActiveCfg = Debug|x86
52 | {B4D3386F-A59B-49F8-BC2B-CE0109D7FAED}.Debug|x86.Build.0 = Debug|x86
53 | {B4D3386F-A59B-49F8-BC2B-CE0109D7FAED}.Debug|x86.Deploy.0 = Debug|x86
54 | {B4D3386F-A59B-49F8-BC2B-CE0109D7FAED}.Release|Any CPU.ActiveCfg = Release|x86
55 | {B4D3386F-A59B-49F8-BC2B-CE0109D7FAED}.Release|ARM.ActiveCfg = Release|ARM
56 | {B4D3386F-A59B-49F8-BC2B-CE0109D7FAED}.Release|ARM.Build.0 = Release|ARM
57 | {B4D3386F-A59B-49F8-BC2B-CE0109D7FAED}.Release|ARM.Deploy.0 = Release|ARM
58 | {B4D3386F-A59B-49F8-BC2B-CE0109D7FAED}.Release|x64.ActiveCfg = Release|x64
59 | {B4D3386F-A59B-49F8-BC2B-CE0109D7FAED}.Release|x64.Build.0 = Release|x64
60 | {B4D3386F-A59B-49F8-BC2B-CE0109D7FAED}.Release|x64.Deploy.0 = Release|x64
61 | {B4D3386F-A59B-49F8-BC2B-CE0109D7FAED}.Release|x86.ActiveCfg = Release|x86
62 | {B4D3386F-A59B-49F8-BC2B-CE0109D7FAED}.Release|x86.Build.0 = Release|x86
63 | {B4D3386F-A59B-49F8-BC2B-CE0109D7FAED}.Release|x86.Deploy.0 = Release|x86
64 | {00CE63DB-CC74-4082-99CD-18C9756740F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
65 | {00CE63DB-CC74-4082-99CD-18C9756740F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
66 | {00CE63DB-CC74-4082-99CD-18C9756740F6}.Debug|ARM.ActiveCfg = Debug|ARM
67 | {00CE63DB-CC74-4082-99CD-18C9756740F6}.Debug|ARM.Build.0 = Debug|ARM
68 | {00CE63DB-CC74-4082-99CD-18C9756740F6}.Debug|x64.ActiveCfg = Debug|x64
69 | {00CE63DB-CC74-4082-99CD-18C9756740F6}.Debug|x64.Build.0 = Debug|x64
70 | {00CE63DB-CC74-4082-99CD-18C9756740F6}.Debug|x86.ActiveCfg = Debug|x86
71 | {00CE63DB-CC74-4082-99CD-18C9756740F6}.Debug|x86.Build.0 = Debug|x86
72 | {00CE63DB-CC74-4082-99CD-18C9756740F6}.Release|Any CPU.ActiveCfg = Release|Any CPU
73 | {00CE63DB-CC74-4082-99CD-18C9756740F6}.Release|Any CPU.Build.0 = Release|Any CPU
74 | {00CE63DB-CC74-4082-99CD-18C9756740F6}.Release|ARM.ActiveCfg = Release|ARM
75 | {00CE63DB-CC74-4082-99CD-18C9756740F6}.Release|ARM.Build.0 = Release|ARM
76 | {00CE63DB-CC74-4082-99CD-18C9756740F6}.Release|x64.ActiveCfg = Release|x64
77 | {00CE63DB-CC74-4082-99CD-18C9756740F6}.Release|x64.Build.0 = Release|x64
78 | {00CE63DB-CC74-4082-99CD-18C9756740F6}.Release|x86.ActiveCfg = Release|x86
79 | {00CE63DB-CC74-4082-99CD-18C9756740F6}.Release|x86.Build.0 = Release|x86
80 | EndGlobalSection
81 | GlobalSection(SolutionProperties) = preSolution
82 | HideSolutionNode = FALSE
83 | EndGlobalSection
84 | EndGlobal
85 |
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/AudioMatrix.cs:
--------------------------------------------------------------------------------
1 | //*********************************************************
2 | //
3 | // Copyright (c) Microsoft. All rights reserved.
4 | // This code is licensed under the MIT License (MIT).
5 | // THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
6 | // ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
7 | // IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
8 | // PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
9 | //
10 | //*********************************************************
11 |
12 | using System;
13 | using System.Collections.Generic;
14 | using System.Linq;
15 | using System.Threading.Tasks;
16 | using Windows.Media.Audio;
17 | using Windows.Media.Render;
18 | using Windows.Storage;
19 |
20 | namespace FaceTheremin
21 | {
22 | public class AudioMatrix
23 | {
24 | private static readonly string[] InstrumentPrefixes = { "snd_2", "snd_1", "synth_2", "synth_1", "drum_2", "drum_1" };
25 |
26 | // Still need to keep explicit reference to the AudioGraph object, otherwise it gets disposed
27 | private readonly AudioGraph _audioGraph;
28 |
29 | // Two-dimentional array for storing input nodes corresponding to the cells
30 | private readonly AudioFileInputNode[,] _audioFileInputNodes;
31 |
32 | private AudioMatrix(AudioGraph audioGraph, AudioFileInputNode[,] audioFileInputNodes)
33 | {
34 | _audioGraph = audioGraph;
35 | _audioFileInputNodes = audioFileInputNodes;
36 |
37 | // we have to start audioGraph one time but we can start/stop individual
38 | //input nodes as many times as needed
39 | _audioGraph.Start();
40 | }
41 |
42 | ///
43 | /// Initialize and start AudioGraph
44 | ///
45 | ///
46 | public static async Task CreateAsync(int rowsCount, int columnsCount)
47 | {
48 | var audioGraph = await CreateAudioGraph();
49 | var audioFileInputNodes = await LoadAudioFileInputNodesAsync(rowsCount, columnsCount, audioGraph);
50 |
51 | return new AudioMatrix(audioGraph, audioFileInputNodes);
52 | }
53 |
54 | private static async Task CreateAudioGraph()
55 | {
56 | // we will only play files that's why we are using AudioRenderCategory.Media
57 | var settings = new AudioGraphSettings(AudioRenderCategory.Media);
58 | var result = await AudioGraph.CreateAsync(settings);
59 | if (result.Status != AudioGraphCreationStatus.Success)
60 | {
61 | throw new Exception("Audio graph unavailable.");
62 | }
63 |
64 | return result.Graph;
65 | }
66 |
67 | private static async Task LoadAudioFileInputNodesAsync(int rowsCount, int columnsCount, AudioGraph audioGraph)
68 | {
69 | var audioDeviceOutputNode = await CreateAudioDeviceOutputNodeAsync(audioGraph);
70 | var storageFiles = await LoadStorageFiles(rowsCount, columnsCount);
71 | var result = new AudioFileInputNode[rowsCount, columnsCount];
72 |
73 | // initialize an input node for each cell
74 | for (var y = 0; y < rowsCount; y++)
75 | {
76 | for (var x = 0; x < columnsCount; x++)
77 | {
78 | var inputResult = await audioGraph.CreateFileInputNodeAsync(storageFiles[y, x]);
79 | if (inputResult.Status != AudioFileNodeCreationStatus.Success) continue;
80 |
81 | var audioFileInputNode = inputResult.FileInputNode;
82 | // it shouldn't start when we add it to audioGraph
83 | audioFileInputNode.Stop();
84 | // link it to the output node
85 | audioFileInputNode.AddOutgoingConnection(audioDeviceOutputNode);
86 | // add to the array for easier access to playback
87 | result[y, x] = audioFileInputNode;
88 | }
89 | }
90 |
91 | return result;
92 | }
93 |
94 | private static async Task CreateAudioDeviceOutputNodeAsync(AudioGraph audio)
95 | {
96 | //create output node - speakers in our case
97 | var result = await audio.CreateDeviceOutputNodeAsync();
98 | if (result.Status != AudioDeviceNodeCreationStatus.Success)
99 | {
100 | throw new Exception("Audio device node unavailable.");
101 | }
102 |
103 | return result.DeviceOutputNode;
104 | }
105 |
106 | private static async Task LoadStorageFiles(int rowsCount, int columnsCount)
107 | {
108 | var result = new StorageFile[rowsCount, columnsCount];
109 | for (var x = 0; x < columnsCount; x++)
110 | {
111 | for (var y = 0; y < rowsCount; y++)
112 | {
113 | //Use Assets folder or AssetsHolidaySpecial folder for reguilar or special sounds
114 | //result[y, x] = await StorageFile.GetFileFromApplicationUriAsync(new Uri($"ms-appx:///AssetsHolidaySpecial/{InstrumentPrefixes[x]}_{y + 1}.mp3"));
115 | result[y, x] = await StorageFile.GetFileFromApplicationUriAsync(new Uri($"ms-appx:///Assets/{InstrumentPrefixes[x]}_{y + 1}.mp3"));
116 | }
117 | }
118 |
119 | return result;
120 | }
121 |
122 | ///
123 | /// Play sounds for cells with faces
124 | ///
125 | /// Cells with faces
126 | public void PlayCells(IEnumerable newCells)
127 | {
128 | // get the corresponding sound by coordinates of the cell
129 | foreach (var audioFileInputNode in newCells.Select(x => _audioFileInputNodes[x.Y, x.X]))
130 | {
131 | // we want to play the sound from the beginning every time
132 | audioFileInputNode.Reset();
133 | audioFileInputNode.Start();
134 | }
135 | }
136 | }
137 | }
138 |
--------------------------------------------------------------------------------
/MusicSync/MusicSync/MusicServer/MusicSubscriber/MusicSubscriber.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {00CE63DB-CC74-4082-99CD-18C9756740F6}
8 | winmdobj
9 | Properties
10 | MusicSubscriber
11 | MusicSubscriber
12 | en-US
13 | UAP
14 | 10.0.10240.0
15 | 10.0.10240.0
16 | 14
17 | 512
18 | {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
19 | false
20 |
21 |
22 | AnyCPU
23 | true
24 | full
25 | false
26 | bin\Debug\
27 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
28 | prompt
29 | 4
30 |
31 |
32 | AnyCPU
33 | pdbonly
34 | true
35 | bin\Release\
36 | TRACE;NETFX_CORE;WINDOWS_UWP
37 | prompt
38 | 4
39 |
40 |
41 | ARM
42 | true
43 | bin\ARM\Debug\
44 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
45 | ;2008
46 | full
47 | ARM
48 | false
49 | prompt
50 |
51 |
52 | ARM
53 | bin\ARM\Release\
54 | TRACE;NETFX_CORE;WINDOWS_UWP
55 | true
56 | ;2008
57 | pdbonly
58 | ARM
59 | false
60 | prompt
61 |
62 |
63 | x64
64 | true
65 | bin\x64\Debug\
66 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
67 | ;2008
68 | full
69 | x64
70 | false
71 | prompt
72 |
73 |
74 | x64
75 | bin\x64\Release\
76 | TRACE;NETFX_CORE;WINDOWS_UWP
77 | true
78 | ;2008
79 | pdbonly
80 | x64
81 | false
82 | prompt
83 |
84 |
85 | x86
86 | true
87 | bin\x86\Debug\
88 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
89 | ;2008
90 | full
91 | x86
92 | false
93 | prompt
94 |
95 |
96 | x86
97 | bin\x86\Release\
98 | TRACE;NETFX_CORE;WINDOWS_UWP
99 | true
100 | ;2008
101 | pdbonly
102 | x86
103 | false
104 | prompt
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 | 14.0
117 |
118 |
119 |
126 |
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/FaceMatrix.cs:
--------------------------------------------------------------------------------
1 | //*********************************************************
2 | //
3 | // Copyright (c) Microsoft. All rights reserved.
4 | // This code is licensed under the MIT License (MIT).
5 | // THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
6 | // ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
7 | // IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
8 | // PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
9 | //
10 | //*********************************************************
11 |
12 | using System;
13 | using System.Collections.Generic;
14 | using System.Linq;
15 | using System.Threading.Tasks;
16 | using Windows.Foundation;
17 | using Windows.Graphics.Imaging;
18 | using Windows.Media;
19 | using Windows.Media.Capture;
20 | using Windows.Media.FaceAnalysis;
21 | using Windows.Media.MediaProperties;
22 | using Windows.System.Threading;
23 |
24 | namespace FaceTheremin
25 | {
26 | public class FaceMatrix
27 | {
28 | private readonly int _rowsCount;
29 | private readonly int _columnsCount;
30 |
31 | // FaceTracker detects faces
32 | private readonly FaceTracker _faceTracker;
33 |
34 | // MediaCapture provides source for streaming element and frames for face detection
35 | private readonly MediaCapture _mediaCapture;
36 |
37 | // Time interval between two separate face detections (8.33 fps)
38 | private readonly TimeSpan _frameProcessingTimerInterval = TimeSpan.FromMilliseconds(120);
39 |
40 | // The cells which had faces on a previous frame
41 | private readonly List _previousFrameCells = new List();
42 | private readonly VideoFrame _previewFrame;
43 |
44 | public event EventHandler Frame;
45 |
46 | private FaceMatrix(FaceTracker faceTracker, MediaCapture mediaCapture, int rowsCount, int columnsCount)
47 | {
48 | _faceTracker = faceTracker;
49 | _mediaCapture = mediaCapture;
50 |
51 | // get properties of the stream, we need them to get width/height for face detection
52 | var videoProperties = _mediaCapture.VideoDeviceController.GetMediaStreamProperties(MediaStreamType.VideoPreview) as VideoEncodingProperties;
53 | _previewFrame = new VideoFrame(BitmapPixelFormat.Nv12, (int)videoProperties.Width, (int)videoProperties.Height);
54 |
55 | _rowsCount = rowsCount;
56 | _columnsCount = columnsCount;
57 | }
58 |
59 | public static async Task CreateAsync(MediaCapture mediaCapture, int rowsCount, int columnsCount)
60 | {
61 | var faceTracker = await FaceTracker.CreateAsync();
62 | var faceMatrix = new FaceMatrix(faceTracker, mediaCapture, rowsCount, columnsCount);
63 | faceMatrix.StartRecognitionLoop();
64 |
65 | return faceMatrix;
66 | }
67 |
68 | private void StartRecognitionLoop()
69 | {
70 | ThreadPoolTimer.CreateTimer(ProcessCurrentVideoFrameAsync, _frameProcessingTimerInterval);
71 | }
72 |
73 | ///
74 | /// Detect faces and process them
75 | ///
76 | ///
77 | private async void ProcessCurrentVideoFrameAsync(ThreadPoolTimer timer)
78 | {
79 | // fill the frame
80 | await _mediaCapture.GetPreviewFrameAsync(_previewFrame);
81 |
82 | // collection for faces
83 | IList faces;
84 | if (FaceDetector.IsBitmapPixelFormatSupported(_previewFrame.SoftwareBitmap.BitmapPixelFormat))
85 | {
86 | // get detected faces on the frame
87 | faces = await _faceTracker.ProcessNextFrameAsync(_previewFrame);
88 | }
89 | else
90 | {
91 | throw new NotSupportedException($"PixelFormat {BitmapPixelFormat.Nv12} is not supported by FaceDetector.");
92 | }
93 |
94 | // get the size of frame webcam provided, we need it to scale image on the screen
95 | var previewFrameSize = new Size(_previewFrame.SoftwareBitmap.PixelWidth, _previewFrame.SoftwareBitmap.PixelHeight);
96 | ProcessFrameFaces(previewFrameSize, faces);
97 |
98 | // arrange the next processing time
99 | ThreadPoolTimer.CreateTimer(ProcessCurrentVideoFrameAsync, _frameProcessingTimerInterval);
100 | }
101 |
102 | ///
103 | /// Color the cells with faces and play sounds for them
104 | ///
105 | /// Webcam resolution
106 | ///
107 | private void ProcessFrameFaces(Size previewFrameSize, IList faces)
108 | {
109 | // get cells with faces
110 | var cells = faces.Select(x => CreateFaceCell(previewFrameSize, x)).ToArray();
111 | // exclude cells were on the previous frame
112 | var newCells = cells.Except(_previousFrameCells).ToArray();
113 |
114 | OnFrame(new FaceMatrixFrameEventArgs
115 | {
116 | PreviewFrameSize = previewFrameSize,
117 | DetectedFaces = faces.ToArray(),
118 | PreviousFaceCells = _previousFrameCells.ToArray(),
119 | NewFaceCells = newCells.ToArray()
120 | });
121 |
122 | // remember current cells with faces for next frame processing
123 | _previousFrameCells.Clear();
124 | _previousFrameCells.AddRange(cells);
125 | }
126 |
127 | ///
128 | /// Get the cell for a face
129 | ///
130 | /// Webcam resolution
131 | /// Detected face
132 | /// Cell
133 | private Cell CreateFaceCell(Size previewFrameSize, DetectedFace face)
134 | {
135 | var cellX = (face.FaceBox.X + face.FaceBox.Width / 2) / (uint)(previewFrameSize.Width / _columnsCount);
136 | var cellY = (face.FaceBox.Y + face.FaceBox.Height / 2) / (uint)(previewFrameSize.Height / _rowsCount);
137 |
138 | return new Cell((int)cellX, (int)cellY);
139 | }
140 |
141 | protected virtual void OnFrame(FaceMatrixFrameEventArgs e)
142 | {
143 | Frame?.Invoke(this, e);
144 | }
145 | }
146 |
147 | public class FaceMatrixFrameEventArgs : EventArgs
148 | {
149 | public Size PreviewFrameSize { get; set; }
150 | public IList DetectedFaces { get; set; }
151 | public IList PreviousFaceCells { get; set; }
152 | public IList NewFaceCells { get; set; }
153 | }
154 | }
--------------------------------------------------------------------------------
/CardReader/CardReader/CardReader/CardReader.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | x86
7 | {7911E40C-173D-470D-A2D9-F824F4872DC5}
8 | AppContainerExe
9 | Properties
10 | CardReader
11 | CardReader
12 | en-US
13 | UAP
14 | 10.0.10240.0
15 | 10.0.10240.0
16 | 14
17 | true
18 | 512
19 | {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
20 | CardReader_TemporaryKey.pfx
21 |
22 |
23 | true
24 | bin\ARM\Debug\
25 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
26 | ;2008
27 | full
28 | ARM
29 | false
30 | prompt
31 | true
32 |
33 |
34 | bin\ARM\Release\
35 | TRACE;NETFX_CORE;WINDOWS_UWP
36 | true
37 | ;2008
38 | pdbonly
39 | ARM
40 | false
41 | prompt
42 | true
43 | true
44 |
45 |
46 | true
47 | bin\x64\Debug\
48 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
49 | ;2008
50 | full
51 | x64
52 | false
53 | prompt
54 | true
55 |
56 |
57 | bin\x64\Release\
58 | TRACE;NETFX_CORE;WINDOWS_UWP
59 | true
60 | ;2008
61 | pdbonly
62 | x64
63 | false
64 | prompt
65 | true
66 | true
67 |
68 |
69 | true
70 | bin\x86\Debug\
71 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
72 | ;2008
73 | full
74 | x86
75 | false
76 | prompt
77 | true
78 |
79 |
80 | bin\x86\Release\
81 | TRACE;NETFX_CORE;WINDOWS_UWP
82 | true
83 | ;2008
84 | pdbonly
85 | x86
86 | false
87 | prompt
88 | true
89 | true
90 |
91 |
92 |
93 |
94 | PreserveNewest
95 |
96 |
97 |
98 |
99 |
100 | App.xaml
101 |
102 |
103 |
104 | MainPage.xaml
105 |
106 |
107 |
108 |
109 |
110 |
111 | Designer
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 | MSBuild:Compile
128 | Designer
129 |
130 |
131 | MSBuild:Compile
132 | Designer
133 |
134 |
135 |
136 | 14.0
137 |
138 |
139 |
146 |
--------------------------------------------------------------------------------
/MusicSync/MusicSync/MusicServer/VirtualSpeaker/VirtualSpeaker.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | x86
7 | {B4D3386F-A59B-49F8-BC2B-CE0109D7FAED}
8 | AppContainerExe
9 | Properties
10 | VirtualSpeaker
11 | VirtualSpeaker
12 | en-US
13 | UAP
14 | 10.0.10240.0
15 | 10.0.10240.0
16 | 14
17 | true
18 | 512
19 | {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
20 | VirtualSpeaker_TemporaryKey.pfx
21 |
22 |
23 | true
24 | bin\ARM\Debug\
25 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
26 | ;2008
27 | full
28 | ARM
29 | false
30 | prompt
31 | true
32 |
33 |
34 | bin\ARM\Release\
35 | TRACE;NETFX_CORE;WINDOWS_UWP
36 | true
37 | ;2008
38 | pdbonly
39 | ARM
40 | false
41 | prompt
42 | true
43 | true
44 |
45 |
46 | true
47 | bin\x64\Debug\
48 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
49 | ;2008
50 | full
51 | x64
52 | false
53 | prompt
54 | true
55 |
56 |
57 | bin\x64\Release\
58 | TRACE;NETFX_CORE;WINDOWS_UWP
59 | true
60 | ;2008
61 | pdbonly
62 | x64
63 | false
64 | prompt
65 | true
66 | true
67 |
68 |
69 | true
70 | bin\x86\Debug\
71 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
72 | ;2008
73 | full
74 | x86
75 | false
76 | prompt
77 | true
78 |
79 |
80 | bin\x86\Release\
81 | TRACE;NETFX_CORE;WINDOWS_UWP
82 | true
83 | ;2008
84 | pdbonly
85 | x86
86 | false
87 | prompt
88 | true
89 | true
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 | App.xaml
98 |
99 |
100 | MainPage.xaml
101 |
102 |
103 |
104 |
105 |
106 | Designer
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 | MSBuild:Compile
123 | Designer
124 |
125 |
126 | MSBuild:Compile
127 | Designer
128 |
129 |
130 |
131 |
132 | {00ce63db-cc74-4082-99cd-18c9756740f6}
133 | MusicSubscriber
134 |
135 |
136 |
137 | 14.0
138 |
139 |
140 |
147 |
--------------------------------------------------------------------------------
/MusicSync/MusicSync/MusicServer/MusicServer/MusicServer.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | x86
7 | {FC2D32ED-D2CF-47A1-8E2A-8C9051C381AE}
8 | AppContainerExe
9 | Properties
10 | MusicServer
11 | MusicServer
12 | en-US
13 | UAP
14 | 10.0.10240.0
15 | 10.0.10240.0
16 | 14
17 | true
18 | 512
19 | {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
20 | MusicServer_TemporaryKey.pfx
21 |
22 |
23 | true
24 | bin\ARM\Debug\
25 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
26 | ;2008
27 | full
28 | ARM
29 | false
30 | prompt
31 | true
32 |
33 |
34 | bin\ARM\Release\
35 | TRACE;NETFX_CORE;WINDOWS_UWP
36 | true
37 | ;2008
38 | pdbonly
39 | ARM
40 | false
41 | prompt
42 | true
43 | true
44 |
45 |
46 | true
47 | bin\x64\Debug\
48 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
49 | ;2008
50 | full
51 | x64
52 | false
53 | prompt
54 | true
55 |
56 |
57 | bin\x64\Release\
58 | TRACE;NETFX_CORE;WINDOWS_UWP
59 | true
60 | ;2008
61 | pdbonly
62 | x64
63 | false
64 | prompt
65 | true
66 | true
67 |
68 |
69 | true
70 | bin\x86\Debug\
71 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
72 | ;2008
73 | full
74 | x86
75 | false
76 | prompt
77 | true
78 |
79 |
80 | bin\x86\Release\
81 | TRACE;NETFX_CORE;WINDOWS_UWP
82 | true
83 | ;2008
84 | pdbonly
85 | x86
86 | false
87 | prompt
88 | true
89 | true
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 | App.xaml
98 |
99 |
100 | MainPage.xaml
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 | Designer
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 | MSBuild:Compile
125 | Designer
126 |
127 |
128 | MSBuild:Compile
129 | Designer
130 |
131 |
132 |
133 |
134 | {00ce63db-cc74-4082-99cd-18c9756740f6}
135 | MusicSubscriber
136 |
137 |
138 |
139 | 14.0
140 |
141 |
142 |
149 |
--------------------------------------------------------------------------------
/MusicSync/MusicSync/MusicServer/MusicSubscriber/Subscriber.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Diagnostics;
3 | using System.Threading.Tasks;
4 | using Windows.Media.Playback;
5 | using Windows.Networking;
6 | using Windows.Networking.Sockets;
7 | using Windows.Storage.Streams;
8 |
9 | namespace MusicSubscriber
10 | {
11 | public sealed class Subscriber
12 | {
13 | // two streams in memory.
14 | // One stream is used to receive the file
15 | // the other is used to play the file
16 | private static IRandomAccessStream _incomingStream;
17 | private static IRandomAccessStream _playingStream;
18 |
19 | private StreamSocket _socket;
20 | private DataWriter _writer;
21 | // this max packet size is used in case of a poor internet connection in order to get the packet in reasonable size transferred
22 | private const uint MAX_PACKET_SIZE = 10000;
23 | private uint _totalBytesRead = 0;
24 |
25 | public Subscriber()
26 | {
27 | //the two streams actually point to the same underlying data
28 | _incomingStream = new InMemoryRandomAccessStream();
29 | _playingStream = _incomingStream.CloneStream();
30 | }
31 |
32 | public async void ConnectAsync(string host, string name)
33 | {
34 | HostName hostName;
35 | try
36 | {
37 | hostName = new HostName(host);
38 | }
39 | catch (ArgumentException)
40 | {
41 | Debug.WriteLine("Error: Invalid host name {0}.", host);
42 | return;
43 | }
44 |
45 | _socket = new StreamSocket();
46 | _socket.Control.KeepAlive = true;
47 | _socket.Control.QualityOfService = SocketQualityOfService.LowLatency;
48 |
49 | //hard coded port - can be user-specified but to keep this sample simple it is 21121
50 | await _socket.ConnectAsync(hostName, "21121");
51 | Debug.WriteLine("Connected");
52 |
53 | //first message to send is the name of this virtual speaker
54 | _writer = new DataWriter(_socket.OutputStream);
55 | _writer.WriteUInt32(_writer.MeasureString(name));
56 | _writer.WriteString(name);
57 |
58 | try
59 | {
60 | await _writer.StoreAsync();
61 | Debug.WriteLine("{0} registered successfully.", name);
62 | }
63 | catch (Exception exception)
64 | {
65 | Debug.WriteLine("Send failed with error: " + exception.Message);
66 | // If this is an unknown status it means that the error if fatal and retry will likely fail.
67 | if (SocketError.GetStatus(exception.HResult) == SocketErrorStatus.Unknown)
68 | {
69 | throw;
70 | }
71 | }
72 |
73 | //set no current message type
74 | MessageType currentMessageType = MessageType.Unknown;
75 | // then wait for the audio to be sent to us
76 | DataReader reader = new DataReader(_socket.InputStream);
77 |
78 | while (true)
79 | {
80 | uint x = await reader.LoadAsync(sizeof(short));
81 | short t = reader.ReadInt16();
82 | currentMessageType = (MessageType)t;
83 |
84 | switch (currentMessageType)
85 | {
86 | case MessageType.Media:
87 | await ReadMediaFileAsync(reader);
88 | break;
89 | case MessageType.Play:
90 | {
91 | MediaPlayer mediaPlayer = BackgroundMediaPlayer.Current;
92 | if (mediaPlayer != null)
93 | {
94 | if (mediaPlayer.CurrentState != MediaPlayerState.Playing)
95 | {
96 | mediaPlayer.SetStreamSource(_playingStream);
97 | mediaPlayer.Play();
98 | Debug.WriteLine("Player playing. TotalDuration = " +
99 | mediaPlayer.NaturalDuration.Minutes + ':' + mediaPlayer.NaturalDuration.Seconds);
100 | }
101 | }
102 | }
103 | break;
104 | case MessageType.Stop:
105 | {
106 | MediaPlayer mediaPlayer = BackgroundMediaPlayer.Current;
107 | if (mediaPlayer != null)
108 | {
109 | if (mediaPlayer.CurrentState == MediaPlayerState.Playing)
110 | {
111 | mediaPlayer.Pause();
112 | Debug.WriteLine("Player paused");
113 | }
114 | }
115 | }
116 | break;
117 | default:
118 | break;
119 | }
120 | currentMessageType = MessageType.Unknown;
121 | }
122 | }
123 |
124 | private async Task ReadMediaFileAsync(DataReader reader)
125 | {
126 | //a media file will always start with an int32 containing the file length
127 | await reader.LoadAsync(sizeof(int));
128 | int messageLength = reader.ReadInt32();
129 |
130 | Debug.WriteLine("Message Length " + messageLength);
131 |
132 | _totalBytesRead = 0;
133 | uint bytesRead = 0;
134 | IBuffer readBuffer = new Windows.Storage.Streams.Buffer(MAX_PACKET_SIZE);
135 |
136 | // read as many blocks as are in the incoming stream - this prevents blocks getting dropped
137 | do
138 | {
139 | await reader.LoadAsync(sizeof(int));
140 | int partNumber = reader.ReadInt32();
141 | Debug.WriteLine("Part " + partNumber);
142 |
143 | readBuffer = await _socket.InputStream.ReadAsync(readBuffer, MAX_PACKET_SIZE,
144 | InputStreamOptions.Partial);
145 |
146 | bytesRead = readBuffer.Length;
147 | Debug.WriteLine("Bytes read " + bytesRead);
148 |
149 | if (bytesRead > 0)
150 | {
151 | _incomingStream.WriteAsync(readBuffer).GetResults();
152 | _totalBytesRead += bytesRead;
153 | }
154 | Debug.WriteLine("Total bytes read: " + _totalBytesRead);
155 |
156 | }
157 | while (_totalBytesRead < messageLength);
158 |
159 | Debug.WriteLine("Incoming stream length " + _incomingStream.Size);
160 |
161 | if (_totalBytesRead >= messageLength)
162 | {
163 | if (_writer == null)
164 | {
165 | _writer = new DataWriter(_socket.OutputStream);
166 | }
167 |
168 | _writer.WriteUInt16((UInt16)MessageType.Ready);
169 | await _writer.StoreAsync();
170 |
171 | messageLength = 0;
172 | }
173 | }
174 | }
175 | }
176 |
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/MainPage.xaml.cs:
--------------------------------------------------------------------------------
1 | //*********************************************************
2 | //
3 | // Copyright (c) Microsoft. All rights reserved.
4 | // This code is licensed under the MIT License (MIT).
5 | // THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
6 | // ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
7 | // IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
8 | // PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
9 | //
10 | //*********************************************************
11 |
12 | using System;
13 | using System.Collections.Generic;
14 | using System.Linq;
15 | using System.Threading.Tasks;
16 | using Windows.Foundation;
17 | using Windows.Media.Capture;
18 | using Windows.Media.FaceAnalysis;
19 | using Windows.UI;
20 | using Windows.UI.Core;
21 | using Windows.UI.Xaml;
22 | using Windows.UI.Xaml.Controls;
23 | using Windows.UI.Xaml.Media;
24 | using Windows.UI.Xaml.Navigation;
25 | using Windows.UI.Xaml.Shapes;
26 |
27 | namespace FaceTheremin
28 | {
29 | public sealed partial class MainPage
30 | {
31 | // Dimensions of the display area
32 | private const int CellsRowsCount = 8;
33 | private const int CellsColumnsCount = 6;
34 |
35 | // All the rectangles of the cells
36 | private readonly Rectangle[,] _cellRectangles = new Rectangle[CellsRowsCount, CellsColumnsCount];
37 | // Predefined XAML rectangles for highlighting faces
38 | private Rectangle[] _faceRectangles;
39 |
40 | // Brush for grid borders
41 | private readonly SolidColorBrush _cellStrokeBrush = new SolidColorBrush(Colors.Red);
42 | // Brush for background of cell with detected face
43 | private readonly SolidColorBrush _currentCellFillBrush = new SolidColorBrush(Color.FromArgb(0x3F, 0xFF, 0x00, 0x00));
44 |
45 | private AudioMatrix _audioMatrix;
46 | private FaceMatrix _faceMatrix;
47 |
48 | public MainPage()
49 | {
50 | InitializeComponent();
51 | }
52 |
53 | protected async override void OnNavigatedTo(NavigationEventArgs e)
54 | {
55 | InitializeVisuals();
56 |
57 | await InitializeVideoAsync();
58 |
59 | _audioMatrix = await AudioMatrix.CreateAsync(CellsRowsCount, CellsColumnsCount);
60 |
61 | _faceMatrix.Frame += (sender, args) =>
62 | {
63 | #pragma warning disable CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
64 | Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
65 | #pragma warning restore CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
66 | {
67 | RenderFaceRectangles(args.PreviewFrameSize, args.DetectedFaces);
68 |
69 | // remove background for cells from previous frame
70 | SetCellsFill(args.PreviousFaceCells, null);
71 | // set background for cells with faces on the current frame
72 | SetCellsFill(args.NewFaceCells, _currentCellFillBrush);
73 |
74 | // and play corresponding sound
75 | _audioMatrix.PlayCells(args.NewFaceCells);
76 | });
77 | };
78 | }
79 |
80 | ///
81 | /// Initialize CellsGrid and _cellRectangles
82 | ///
83 | ///
84 | private void InitializeVisuals()
85 | {
86 | for (var i = 0; i < CellsRowsCount; i++)
87 | {
88 | CellsGrid.RowDefinitions.Add(new RowDefinition());
89 | }
90 |
91 | for (var i = 0; i < CellsColumnsCount; i++)
92 | {
93 | CellsGrid.ColumnDefinitions.Add(new ColumnDefinition());
94 | }
95 |
96 | for (var y = 0; y < CellsRowsCount; y++)
97 | {
98 | for (var x = 0; x < CellsColumnsCount; x++)
99 | {
100 | var rectangle = new Rectangle
101 | {
102 | Stroke = _cellStrokeBrush,
103 | StrokeThickness = 1.0,
104 | };
105 | Grid.SetRow(rectangle, y);
106 | Grid.SetColumn(rectangle, x);
107 | CellsGrid.Children.Add(rectangle);
108 | _cellRectangles[y, x] = rectangle;
109 | }
110 | }
111 |
112 | _faceRectangles = FaceRectanglesCanvas.Children.Cast().ToArray();
113 | }
114 |
115 | ///
116 | /// Initialize webcam, set source for StreamElement and start process of face detection
117 | ///
118 | ///
119 | private async Task InitializeVideoAsync()
120 | {
121 | StatusTextBlock.Text = "Opening video stream...";
122 | try
123 | {
124 | // we only need video from our webcam
125 | var settings = new MediaCaptureInitializationSettings {StreamingCaptureMode = StreamingCaptureMode.Video};
126 | var mediaCapture = new MediaCapture();
127 | await mediaCapture.InitializeAsync(settings);
128 |
129 | // set source to see ourselves on the screen
130 | StreamingElement.Source = mediaCapture;
131 | await mediaCapture.StartPreviewAsync();
132 |
133 | // start face detection for the first time
134 | _faceMatrix = await FaceMatrix.CreateAsync(mediaCapture, CellsRowsCount, CellsColumnsCount);
135 | StatusTextBlock.Text = "Live video";
136 | }
137 | catch (UnauthorizedAccessException)
138 | {
139 | //We'll get this if the webcam is disabled, or inaccessible.
140 | StatusTextBlock.Text = "Unable to access the webcam. Ensure that it is connected, and that the app has permission to access it. In addition, ensure that \"Webcam\" is declared in the AppManifest's Capabilities.";
141 | }
142 | catch (Exception ex)
143 | {
144 | StatusTextBlock.Text = $"Start webcam error: {ex}";
145 | }
146 | }
147 |
148 | ///
149 | /// Draw rectangles for each detected face
150 | ///
151 | /// Webcam resolution
152 | /// Detected faces
153 | private void RenderFaceRectangles(Size previewFrameSize, IList faces)
154 | {
155 | // calculate values to scale face rectangles correctly
156 | var widthScale = previewFrameSize.Width / FaceRectanglesCanvas.ActualWidth;
157 | var heightScale = previewFrameSize.Height / FaceRectanglesCanvas.ActualHeight;
158 |
159 | for (var i = 0; i < _faceRectangles.Length; i++)
160 | {
161 | // get one of the predefined rectangles for the face highlighting
162 | var rectangle = _faceRectangles[i];
163 |
164 | if (i < faces.Count)
165 | {
166 | // show rectangle for each detected face
167 | var face = faces[i];
168 | Canvas.SetTop(rectangle, face.FaceBox.Y / heightScale);
169 | Canvas.SetLeft(rectangle, face.FaceBox.X / widthScale);
170 | rectangle.Width = face.FaceBox.Width/widthScale;
171 | rectangle.Height = face.FaceBox.Height/heightScale;
172 | rectangle.Visibility = Visibility.Visible;
173 | }
174 | else
175 | {
176 | // hide rectangle if there is no face for it
177 | rectangle.Visibility = Visibility.Collapsed;
178 | }
179 | }
180 | }
181 |
182 | ///
183 | /// Set background for cells
184 | ///
185 | /// Cells with faces
186 | /// Brush or null if need to remove background
187 | private void SetCellsFill(IEnumerable| cells, Brush currentCellFillBrush)
188 | {
189 | foreach (var cell in cells)
190 | {
191 | _cellRectangles[cell.Y, cell.X].Fill = currentCellFillBrush;
192 | }
193 | }
194 | }
195 | }
196 |
--------------------------------------------------------------------------------
/MusicSync/MusicSync/MusicServer/MusicServer/Publisher.cs:
--------------------------------------------------------------------------------
1 | using MusicSubscriber;
2 | using System;
3 | using System.Collections.ObjectModel;
4 | using System.Diagnostics;
5 | using System.Threading.Tasks;
6 | using Windows.Networking.Sockets;
7 | using Windows.Storage.Streams;
8 | using Windows.UI.Core;
9 |
10 | namespace MusicServer
11 | {
12 | public class Publisher
13 | {
14 | // this is a the port number in a released app this should be configurable
15 | private const string SERVICE_NAME = "21121";
16 | // this max packet size is used in case of a poor internet connection in order to get the packet in reasonable size transferred
17 | private const int MAX_PACKET_SIZE = 10000;
18 | private StreamSocketListener _listener;
19 | //the collection of virtual speakers
20 | // observable so that the UI can update when it changes
21 | private ObservableCollection _speakers;
22 | public ObservableCollection Speakers
23 | {
24 | get
25 | {
26 | if (_speakers == null)
27 | {
28 | _speakers = new ObservableCollection();
29 | }
30 | return _speakers;
31 | }
32 | }
33 |
34 | public async Task Initialize()
35 | {
36 | bool success = true;
37 | try
38 | {
39 | //set up a listener socket for speakers to connect with
40 | _listener = new StreamSocketListener();
41 | _listener.Control.KeepAlive = true;
42 | _listener.Control.QualityOfService = SocketQualityOfService.LowLatency;
43 | _listener.ConnectionReceived += Listener_ConnectionReceived;
44 | await _listener.BindServiceNameAsync(SERVICE_NAME);
45 | }
46 | catch (Exception ex)
47 | {
48 | Debug.WriteLine("Error: " + ex);
49 | success = false;
50 | }
51 |
52 | return success;
53 | }
54 |
55 | private async void Listener_ConnectionReceived(StreamSocketListener sender, StreamSocketListenerConnectionReceivedEventArgs args)
56 | {
57 | Debug.WriteLine("Connection Received on Port {0}", sender.Information.LocalPort);
58 | StreamSocket streamSocket = args.Socket;
59 | if (streamSocket != null)
60 | {
61 | DataReader reader = new DataReader(streamSocket.InputStream);
62 | try
63 | {
64 | // Read first 4 bytes (length of the subsequent string).
65 | uint sizeFieldCount = await reader.LoadAsync(sizeof(uint));
66 | if (sizeFieldCount != sizeof(uint))
67 | {
68 | // The underlying socket was closed before we were able to read the whole data.
69 | return;
70 | }
71 |
72 | // Read the length of the 'packet'.
73 | uint length = reader.ReadUInt32();
74 | uint actualLength = await reader.LoadAsync(length);
75 | if (length != actualLength)
76 | {
77 | // The underlying socket was closed before we were able to read the whole data.
78 | return;
79 | }
80 |
81 | string name = reader.ReadString(actualLength);
82 | Speaker speaker = new Speaker()
83 | {
84 | Name = name,
85 | Address = streamSocket.Information.RemoteAddress.DisplayName,
86 | Status = "Connected",
87 | Socket = streamSocket
88 | };
89 |
90 | await Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal,
91 | () =>
92 | {
93 | Speakers.Add(speaker);
94 | });
95 |
96 | reader.DetachStream();
97 |
98 | Debug.WriteLine("New speaker added " + name);
99 |
100 | }
101 | catch (Exception e)
102 | {
103 | Debug.WriteLine("Error in connection received: " + e);
104 | }
105 | }
106 | }
107 |
108 | public async void Send(byte[] fileBytes)
109 | {
110 | try
111 | {
112 | if (Speakers != null && Speakers.Count > 0 && fileBytes != null)
113 | {
114 | //iterate through the speakers and send out the media file to each speaker
115 | foreach (Speaker speaker in Speakers)
116 | {
117 | StreamSocket socket = speaker.Socket;
118 |
119 | if (socket != null)
120 | {
121 | IOutputStream outStream = socket.OutputStream;
122 | using (DataWriter dataWriter = new DataWriter(outStream))
123 | {
124 | //write header bytes to indicate to the subscriber
125 | //information about the file to be sent
126 | dataWriter.WriteInt16((short)MessageType.Media);
127 | dataWriter.WriteInt32(fileBytes.Length);
128 | await dataWriter.StoreAsync();
129 | //start from 0 and increase by packet size
130 | int partNumber = 0;
131 | int sourceIndex = 0;
132 | int bytesToWrite = fileBytes.Length;
133 | while (bytesToWrite > 0)
134 | {
135 | dataWriter.WriteInt32(partNumber);
136 | int packetSize = bytesToWrite;
137 | if (packetSize > MAX_PACKET_SIZE)
138 | {
139 | packetSize = MAX_PACKET_SIZE;
140 | }
141 | byte[] fragmentedPixels = new byte[packetSize];
142 | Array.Copy(fileBytes, sourceIndex, fragmentedPixels, 0, packetSize);
143 | dataWriter.WriteBytes(fragmentedPixels);
144 | Debug.WriteLine("sent byte packet length " + packetSize);
145 | await dataWriter.StoreAsync();
146 | sourceIndex += packetSize;
147 | bytesToWrite -= packetSize;
148 | partNumber++;
149 | Debug.WriteLine("sent total bytes " + (fileBytes.Length - bytesToWrite));
150 | }
151 | //Finally DetachStream
152 | dataWriter.DetachStream();
153 | }
154 | }
155 | }
156 |
157 |
158 | //check the speakers have all received the file
159 | foreach (Speaker speaker in Speakers)
160 | {
161 | StreamSocket socket = speaker.Socket;
162 | if (socket != null)
163 | {
164 | //wait for the 'I got it' message
165 | DataReader reader = new DataReader(socket.InputStream);
166 | uint x = await reader.LoadAsync(sizeof(short));
167 | MessageType t = (MessageType)reader.ReadInt16();
168 | if (MessageType.Ready == t)
169 | {
170 | await Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal,
171 | () =>
172 | {
173 | Speakers.Remove(speaker);
174 | speaker.Status = "Ready";
175 | Speakers.Add(speaker);
176 | });
177 | }
178 | reader.DetachStream();
179 | }
180 | }
181 | }
182 | }
183 | catch (Exception ex)
184 | {
185 | Debug.WriteLine(ex.ToString());
186 | }
187 | }
188 |
189 | public async void ToggleMediaState(MessageType type)
190 | {
191 | try
192 | {
193 | if (Speakers != null && Speakers.Count > 0)
194 | {
195 | foreach (Speaker speaker in Speakers)
196 | {
197 | StreamSocket socket = speaker.Socket;
198 | if (socket != null)
199 | {
200 | IOutputStream outStream = socket.OutputStream;
201 | using (DataWriter dataWriter = new DataWriter(outStream))
202 | {
203 | dataWriter.WriteInt16((Int16)type);
204 | await dataWriter.StoreAsync();
205 | dataWriter.DetachStream();
206 | }
207 | }
208 | }
209 | }
210 | }
211 | catch (Exception ex)
212 | {
213 | Debug.WriteLine("Error playing: " + ex);
214 | }
215 | }
216 |
217 | public bool CheckSpeakersAreReady()
218 | {
219 | bool speakersReady = true;
220 |
221 | foreach (Speaker speaker in Speakers)
222 | {
223 | if (!Equals(speaker.Status, "Ready"))
224 | {
225 | speakersReady = false;
226 | break;
227 | }
228 | }
229 |
230 | return speakersReady;
231 | }
232 | }
233 | }
234 |
--------------------------------------------------------------------------------
/FaceTheremin/FaceTheremin/FaceTheremin/FaceTheremin.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | x86
7 | {C80E92C9-F53A-452A-8F42-BE4FDA57B2CA}
8 | AppContainerExe
9 | Properties
10 | FaceTheremin
11 | FaceTheremin
12 | en-US
13 | UAP
14 | 10.0.10240.0
15 | 10.0.10240.0
16 | 14
17 | true
18 | 512
19 | {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
20 | FaceTheremin_TemporaryKey.pfx
21 |
22 |
23 | true
24 | bin\ARM\Debug\
25 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
26 | ;2008
27 | full
28 | ARM
29 | false
30 | prompt
31 | true
32 |
33 |
34 | bin\ARM\Release\
35 | TRACE;NETFX_CORE;WINDOWS_UWP
36 | true
37 | ;2008
38 | pdbonly
39 | ARM
40 | false
41 | prompt
42 | true
43 | true
44 |
45 |
46 | true
47 | bin\x64\Debug\
48 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
49 | ;2008
50 | full
51 | x64
52 | false
53 | prompt
54 | true
55 |
56 |
57 | bin\x64\Release\
58 | TRACE;NETFX_CORE;WINDOWS_UWP
59 | true
60 | ;2008
61 | pdbonly
62 | x64
63 | false
64 | prompt
65 | true
66 | true
67 |
68 |
69 | true
70 | bin\x86\Debug\
71 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
72 | ;2008
73 | full
74 | x86
75 | false
76 | prompt
77 | true
78 |
79 |
80 | bin\x86\Release\
81 | TRACE;NETFX_CORE;WINDOWS_UWP
82 | true
83 | ;2008
84 | pdbonly
85 | x86
86 | false
87 | prompt
88 | true
89 | true
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 | App.xaml
98 |
99 |
100 |
101 |
102 |
103 | MainPage.xaml
104 |
105 |
106 |
107 |
108 |
109 | Designer
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 | MSBuild:Compile
221 | Designer
222 |
223 |
224 | MSBuild:Compile
225 | Designer
226 |
227 |
228 |
229 | 14.0
230 |
231 |
232 |
239 |
--------------------------------------------------------------------------------
| | | | | |