Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Visual Studio build and a nuget package #168

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
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
400 changes: 400 additions & 0 deletions .gitignore

Large diffs are not rendered by default.

92 changes: 92 additions & 0 deletions NOTICE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
Software License for The Fraunhofer FDK AAC Codec Library for Android

© Copyright 1995 - 2018 Fraunhofer-Gesellschaft zur Förderung der angewandten
Forschung e.V. All rights reserved.

1. INTRODUCTION
The Fraunhofer FDK AAC Codec Library for Android ("FDK AAC Codec") is software
that implements the MPEG Advanced Audio Coding ("AAC") encoding and decoding
scheme for digital audio. This FDK AAC Codec software is intended to be used on
a wide variety of Android devices.

AAC's HE-AAC and HE-AAC v2 versions are regarded as today's most efficient
general perceptual audio codecs. AAC-ELD is considered the best-performing
full-bandwidth communications codec by independent studies and is widely
deployed. AAC has been standardized by ISO and IEC as part of the MPEG
specifications.

Patent licenses for necessary patent claims for the FDK AAC Codec (including
those of Fraunhofer) may be obtained through Via Licensing
(www.vialicensing.com) or through the respective patent owners individually for
the purpose of encoding or decoding bit streams in products that are compliant
with the ISO/IEC MPEG audio standards. Please note that most manufacturers of
Android devices already license these patent claims through Via Licensing or
directly from the patent owners, and therefore FDK AAC Codec software may
already be covered under those patent licenses when it is used for those
licensed purposes only.

Commercially-licensed AAC software libraries, including floating-point versions
with enhanced sound quality, are also available from Fraunhofer. Users are
encouraged to check the Fraunhofer website for additional applications
information and documentation.

2. COPYRIGHT LICENSE

Redistribution and use in source and binary forms, with or without modification,
are permitted without payment of copyright license fees provided that you
satisfy the following conditions:

You must retain the complete text of this software license in redistributions of
the FDK AAC Codec or your modifications thereto in source code form.

You must retain the complete text of this software license in the documentation
and/or other materials provided with redistributions of the FDK AAC Codec or
your modifications thereto in binary form. You must make available free of
charge copies of the complete source code of the FDK AAC Codec and your
modifications thereto to recipients of copies in binary form.

The name of Fraunhofer may not be used to endorse or promote products derived
from this library without prior written permission.

You may not charge copyright license fees for anyone to use, copy or distribute
the FDK AAC Codec software or your modifications thereto.

Your modified versions of the FDK AAC Codec must carry prominent notices stating
that you changed the software and the date of any change. For modified versions
of the FDK AAC Codec, the term "Fraunhofer FDK AAC Codec Library for Android"
must be replaced by the term "Third-Party Modified Version of the Fraunhofer FDK
AAC Codec Library for Android."

3. NO PATENT LICENSE

NO EXPRESS OR IMPLIED LICENSES TO ANY PATENT CLAIMS, including without
limitation the patents of Fraunhofer, ARE GRANTED BY THIS SOFTWARE LICENSE.
Fraunhofer provides no warranty of patent non-infringement with respect to this
software.

You may use this FDK AAC Codec software or modifications thereto only for
purposes that are authorized by appropriate patent licenses.

4. DISCLAIMER

This FDK AAC Codec software is provided by Fraunhofer on behalf of the copyright
holders and contributors "AS IS" and WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES,
including but not limited to the implied warranties of merchantability and
fitness for a particular purpose. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
CONTRIBUTORS BE LIABLE for any direct, indirect, incidental, special, exemplary,
or consequential damages, including but not limited to procurement of substitute
goods or services; loss of use, data, or profits, or business interruption,
however caused and on any theory of liability, whether in contract, strict
liability, or tort (including negligence), arising in any way out of the use of
this software, even if advised of the possibility of such damage.

5. CONTACT INFORMATION

Fraunhofer Institute for Integrated Circuits IIS
Attention: Audio and Multimedia Departments - FDK AAC LL
Am Wolfsmantel 33
91058 Erlangen, Germany

www.iis.fraunhofer.de/amm
[email protected]

