Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand Down
12 changes: 6 additions & 6 deletions Native/miniaudio-backend/build-wasm/build.ps1
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Set up Paths
$Env:EMSDK_PYTHON = "C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.Emscripten.3.1.34.Python.win-x64\8.0.22\tools\python.exe"
$Env:DOTNET_EMSCRIPTEN_LLVM_ROOT = "C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.Emscripten.3.1.34.Sdk.win-x64\8.0.22\tools\bin"
$Env:DOTNET_EMSCRIPTEN_BINARYEN_ROOT = "C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.Emscripten.3.1.34.Sdk.win-x64\8.0.22\tools"
$Env:DOTNET_EMSCRIPTEN_NODE_JS = "C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.Emscripten.3.1.34.Node.win-x64\8.0.22\tools\bin\node.exe"
$Env:EMSDK_PYTHON = "C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.Emscripten.3.1.56.Python.win-x64\10.0.6\tools\python.exe"
$Env:DOTNET_EMSCRIPTEN_LLVM_ROOT = "C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.Emscripten.3.1.56.Sdk.win-x64\10.0.6\tools\bin"
$Env:DOTNET_EMSCRIPTEN_BINARYEN_ROOT = "C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.Emscripten.3.1.56.Sdk.win-x64\10.0.6\tools"
$Env:DOTNET_EMSCRIPTEN_NODE_JS = "C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.Emscripten.3.1.56.Node.win-x64\10.0.6\tools\bin\node.exe"

# Set Cache Location
$Env:EM_CACHE = "$env:USERPROFILE\.emscripten_cache_dotnet"
Expand All @@ -12,11 +12,11 @@ $Env:EM_FROZEN_CACHE = "0"

# Clean previous build artifacts, excluding this script
Write-Host "Cleaning build directory..."
Get-ChildItem -Path . -Exclude 'build.ps1' | Remove-Item -Recurse -Force
# Get-ChildItem -Path . -Exclude 'build.ps1' | Remove-Item -Recurse -Force

# Configure
Write-Host "Configuring with emcmake..."
& "C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.Emscripten.3.1.34.Sdk.win-x64\8.0.22\tools\emscripten\emcmake.bat" cmake .. -DCMAKE_BUILD_TYPE=Release
& "C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.Emscripten.3.1.56.Sdk.win-x64\10.0.6\tools\emscripten\emcmake.bat" cmake .. -DCMAKE_BUILD_TYPE=Release

# Build
Write-Host "Building with cmake..."
Expand Down
Binary file modified Native/miniaudio-backend/build-wasm/libminiaudio.a
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0-browser</TargetFramework>
<TargetFramework>net10.0-browser</TargetFramework>
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
<WasmBuildNative>true</WasmBuildNative>
<WasmMainJSPath>wwwroot\main.js</WasmMainJSPath>
Expand All @@ -13,49 +13,101 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Avalonia.Browser" Version="$(AvaloniaVersion)"/>
<PackageReference Include="Avalonia.Browser" Version="12.0.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\SoundFlow.Samples.AvaloniaCrossPlatform\SoundFlow.Samples.AvaloniaCrossPlatform.csproj"/>
</ItemGroup>


<ItemGroup Condition="'$(TargetFramework)' == 'net8.0-browser'">

