Formatting pass

main
cosmonaut 2022-02-22 21:14:32 -08:00
parent 7a754e1c90
commit 26dc361d31
10 changed files with 912 additions and 910 deletions

View File

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;

View File

@ -1,4 +1,4 @@
using System;
using System;
using System.Runtime.InteropServices;
using MoonWorks.Math;

View File

@ -1,4 +1,4 @@
using System;
using System;
using MoonWorks.Math;
namespace MoonWorks.Audio

View File

@ -1,4 +1,4 @@
using System;
using System;
namespace MoonWorks.Audio
{

View File

@ -1,4 +1,4 @@
using System;
using System;
using System.Runtime.InteropServices;
using MoonWorks.Math;
@ -169,7 +169,7 @@ namespace MoonWorks.Audio
bool loop
) : base(device)
{
var blockAlign = (ushort)(4 * channels);
var blockAlign = (ushort) (4 * channels);
var format = new FAudio.FAudioWaveFormatEx
{
wFormatTag = 3,

View File

@ -1,4 +1,4 @@
namespace MoonWorks.Audio
namespace MoonWorks.Audio
{
public enum SoundState
{

View File

@ -1,4 +1,4 @@
using System;
using System;
using System.Runtime.InteropServices;
namespace MoonWorks.Audio

View File

@ -1,4 +1,4 @@
using System;
using System;
namespace MoonWorks.Audio
{

View File

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
@ -131,7 +131,7 @@ namespace MoonWorks.Audio
PlayLength = (
lengthInBytes /
Format.nChannels /
(uint)(Format.wBitsPerSample / 8)
(uint) (Format.wBitsPerSample / 8)
)
};

View File

@ -1,4 +1,4 @@
using System;
using System;
using System.IO;
namespace MoonWorks.Audio
@ -20,7 +20,8 @@ namespace MoonWorks.Audio
string filePath,
bool is3D = false,
bool loop = false
) {
)
{
var fileHandle = FAudio.stb_vorbis_open_filename(filePath, out var error, IntPtr.Zero);
if (error != 0)
{
@ -59,7 +60,8 @@ namespace MoonWorks.Audio
out uint bufferOffset,
out uint bufferLength,
out bool reachedEnd
) {
)
{
buffer = this.buffer;
/* NOTE: this function returns samples per channel, not total samples */