15 changes: 8 additions & 7 deletions libAACenc/include/aacenc_lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -1561,7 +1561,8 @@ extern "C" {
* - AACENC_INVALID_HANDLE, AACENC_MEMORY_ERROR, AACENC_INVALID_CONFIG,
* on failure.
*/
AACENC_ERROR aacEncOpen(HANDLE_AACENCODER *phAacEncoder, const UINT encModules,
LINKSPEC_H AACENC_ERROR aacEncOpen(HANDLE_AACENCODER *phAacEncoder,
const UINT encModules,
const UINT maxChannels);

/**
Expand All @@ -1575,7 +1576,7 @@ AACENC_ERROR aacEncOpen(HANDLE_AACENCODER *phAacEncoder, const UINT encModules,
* - AACENC_OK, on success.
* - AACENC_INVALID_HANDLE, on failure.
*/
AACENC_ERROR aacEncClose(HANDLE_AACENCODER *phAacEncoder);
LINKSPEC_H AACENC_ERROR aacEncClose(HANDLE_AACENCODER *phAacEncoder);

/**
* \brief Encode audio data.
Expand Down Expand Up @@ -1626,7 +1627,7 @@ AACENC_ERROR aacEncClose(HANDLE_AACENCODER *phAacEncoder);
* descriptor initialization.
* - AACENC_ENCODE_EOF, when flushing fully concluded.
*/
AACENC_ERROR aacEncEncode(const HANDLE_AACENCODER hAacEncoder,
LINKSPEC_H AACENC_ERROR aacEncEncode(const HANDLE_AACENCODER hAacEncoder,
const AACENC_BufDesc *inBufDesc,
const AACENC_BufDesc *outBufDesc,
const AACENC_InArgs *inargs, AACENC_OutArgs *outargs);
Expand All @@ -1649,7 +1650,7 @@ AACENC_ERROR aacEncEncode(const HANDLE_AACENCODER hAacEncoder,
* - AACENC_OK, on succes.
* - AACENC_INVALID_HANDLE, AACENC_INIT_ERROR, on failure.
*/
AACENC_ERROR aacEncInfo(const HANDLE_AACENCODER hAacEncoder,
LINKSPEC_H AACENC_ERROR aacEncInfo(const HANDLE_AACENCODER hAacEncoder,
AACENC_InfoStruct *pInfo);

/**
Expand All @@ -1671,7 +1672,7 @@ AACENC_ERROR aacEncInfo(const HANDLE_AACENCODER hAacEncoder,
* - AACENC_INVALID_HANDLE, AACENC_UNSUPPORTED_PARAMETER,
* AACENC_INVALID_CONFIG, on failure.
*/
AACENC_ERROR aacEncoder_SetParam(const HANDLE_AACENCODER hAacEncoder,
LINKSPEC_H AACENC_ERROR aacEncoder_SetParam(const HANDLE_AACENCODER hAacEncoder,
const AACENC_PARAM param, const UINT value);

/**
Expand All @@ -1686,7 +1687,7 @@ AACENC_ERROR aacEncoder_SetParam(const HANDLE_AACENCODER hAacEncoder,
*
* \return Internal configuration value of specifed parameter ::AACENC_PARAM.
*/
UINT aacEncoder_GetParam(const HANDLE_AACENCODER hAacEncoder,
LINKSPEC_H UINT aacEncoder_GetParam(const HANDLE_AACENCODER hAacEncoder,
const AACENC_PARAM param);

/**
Expand All @@ -1700,7 +1701,7 @@ UINT aacEncoder_GetParam(const HANDLE_AACENCODER hAacEncoder,
* - AACENC_OK, on success.
* - AACENC_INVALID_HANDLE, AACENC_INIT_ERROR, on failure.
*/
AACENC_ERROR aacEncGetLibInfo(LIB_INFO *info);
LINKSPEC_H AACENC_ERROR aacEncGetLibInfo(LIB_INFO *info);

#ifdef __cplusplus
}
Expand Down
5 changes: 5 additions & 0 deletions libSYS/include/machine_type.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,13 @@ typedef unsigned long long uint64_t;

/* Library calling convention spec. __cdecl and friends might be added here as
* required. */
#ifndef LINKSPEC_H
#define LINKSPEC_H
#endif // !LINKSPEC_H
#ifndef LINKSPEC_CPP
#define LINKSPEC_CPP
#endif // !LINKSPEC_CPP


/* for doxygen the following docu parts must be separated */
/** \var SCHAR
Expand Down
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
### fdk-aac
1 change: 1 addition & 0 deletions vs/build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Powershell.exe -Command "& {Start-Process Powershell.exe -ArgumentList '-ExecutionPolicy Bypass -File %~dp0build.ps1' -Verb RunAs}"
50 changes: 50 additions & 0 deletions vs/build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# set the current path to the same directory as the script
Set-Location -LiteralPath $PSScriptRoot

If ($vsWhere = Get-Command "vswhere.exe" -ErrorAction SilentlyContinue) {
$vsWhere = $vsWhere.Path
} ElseIf (Test-Path "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe") {
$vsWhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
}
Else {
Write-Error "vswhere not found. Aborting." -ErrorAction Stop
}
Write-Host "vswhere found at: $vsWhere" -ForegroundColor Yellow


#
# Get path to Visual Studio installation using vswhere.
#
$vsPath = &$vsWhere -latest -products * -version "[15.0,18.0)" `
-requires Microsoft.Component.MSBuild `
-property installationPath
If ([string]::IsNullOrEmpty("$vsPath")) {
Write-Error "Failed to find Visual Studio 2017 installation. Aborting." -ErrorAction Stop
}
Write-Host "Using Visual Studio installation at: ${vsPath}" -ForegroundColor Yellow


#
# Make sure the Visual Studio Command Prompt variables are set.
#
If (Test-Path env:LIBPATH) {
Write-Host "Visual Studio Command Prompt variables already set." -ForegroundColor Yellow
} Else {
# Load VC vars
Push-Location "${vsPath}\VC\Auxiliary\Build"
cmd /c "vcvarsall.bat x64&set" |
ForEach-Object {
If ($_ -match "=") {
$v = $_.split("="); Set-Item -Force -Path "ENV:\$($v[0])" -Value "$($v[1])"
}
}
Pop-Location
Write-Host "Visual Studio Command Prompt variables set." -ForegroundColor Yellow
}

msbuild .\fdk-aac.sln -p:Configuration=Release -p:Platform=x64
msbuild .\fdk-aac.sln -p:Configuration=Release -p:Platform=x86
msbuild .\fdk-aac.sln -p:Configuration=Release -p:Platform=ARM64

Invoke-WebRequest https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -OutFile .\Nuget.exe
.\Nuget.exe pack .\fdk-aac.nuspec
41 changes: 41 additions & 0 deletions vs/fdk-aac.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?xml version="1.0"?>
<package>
<metadata>
<id>fdk-aac</id>
<version>2.0.3</version>
<title>FDK AAC</title>
<description>A standalone library of the Fraunhofer FDK AAC code from Android. Compiled in VS2022 for x86, x64 and ARM64.</description>
<projectUrl>https://github.com/jimm98y/fdk-aac</projectUrl>
<authors>Lukas Volf</authors>
<license type="file">NOTICE.txt</license>
<readme>readme.md</readme>
</metadata>
<files>
<file src="Release\x64\libAACenc.dll" target="build\x64" />
<file src="Release\x64\libAACenc.dll" target="runtimes\win-x64\native" />
<file src="Release\x64\libAACenc.dll" target="runtimes\win-x64\lib\uap10.0" />

<file src="Release\win32\libAACenc.dll" target="build\x86" />
<file src="Release\win32\libAACenc.dll" target="runtimes\win-x86\native" />
<file src="Release\win32\libAACenc.dll" target="runtimes\win-x86\lib\uap10.0" />

<file src="Release\ARM64\libAACenc.dll" target="build\arm64" />
<file src="Release\ARM64\libAACenc.dll" target="runtimes\win-arm64\native" />
<file src="Release\ARM64\libAACenc.dll" target="runtimes\win-arm64\lib\uap10.0" />

<file src="Release\x64\libAACdec.dll" target="build\x64" />
<file src="Release\x64\libAACdec.dll" target="runtimes\win-x64\native" />
<file src="Release\x64\libAACdec.dll" target="runtimes\win-x64\lib\uap10.0" />

<file src="Release\win32\libAACdec.dll" target="build\x86" />
<file src="Release\win32\libAACdec.dll" target="runtimes\win-x86\native" />
<file src="Release\win32\libAACdec.dll" target="runtimes\win-x86\lib\uap10.0" />

<file src="Release\ARM64\libAACdec.dll" target="build\arm64" />
<file src="Release\ARM64\libAACdec.dll" target="runtimes\win-arm64\native" />
<file src="Release\ARM64\libAACdec.dll" target="runtimes\win-arm64\lib\uap10.0" />

<file src="..\NOTICE.txt" target="" />
<file src="..\readme.md" target="" />
</files>
</package>
51 changes: 51 additions & 0 deletions vs/fdk-aac.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.8.34511.84
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libAACdec", "libAACdec\libAACdec.vcxproj", "{7C4EDCB2-B0E7-4DA1-9B19-7FD46B5DF94E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libAACenc", "libAACenc\libAACenc.vcxproj", "{111B8835-DDC0-4544-A388-6648F91AF71B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM64 = Debug|ARM64
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|ARM64 = Release|ARM64
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7C4EDCB2-B0E7-4DA1-9B19-7FD46B5DF94E}.Debug|ARM64.ActiveCfg = Debug|ARM64
{7C4EDCB2-B0E7-4DA1-9B19-7FD46B5DF94E}.Debug|ARM64.Build.0 = Debug|ARM64
{7C4EDCB2-B0E7-4DA1-9B19-7FD46B5DF94E}.Debug|x64.ActiveCfg = Debug|x64
{7C4EDCB2-B0E7-4DA1-9B19-7FD46B5DF94E}.Debug|x64.Build.0 = Debug|x64
{7C4EDCB2-B0E7-4DA1-9B19-7FD46B5DF94E}.Debug|x86.ActiveCfg = Debug|Win32
{7C4EDCB2-B0E7-4DA1-9B19-7FD46B5DF94E}.Debug|x86.Build.0 = Debug|Win32
{7C4EDCB2-B0E7-4DA1-9B19-7FD46B5DF94E}.Release|ARM64.ActiveCfg = Release|ARM64
{7C4EDCB2-B0E7-4DA1-9B19-7FD46B5DF94E}.Release|ARM64.Build.0 = Release|ARM64
{7C4EDCB2-B0E7-4DA1-9B19-7FD46B5DF94E}.Release|x64.ActiveCfg = Release|x64
{7C4EDCB2-B0E7-4DA1-9B19-7FD46B5DF94E}.Release|x64.Build.0 = Release|x64
{7C4EDCB2-B0E7-4DA1-9B19-7FD46B5DF94E}.Release|x86.ActiveCfg = Release|Win32
{7C4EDCB2-B0E7-4DA1-9B19-7FD46B5DF94E}.Release|x86.Build.0 = Release|Win32
{111B8835-DDC0-4544-A388-6648F91AF71B}.Debug|ARM64.ActiveCfg = Debug|ARM64
{111B8835-DDC0-4544-A388-6648F91AF71B}.Debug|ARM64.Build.0 = Debug|ARM64
{111B8835-DDC0-4544-A388-6648F91AF71B}.Debug|x64.ActiveCfg = Debug|x64
{111B8835-DDC0-4544-A388-6648F91AF71B}.Debug|x64.Build.0 = Debug|x64
{111B8835-DDC0-4544-A388-6648F91AF71B}.Debug|x86.ActiveCfg = Debug|Win32
{111B8835-DDC0-4544-A388-6648F91AF71B}.Debug|x86.Build.0 = Debug|Win32
{111B8835-DDC0-4544-A388-6648F91AF71B}.Release|ARM64.ActiveCfg = Release|ARM64
{111B8835-DDC0-4544-A388-6648F91AF71B}.Release|ARM64.Build.0 = Release|ARM64
{111B8835-DDC0-4544-A388-6648F91AF71B}.Release|x64.ActiveCfg = Release|x64
{111B8835-DDC0-4544-A388-6648F91AF71B}.Release|x64.Build.0 = Release|x64
{111B8835-DDC0-4544-A388-6648F91AF71B}.Release|x86.ActiveCfg = Release|Win32
{111B8835-DDC0-4544-A388-6648F91AF71B}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {EDCEDB3E-8C8F-46BB-8EEA-AB96B2EDAAF4}
EndGlobalSection
EndGlobal
Loading