diff --git a/Library/Xna/GameBase.cs b/Library/Xna/GameBase.cs index 9f8aa8e..6bfb2d4 100644 --- a/Library/Xna/GameBase.cs +++ b/Library/Xna/GameBase.cs @@ -1,6 +1,7 @@ using System; using System.Diagnostics.CodeAnalysis; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.GamerServices; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; @@ -20,8 +21,9 @@ public GameBase(string name) Content.RootDirectory = "Content"; GraphicsDeviceManager = new GraphicsDeviceManager(this); #if WINDOWS_PHONE - GraphicsDeviceManager.IsFullScreen = true; TargetElapsedTime = TimeSpan.FromTicks(333333); // 30 fps +#elif XBOX + Components.Add(new GamerServicesComponent(this)); #endif GraphicsDeviceService = (IGraphicsDeviceService)Services.GetService(typeof(IGraphicsDeviceService)); diff --git a/Virtu/Services/AudioService.cs b/Virtu/Services/AudioService.cs index a404243..4d83b77 100644 --- a/Virtu/Services/AudioService.cs +++ b/Virtu/Services/AudioService.cs @@ -14,8 +14,16 @@ protected AudioService(Machine machine) : public void Output(int data) // machine thread { - _buffer[_index + 0] = (byte)(data & 0xFF); - _buffer[_index + 1] = (byte)(data >> 8); + if (BitConverter.IsLittleEndian) + { + _buffer[_index + 0] = (byte)(data & 0xFF); + _buffer[_index + 1] = (byte)(data >> 8); + } + else + { + _buffer[_index + 0] = (byte)(data >> 8); + _buffer[_index + 1] = (byte)(data & 0xFF); + } _index = (_index + 2) % SampleSize; if (_index == 0) {