<ItemGroup Condition="'$(RuntimeIdentifier)' == 'browser-wasm'">
<NativeFileReference Include="libminiaudio.a">
<Source>miniaudio</Source>
<Visible>false</Visible>
</NativeFileReference>
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net8.0-browser'">
<NativeLibrary Include="miniaudio" />
<ItemGroup Condition="'$(RuntimeIdentifier)' == 'browser-wasm'">
<NativeLibrary Include="miniaudio">
<Visible>false</Visible>
</NativeLibrary>
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net8.0-browser'">
<EmccExportedFunction Include="_sf_context_get_backend" />
<EmccExportedFunction Include="_sf_get_devices" />
<EmccExportedFunction Include="_sf_allocate_context" />
<EmccExportedFunction Include="_sf_allocate_device" />
<EmccExportedFunction Include="_sf_allocate_device_config" />
<EmccExportedFunction Include="_sf_allocate_decoder" />
<EmccExportedFunction Include="_sf_allocate_decoder_config" />
<EmccExportedFunction Include="_sf_allocate_encoder" />
<EmccExportedFunction Include="_sf_allocate_encoder_config" />
<EmccExportedFunction Include="_sf_free" />
<EmccExportedFunction Include="_sf_free_device_infos" />
<EmccExportedFunction Include="_ma_context_init" />
<EmccExportedFunction Include="_ma_context_uninit" />
<EmccExportedFunction Include="_ma_device_init" />
<EmccExportedFunction Include="_ma_device_uninit" />
<EmccExportedFunction Include="_ma_device_start" />
<EmccExportedFunction Include="_ma_device_stop" />
<EmccExportedFunction Include="_ma_decoder_init" />
<EmccExportedFunction Include="_ma_decoder_uninit" />
<EmccExportedFunction Include="_ma_decoder_read_pcm_frames" />
<EmccExportedFunction Include="_ma_decoder_seek_to_pcm_frame" />
<EmccExportedFunction Include="_ma_decoder_get_length_in_pcm_frames" />
<EmccExportedFunction Include="_ma_encoder_init" />
<EmccExportedFunction Include="_ma_encoder_uninit" />
<EmccExportedFunction Include="_ma_encoder_write_pcm_frames" />
<ItemGroup Condition="'$(RuntimeIdentifier)' == 'browser-wasm'">
<EmccExportedFunction Include="_sf_context_get_backend">
<Visible>false</Visible>
</EmccExportedFunction>
<EmccExportedFunction Include="_sf_get_devices">
<Visible>false</Visible>
</EmccExportedFunction>
<EmccExportedFunction Include="_sf_allocate_context">
<Visible>false</Visible>
</EmccExportedFunction>
<EmccExportedFunction Include="_sf_allocate_device">
<Visible>false</Visible>
</EmccExportedFunction>
<EmccExportedFunction Include="_sf_allocate_device_config">
<Visible>false</Visible>
</EmccExportedFunction>
<EmccExportedFunction Include="_sf_allocate_decoder">
<Visible>false</Visible>
</EmccExportedFunction>
<EmccExportedFunction Include="_sf_allocate_decoder_config">
<Visible>false</Visible>
</EmccExportedFunction>
<EmccExportedFunction Include="_sf_allocate_encoder">
<Visible>false</Visible>
</EmccExportedFunction>
<EmccExportedFunction Include="_sf_allocate_encoder_config">
<Visible>false</Visible>
</EmccExportedFunction>
<EmccExportedFunction Include="_sf_free">
<Visible>false</Visible>
</EmccExportedFunction>
<EmccExportedFunction Include="_sf_free_device_infos">
<Visible>false</Visible>
</EmccExportedFunction>
<EmccExportedFunction Include="_ma_context_init">
<Visible>false</Visible>
</EmccExportedFunction>
<EmccExportedFunction Include="_ma_context_uninit">
<Visible>false</Visible>
</EmccExportedFunction>
<EmccExportedFunction Include="_ma_device_init">
<Visible>false</Visible>
</EmccExportedFunction>
<EmccExportedFunction Include="_ma_device_uninit">
<Visible>false</Visible>
</EmccExportedFunction>
<EmccExportedFunction Include="_ma_device_start">
<Visible>false</Visible>
</EmccExportedFunction>
<EmccExportedFunction Include="_ma_device_stop">
<Visible>false</Visible>
</EmccExportedFunction>
<EmccExportedFunction Include="_ma_decoder_init">
<Visible>false</Visible>
</EmccExportedFunction>
<EmccExportedFunction Include="_ma_decoder_uninit">
<Visible>false</Visible>
</EmccExportedFunction>
<EmccExportedFunction Include="_ma_decoder_read_pcm_frames">
<Visible>false</Visible>
</EmccExportedFunction>
<EmccExportedFunction Include="_ma_decoder_seek_to_pcm_frame">
<Visible>false</Visible>
</EmccExportedFunction>
<EmccExportedFunction Include="_ma_decoder_get_length_in_pcm_frames">
<Visible>false</Visible>
</EmccExportedFunction>
<EmccExportedFunction Include="_ma_encoder_init">
<Visible>false</Visible>
</EmccExportedFunction>
<EmccExportedFunction Include="_ma_encoder_uninit">
<Visible>false</Visible>
</EmccExportedFunction>
<EmccExportedFunction Include="_ma_encoder_write_pcm_frames">
<Visible>false</Visible>
</EmccExportedFunction>
</ItemGroup>
</Project>
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<!--If you are willing to use Windows/MacOS native APIs you will need to create 3 projects.
One for Windows with net8.0-windows TFM, one for MacOS with net8.0-macos and one with net8.0 TFM for Linux.-->
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
</PropertyGroup>
Expand All @@ -13,9 +11,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Avalonia.Desktop" Version="$(AvaloniaVersion)"/>
<PackageReference Include="Avalonia.Desktop" Version="12.0.1" />
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="$(AvaloniaVersion)"/>
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.3.14" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
Expand All @@ -11,12 +11,12 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Avalonia" Version="$(AvaloniaVersion)"/>
<PackageReference Include="Avalonia.Themes.Fluent" Version="$(AvaloniaVersion)"/>
<PackageReference Include="Avalonia.Fonts.Inter" Version="$(AvaloniaVersion)"/>
<PackageReference Include="Avalonia.ReactiveUI" Version="$(AvaloniaVersion)"/>
<PackageReference Include="Avalonia" Version="12.0.1" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="12.0.1" />
<PackageReference Include="Avalonia.Fonts.Inter" Version="12.0.1" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.3.8" />
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="$(AvaloniaVersion)"/>
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.3.14" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
Loading