├── .clang-format ├── .editorconfig ├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ └── bug_report.md └── workflows │ └── main.yml ├── .gitignore ├── CMakeLists.txt ├── COPYING.txt ├── README.md ├── cmake └── FindLibObs.cmake ├── data └── locale │ ├── en-US.ini │ ├── ko-KR.ini │ ├── ru-RU.ini │ └── zh-CN.ini ├── fftw3 ├── COPYING.txt ├── COPYRIGHT.txt ├── bin │ ├── 32bit │ │ ├── libfftw3-3.dll │ │ ├── libfftw3-3.exp │ │ ├── libfftw3-3.lib │ │ ├── libfftw3f-3.dll │ │ ├── libfftw3f-3.exp │ │ ├── libfftw3f-3.lib │ │ ├── libfftw3l-3.def │ │ ├── libfftw3l-3.dll │ │ ├── libfftw3l-3.exp │ │ └── libfftw3l-3.lib │ └── 64bit │ │ ├── libfftw3-3.dll │ │ ├── libfftw3-3.exp │ │ ├── libfftw3-3.lib │ │ ├── libfftw3f-3.dll │ │ ├── libfftw3f-3.exp │ │ ├── libfftw3f-3.lib │ │ ├── libfftw3l-3.dll │ │ ├── libfftw3l-3.exp │ │ └── libfftw3l-3.lib └── include │ └── fftw3.h ├── format.sh ├── package ├── README.txt.in ├── installer-Windows.iss.in ├── installer-macOS.pkgproj.in └── macOS-intro.txt └── src ├── source ├── visualizer_source.cpp └── visualizer_source.hpp ├── spectralizer.cpp └── util ├── audio ├── audio_source.hpp ├── audio_visualizer.cpp ├── audio_visualizer.hpp ├── bar_visualizer.cpp ├── bar_visualizer.hpp ├── circle_bar_visualizer.cpp ├── circle_bar_visualizer.hpp ├── fifo.cpp ├── fifo.hpp ├── obs_internal_source.cpp ├── obs_internal_source.hpp ├── spectrum_visualizer.cpp ├── spectrum_visualizer.hpp ├── wire_visualizer.cpp └── wire_visualizer.hpp ├── util.cpp └── util.hpp /.clang-format: -------------------------------------------------------------------------------- 1 | # please use clang-format version 8 or later 2 | 3 | Standard: Cpp11 4 | AccessModifierOffset: -4 5 | AlignAfterOpenBracket: Align 6 | AlignConsecutiveAssignments: false 7 | AlignConsecutiveDeclarations: false 8 | AlignEscapedNewlines: Left 9 | AlignOperands: true 10 | AlignTrailingComments: true 11 | #AllowAllArgumentsOnNextLine: false # requires clang-format 9 12 | #AllowAllConstructorInitializersOnNextLine: false # requires clang-format 9 13 | AllowAllParametersOfDeclarationOnNextLine: false 14 | AllowShortBlocksOnASingleLine: false 15 | AllowShortCaseLabelsOnASingleLine: false 16 | AllowShortFunctionsOnASingleLine: Inline 17 | AllowShortIfStatementsOnASingleLine: false 18 | #AllowShortLambdasOnASingleLine: Inline # requires clang-format 9 19 | AllowShortLoopsOnASingleLine: false 20 | AlwaysBreakAfterDefinitionReturnType: None 21 | AlwaysBreakAfterReturnType: None 22 | AlwaysBreakBeforeMultilineStrings: false 23 | AlwaysBreakTemplateDeclarations: false 24 | BinPackArguments: true 25 | BinPackParameters: true 26 | BraceWrapping: 27 | AfterClass: false 28 | AfterControlStatement: false 29 | AfterEnum: false 30 | AfterFunction: true 31 | AfterNamespace: false 32 | AfterObjCDeclaration: false 33 | AfterStruct: false 34 | AfterUnion: false 35 | AfterExternBlock: false 36 | BeforeCatch: false 37 | BeforeElse: false 38 | IndentBraces: false 39 | SplitEmptyFunction: true 40 | SplitEmptyRecord: true 41 | SplitEmptyNamespace: true 42 | BreakBeforeBinaryOperators: None 43 | BreakBeforeBraces: Custom 44 | BreakBeforeTernaryOperators: true 45 | BreakConstructorInitializers: BeforeColon 46 | BreakStringLiterals: false # apparently unpredictable 47 | ColumnLimit: 120 48 | CompactNamespaces: false 49 | ConstructorInitializerAllOnOneLineOrOnePerLine: true 50 | ConstructorInitializerIndentWidth: 4 51 | ContinuationIndentWidth: 4 52 | Cpp11BracedListStyle: true 53 | DerivePointerAlignment: false 54 | DisableFormat: false 55 | FixNamespaceComments: false 56 | ForEachMacros: 57 | - 'json_object_foreach' 58 | - 'json_object_foreach_safe' 59 | - 'json_array_foreach' 60 | IncludeBlocks: Preserve 61 | IndentCaseLabels: false 62 | IndentPPDirectives: None 63 | IndentWidth: 4 64 | IndentWrappedFunctionNames: false 65 | KeepEmptyLinesAtTheStartOfBlocks: true 66 | MaxEmptyLinesToKeep: 1 67 | NamespaceIndentation: None 68 | #ObjCBinPackProtocolList: Auto # requires clang-format 7 69 | ObjCBlockIndentWidth: 4 70 | ObjCSpaceAfterProperty: true 71 | ObjCSpaceBeforeProtocolList: true 72 | 73 | PenaltyBreakAssignment: 10 74 | PenaltyBreakBeforeFirstCallParameter: 30 75 | PenaltyBreakComment: 10 76 | PenaltyBreakFirstLessLess: 0 77 | PenaltyBreakString: 10 78 | PenaltyExcessCharacter: 100 79 | PenaltyReturnTypeOnItsOwnLine: 60 80 | 81 | PointerAlignment: Right 82 | ReflowComments: false 83 | SortIncludes: false 84 | SortUsingDeclarations: false 85 | SpaceAfterCStyleCast: false 86 | #SpaceAfterLogicalNot: false # requires clang-format 9 87 | SpaceAfterTemplateKeyword: false 88 | SpaceBeforeAssignmentOperators: true 89 | #SpaceBeforeCtorInitializerColon: true # requires clang-format 7 90 | #SpaceBeforeInheritanceColon: true # requires clang-format 7 91 | SpaceBeforeParens: ControlStatements 92 | #SpaceBeforeRangeBasedForLoopColon: true # requires clang-format 7 93 | SpaceInEmptyParentheses: false 94 | SpacesBeforeTrailingComments: 1 95 | SpacesInAngles: false 96 | SpacesInCStyleCastParentheses: false 97 | SpacesInContainerLiterals: false 98 | SpacesInParentheses: false 99 | SpacesInSquareBrackets: false 100 | #StatementMacros: # requires clang-format 8 101 | # - 'Q_OBJECT' 102 | TabWidth: 4 103 | #TypenameMacros: # requires clang-format 9 104 | # - 'DARRAY' 105 | UseTab: Never 106 | --- 107 | Language: ObjC 108 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # Overrule obs formatting convention, because 2 | # I don't like it. 3 | [*] 4 | insert_final_newline = true 5 | trim_trailing_whitespace = true 6 | charset = utf-8 7 | indent_style = spaces 8 | indent_size = 4 9 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | custom: vrsal.de/$ 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | # FILL THIS FORM OUT CORRECTLY AND PROVIDE AS MUCH INFORMATION AS POSSIBLE OR YOUR ISSUE WILL BE CLOSED 11 | (you can remove this before submitting the issue) 12 | 13 | **Describe the bug** 14 | A clear and concise description of what the bug is. 15 | 16 | **To Reproduce** 17 | Steps to reproduce the behavior: 18 | 1. Go to '...' 19 | 2. Click on '....' 20 | 3. Scroll down to '....' 21 | 4. See error 22 | 23 | **Expected behavior** 24 | A clear and concise description of what you expected to happen. 25 | 26 | **Screenshots** 27 | If applicable, add screenshots to help explain your problem. 28 | 29 | **Log** 30 | [Add the link to your obs studio log](https://obsproject.com/forum/threads/please-post-a-log-with-your-issue-heres-how.23074/) 31 | 32 | **Additional context** 33 | Add any other context about the problem here. 34 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: nightly 2 | on: 3 | pull_request: 4 | paths-ignore: 5 | - '**.md' 6 | - '**.ini' 7 | push: 8 | paths-ignore: 9 | - '**.md' 10 | - '**.ini' 11 | branches: 12 | - master 13 | tags: 14 | - "v*" 15 | jobs: 16 | macos64: 17 | name: "macOS 64-bit" 18 | runs-on: [macos-latest] 19 | env: 20 | QT_VERSION: 5.14.1 21 | MACOS_DEPS_VERSION: '2020-08-30' 22 | project-git: spectralizer 23 | project-name: spectralizer 24 | steps: 25 | - name: Checkout plugin 26 | uses: actions/checkout@v2 27 | with: 28 | path: ${{ github.workspace }} 29 | submodules: 'recursive' 30 | - name: 'Get ${{ env.project-git }} git info' 31 | shell: bash 32 | working-directory: ${{ github.workspace }} 33 | run: | 34 | git fetch --prune --unshallow 35 | echo "GIT_BRANCH=${{ github.event.pull_request.head.ref }}" >> $GITHUB_ENV 36 | echo "GIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV 37 | echo "GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV 38 | - name: Cache OBS build 39 | id: cache-obs-build-macos 40 | uses: actions/cache@v1 41 | with: 42 | path: obs-studio 43 | key: obs-deps-macos 44 | - name: 'Restore pre-built dependencies from cache' 45 | id: deps-cache 46 | uses: actions/cache@v1 47 | env: 48 | CACHE_NAME: 'deps-cache' 49 | with: 50 | path: /tmp/obsdeps 51 | key: ${{ runner.os }}-pr-${{ env.CACHE_NAME }}-${{ env.MACOS_DEPS_VERSION }} 52 | - name: 'Restore pre-built Qt dependency from cache' 53 | id: deps-qt-cache 54 | uses: actions/cache@v1 55 | env: 56 | CACHE_NAME: 'deps-qt-cache' 57 | with: 58 | path: /tmp/obsdeps 59 | key: ${{ runner.os }}-pr-${{ env.CACHE_NAME }}-${{ env.MACOS_DEPS_VERSION }} 60 | - name: 'Install prerequisite: Pre-built dependencies' 61 | if: steps.deps-cache.outputs.cache-hit != 'true' 62 | shell: bash 63 | run: | 64 | curl -L -O https://github.com/obsproject/obs-deps/releases/download/${{ env.MACOS_DEPS_VERSION }}/macos-deps-${{ env.MACOS_DEPS_VERSION }}.tar.gz 65 | tar -xf ./macos-deps-${{ env.MACOS_DEPS_VERSION }}.tar.gz -C "/tmp" 66 | - name: 'Install prerequisite: Pre-built dependency Qt' 67 | if: steps.deps-qt-cache.outputs.cache-hit != 'true' 68 | shell: bash 69 | run: | 70 | curl -L -O https://github.com/obsproject/obs-deps/releases/download/${{ env.MACOS_DEPS_VERSION }}/macos-qt-${{ env.QT_VERSION }}-${{ env.MACOS_DEPS_VERSION }}.tar.gz 71 | tar -xf ./macos-qt-${{ env.QT_VERSION }}-${{ env.MACOS_DEPS_VERSION }}.tar.gz -C "/tmp" 72 | xattr -r -d com.apple.quarantine /tmp/obsdeps 73 | - name: Checkout OBS 74 | if: steps.cache-obs-build-macos.outputs.cache-hit != 'true' 75 | uses: actions/checkout@v2 76 | with: 77 | repository: obsproject/obs-studio 78 | submodules: 'recursive' 79 | path: obs-studio 80 | - name: 'Fetch prune' 81 | if: steps.cache-obs-build-macos.outputs.cache-hit != 'true' 82 | run: git fetch --prune 83 | - name: 'Get OBS-Studio git info' 84 | shell: bash 85 | working-directory: ${{ github.workspace }}/obs-studio 86 | run: | 87 | echo "OBS_GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV 88 | echo "OBS_GIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV 89 | echo "OBS_GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV 90 | - name: Configure and build OBS 91 | if: steps.cache-obs-build-macos.outputs.cache-hit != 'true' 92 | shell: bash 93 | run: | 94 | cd ${{ github.workspace }}/obs-studio 95 | git checkout ${{ env.OBS_GIT_TAG }} 96 | mkdir build && cd build 97 | echo "=> Building obs-studio.." 98 | 99 | cmake .. -DCMAKE_OSX_DEPLOYMENT_TARGET=10.11 -DQTDIR="/tmp/obsdeps" -DDepsPath="/tmp/obsdeps" \ 100 | -DBUILD_CAPTIONS=OFF -DDISABLE_PLUGINS=true -DENABLE_SCRIPTING=0 101 | make -j4 102 | - name: Configure and build plugin 103 | shell: bash 104 | run: | 105 | brew install fftw 106 | cd ${{ github.workspace }} 107 | echo "=> Building plugin for macOS." 108 | echo "GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV 109 | mkdir -p build && cd build 110 | cmake .. \ 111 | -DQTDIR=/tmp/obsdeps \ 112 | -DLIBOBS_INCLUDE_DIR=${{ github.workspace }}/obs-studio/libobs \ 113 | -DLIBOBS_LIB=${{ github.workspace }}/obs-studio/build/libobs/libobs.dylib \ 114 | -DOBS_FRONTEND_LIB:STRING="${{ github.workspace }}/obs-studio/build/UI/obs-frontend-api/libobs-frontend-api.dylib" \ 115 | -DCMAKE_BUILD_TYPE=RelWithDebInfo \ 116 | -DCMAKE_INSTALL_PREFIX=/usr \ 117 | && make -j4 118 | - name: 'Install prerequisite: Packages app' 119 | if: success() 120 | shell: bash 121 | run: | 122 | curl -L -O https://s3-us-west-2.amazonaws.com/obs-nightly/Packages.pkg 123 | sudo installer -pkg ./Packages.pkg -target / 124 | - name: Package 125 | working-directory: ${{ github.workspace }} 126 | if: success() 127 | shell: bash 128 | run: | 129 | echo "=> Modifying ${{ env.project-name }}.so" 130 | install_name_tool \ 131 | -change /tmp/obsdeps/lib/QtWidgets.framework/Versions/5/QtWidgets \ 132 | @executable_path/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets \ 133 | -change /tmp/obsdeps/lib/QtGui.framework/Versions/5/QtGui \ 134 | @executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui \ 135 | -change /tmp/obsdeps/lib/QtCore.framework/Versions/5/QtCore \ 136 | @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore \ 137 | ./build/lib${{ env.project-name }}.so 138 | otool -L ./build/lib${{ env.project-name }}.so 139 | packagesbuild ./package/installer-macOS.pkgproj 140 | mv ./package/build/*.pkg ./package/${{ env.project-name }}.${{ env.GIT_TAG }}.macos.pkg 141 | - name: Publish 142 | if: success() 143 | uses: actions/upload-artifact@v2-preview 144 | with: 145 | name: '${{ env.project-name }}.${{ env.GIT_TAG }}.installer.macos' 146 | path: ./package/*.pkg 147 | build-linux: 148 | name: 'Linux 64bit' 149 | runs-on: ubuntu-latest 150 | env: 151 | obs-studio-version: 26.0.2 152 | project-name: spectralizer 153 | project-git: spectralizer 154 | maintainer: uni@vrsal.cf 155 | steps: 156 | - name: Checkout 157 | uses: actions/checkout@v2 158 | with: 159 | path: ${{ github.workspace }} 160 | submodules: 'recursive' 161 | - name: 'Get ${{ env.project-git }} git info' 162 | shell: bash 163 | working-directory: ${{ github.workspace }} 164 | run: | 165 | git fetch --prune --unshallow 166 | echo "GIT_BRANCH=${{ github.event.pull_request.head.ref }}" >> $GITHUB_ENV 167 | echo "GIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV 168 | echo "GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV 169 | - name: Cache Dependencies 170 | id: cache-linux-deps 171 | uses: actions/cache@v1 172 | with: 173 | path: obs-studio 174 | key: obs-deps-${{ env.obs-studio-ref }}-linux 175 | - name: Install dependencies 176 | if: steps.cache-linux-deps.outputs.cache-hit != 'true' 177 | shell: bash 178 | run: | 179 | set -ex 180 | 181 | sudo add-apt-repository -y ppa:obsproject/obs-studio 182 | sudo apt-get -qq update 183 | 184 | sudo apt-get install -y \ 185 | libc-dev-bin \ 186 | libc6-dev git \ 187 | build-essential \ 188 | checkinstall \ 189 | libcurl4-openssl-dev \ 190 | cmake \ 191 | obs-studio \ 192 | qtbase5-dev \ 193 | libfftw3-dev \ 194 | libfftw3-bin \ 195 | libfftw3-3 196 | sudo wget -O /usr/include/obs/obs-frontend-api.h https://raw.githubusercontent.com/obsproject/obs-studio/25.0.0/UI/obs-frontend-api/obs-frontend-api.h 197 | sudo ldconfig 198 | - name: Build plugin 199 | shell: bash 200 | run: | 201 | cmake -S ${{github.workspace}} -B ${{github.workspace}}/build/ \-G "Unix Makefiles" \ 202 | -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/dist -DOBS_FRONTEND_INCLUDE=/usr/include/obs 203 | cmake --build ${{github.workspace}}/build/ --parallel 4 --target install 204 | - name: Compile deb installer 205 | shell: bash 206 | run: | # Now only build deb installer 207 | cmake ${{github.workspace}} -B ${{github.workspace}}/build \ 208 | -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=true \ 209 | -DOBS_FRONTEND_INCLUDE=/usr/include/obs -DGLOBAL_INSTALLATION=ON 210 | sudo cmake --build ${{github.workspace}}/build \ 211 | --parallel 4 \ 212 | --target install 213 | cd ${{github.workspace}} 214 | export GIT_HASH=$(git rev-parse --short HEAD) 215 | export GIT_TAG=$(git describe --tags --abbrev=0) 216 | export PKG_VERSION="1-$GIT_TAG-$GIT_HASH-git" 217 | 218 | [[ "$GITHUB_REF" =~ "^refs/tags/" ]] && export PKG_VERSION="$BRANCH_SHORT_NAME" 219 | cd ${{github.workspace}}/build 220 | echo "Packaging version ${PKG_VERSION}" 221 | PAGER="cat" sudo checkinstall -y --type=debian --fstrans=no --nodoc \ 222 | --backup=no --deldoc=yes --install=no \ 223 | --pkgname=${{ env.project-name }} --pkgversion="$PKG_VERSION" \ 224 | --pkglicense="GPLv2.0" --maintainer="${{ env.maintainer }}" \ 225 | --pkggroup="video" \ 226 | --pkgsource="https://github.com/${{ env.project-git }}" \ 227 | --requires="obs-studio \(\>= ${{ env.obs-studio-version }}\), libfftw3-3 \(\>= 3.3.4\)" \ 228 | --pakdir="../package" 229 | mv ../package/*.deb ../package/${{ env.project-name }}.${{ env.GIT_TAG }}.linux.x64.deb 230 | - name: Publish Linux binary 231 | uses: actions/upload-artifact@v2 232 | with: 233 | name: ${{ env.project-name }}.${{ env.GIT_TAG }}.bin.linux.x64 234 | path: ${{github.workspace}}/dist/**/* 235 | - name: Publish Linux installer 236 | uses: actions/upload-artifact@v2 237 | with: 238 | name: ${{ env.project-name }}.${{ env.GIT_TAG }}.installer.linux.x64 239 | path: ${{github.workspace}}/package/*.deb 240 | windows: 241 | name: 'Windows 32/64bit' 242 | runs-on: [windows-latest] 243 | env: 244 | QT_VERSION: '5.10.1' 245 | WINDOWS_DEPS_VERSION: '2017' 246 | CMAKE_GENERATOR: "Visual Studio 16 2019" 247 | CMAKE_SYSTEM_VERSION: "10.0" 248 | obs-studio-version: 26.0.2 249 | project-git: spectralizer 250 | project-name: spectralizer 251 | steps: 252 | - name: Add msbuild to PATH 253 | uses: microsoft/setup-msbuild@v1.0.2 254 | - name: Checkout 255 | uses: actions/checkout@v2 256 | with: 257 | path: ${{ github.workspace }} 258 | submodules: 'recursive' 259 | - name: 'Checkout OBS' 260 | uses: actions/checkout@v2 261 | with: 262 | repository: obsproject/obs-studio 263 | path: ${{ github.workspace }}/obs-studio 264 | submodules: 'recursive' 265 | - name: 'Get OBS-Studio git info' 266 | shell: bash 267 | working-directory: ${{ github.workspace }}/obs-studio 268 | run: | 269 | git fetch --prune --unshallow 270 | echo "OBS_GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV 271 | echo "OBS_GIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV 272 | echo "OBS_GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV 273 | - name: 'Checkout last OBS-Studio release (${{ env.OBS_GIT_TAG }})' 274 | shell: bash 275 | working-directory: ${{ github.workspace }}/obs-studio 276 | run: | 277 | git checkout ${{ env.OBS_GIT_TAG }} 278 | git submodule update 279 | - name: 'Get ${{ env.project-git }} git info' 280 | shell: bash 281 | working-directory: ${{ github.workspace }} 282 | run: | 283 | git fetch --prune --unshallow 284 | echo "GIT_BRANCH=${{ github.event.pull_request.head.ref }}" >> $GITHUB_ENV 285 | echo "GIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV 286 | echo "GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV 287 | - name: 'Install prerequisite: QT' 288 | run: | 289 | curl -kLO https://cdn-fastly.obsproject.com/downloads/Qt_${{ env.QT_VERSION }}.7z -f --retry 5 -C - 290 | 7z x Qt_${{ env.QT_VERSION }}.7z -o"${{ github.workspace }}\cmbuild\QT" 291 | - name: 'Install prerequisite: Pre-built OBS dependencies' 292 | run: | 293 | curl -kLO https://cdn-fastly.obsproject.com/downloads/dependencies${{ env.WINDOWS_DEPS_VERSION }}.zip -f --retry 5 -C - 294 | 7z x dependencies${{ env.WINDOWS_DEPS_VERSION }}.zip -o"${{ github.workspace }}\cmbuild\deps" 295 | - name: 'Restore OBS 32-bit build v${{ env.OBS_GIT_TAG }} from cache' 296 | id: build-cache-obs-32 297 | uses: actions/cache@v1 298 | env: 299 | CACHE_NAME: 'build-cache-obs-32' 300 | with: 301 | path: ${{ github.workspace }}/obs-studio/build32 302 | key: ${{ runner.os }}-${{ env.CACHE_NAME }}-${{ env.OBS_GIT_TAG }} 303 | restore-keys: | 304 | ${{ runner.os }}-${{ env.CACHE_NAME }}- 305 | - name: 'Configure OBS 32-bit' 306 | if: steps.build-cache-obs-32.outputs.cache-hit != 'true' 307 | working-directory: ${{ github.workspace }}/obs-studio 308 | shell: powershell 309 | run: | 310 | New-Item -ItemType Directory -Force -Path .\build32 311 | cd .\build32 312 | cmake -G "${{ env.CMAKE_GENERATOR }}" -A Win32 -DCMAKE_SYSTEM_VERSION="${{ env.CMAKE_SYSTEM_VERSION }}" -DQTDIR="${{ github.workspace }}\cmbuild\QT\${{ env.QT_VERSION }}\msvc2017" -DDepsPath="${{ github.workspace }}\cmbuild\deps\win32" -DBUILD_CAPTIONS=YES -DCOPIED_DEPENDENCIES=NO -DCOPY_DEPENDENCIES=YES .. 313 | - name: 'Build OBS-Studio 32-bit' 314 | if: steps.build-cache-obs-32.outputs.cache-hit != 'true' 315 | working-directory: ${{ github.workspace }}/obs-studio 316 | run: | 317 | msbuild /m /p:Configuration=RelWithDebInfo .\build32\libobs\libobs.vcxproj 318 | msbuild /m /p:Configuration=RelWithDebInfo .\build32\UI\obs-frontend-api\obs-frontend-api.vcxproj 319 | - name: 'Restore OBS 64-bit build v${{ env.OBS_GIT_TAG }} from cache' 320 | id: build-cache-obs-64 321 | uses: actions/cache@v1 322 | env: 323 | CACHE_NAME: 'build-cache-obs-64' 324 | with: 325 | path: ${{ github.workspace }}/obs-studio/build64 326 | key: ${{ runner.os }}-${{ env.CACHE_NAME }}-${{ env.OBS_GIT_TAG }} 327 | restore-keys: | 328 | ${{ runner.os }}-${{ env.CACHE_NAME }}- 329 | - name: 'Configure OBS 64-bit' 330 | if: steps.build-cache-obs-64.outputs.cache-hit != 'true' 331 | working-directory: ${{ github.workspace }}/obs-studio 332 | shell: powershell 333 | run: | 334 | New-Item -ItemType Directory -Force -Path .\build64 335 | cd .\build64 336 | cmake -G "${{ env.CMAKE_GENERATOR }}" -A x64 -DCMAKE_SYSTEM_VERSION="${{ env.CMAKE_SYSTEM_VERSION }}" -DQTDIR="${{ github.workspace }}\cmbuild\QT\${{ env.QT_VERSION }}\msvc2017_64" -DDepsPath="${{ github.workspace }}\cmbuild\deps\win64" -DBUILD_CAPTIONS=YES -DCOPIED_DEPENDENCIES=NO -DCOPY_DEPENDENCIES=YES .. 337 | - name: 'Build OBS-Studio 64-bit' 338 | if: steps.build-cache-obs-64.outputs.cache-hit != 'true' 339 | working-directory: ${{ github.workspace }}/obs-studio 340 | run: | 341 | msbuild /m /p:Configuration=RelWithDebInfo .\build64\libobs\libobs.vcxproj 342 | msbuild /m /p:Configuration=RelWithDebInfo .\build64\UI\obs-frontend-api\obs-frontend-api.vcxproj 343 | - name: 'Configure ${{ env.project-git }} 64-bit' 344 | working-directory: ${{ github.workspace }} 345 | run: | 346 | mkdir .\build64 347 | cd .\build64 348 | cmake -G "${{ env.CMAKE_GENERATOR }}" -A x64 -DCMAKE_SYSTEM_VERSION="${{ env.CMAKE_SYSTEM_VERSION }}" ` 349 | -DQTDIR="${{ github.workspace }}\cmbuild\QT\${{ env.QT_VERSION }}\msvc2017_64" ` 350 | -DDepsPath="${{ github.workspace }}\cmbuild\deps\win64" ` 351 | -DLibObs_DIR="${{ github.workspace }}\obs-studio\build64\libobs" ` 352 | -DLIBOBS_INCLUDE_DIR="${{ github.workspace }}\obs-studio\libobs" ` 353 | -DFFTW_INCLUDE_DIRS="${{ github.workspace }}\fftw3\include" ` 354 | -DFFTW_LIBRARIES="${{ github.workspace }}\fftw3\bin\64bit\libfftw3-3.lib" ` 355 | -DLIBOBS_LIB="${{ github.workspace }}\obs-studio\build64\libobs\RelWithDebInfo\obs.lib" ` 356 | -DOBS_FRONTEND_LIB="${{ github.workspace }}\obs-studio\build64\UI\obs-frontend-api\RelWithDebInfo\obs-frontend-api.lib" ` 357 | -DW32_PTHREADS_LIB="${{ github.workspace }}\obs-studio\build64\deps\w32-pthreads\RelWithDebInfo\w32-pthreads.lib" .. 358 | - name: 'Configure ${{ env.project-git }} 32-bit' 359 | working-directory: ${{ github.workspace }} 360 | run: | 361 | mkdir .\build32 362 | cd .\build32 363 | cmake -G "${{ env.CMAKE_GENERATOR }}" -A Win32 -DCMAKE_SYSTEM_VERSION="${{ env.CMAKE_SYSTEM_VERSION }}" ` 364 | -DQTDIR="${{ github.workspace }}\cmbuild\QT\${{ env.QT_VERSION }}\msvc2017" ` 365 | -DDepsPath="${{ github.workspace }}\cmbuild\deps\win32" ` 366 | -DLibObs_DIR="${{ github.workspace }}\obs-studio\build32\libobs" ` 367 | -DLIBOBS_INCLUDE_DIR="${{ github.workspace }}\obs-studio\libobs" ` 368 | -DFFTW_INCLUDE_DIRS="${{ github.workspace }}\fftw3\include" ` 369 | -DFFTW_LIBRARIES="${{ github.workspace }}\fftw3\bin\32bit\libfftw3-3.lib" ` 370 | -DLIBOBS_LIB="${{ github.workspace }}\obs-studio\build32\libobs\RelWithDebInfo\obs.lib" ` 371 | -DOBS_FRONTEND_LIB="${{ github.workspace }}\obs-studio\build32\UI\obs-frontend-api\RelWithDebInfo\obs-frontend-api.lib" ` 372 | -DW32_PTHREADS_LIB="${{ github.workspace }}\obs-studio\build32\deps\w32-pthreads\RelWithDebInfo\w32-pthreads.lib" .. 373 | - name: 'Build ${{ env.project-git }} 64-bit' 374 | working-directory: ${{ github.workspace }} 375 | run: msbuild /m /p:Configuration=RelWithDebInfo .\build64\${{ env.project-name }}.sln 376 | - name: 'Build ${{ env.project-git }} 32-bit' 377 | working-directory: ${{ github.workspace }} 378 | run: msbuild /m /p:Configuration=RelWithDebInfo .\build32\${{ env.project-name }}.sln 379 | - name: 'Package ${{ env.project-git }}' 380 | working-directory: ${{ github.workspace }} 381 | run: | 382 | mkdir release\obs-plugins\64bit 383 | mkdir release\obs-plugins\32bit 384 | mkdir release\data\obs-plugins\${{ env.project-name }}\ 385 | 386 | robocopy .\build64\RelWithDebInfo .\release\obs-plugins\64bit\ ${{ env.project-name }}.dll ${{ env.project-name }}.pdb 387 | robocopy .\build32\RelWithDebInfo .\release\obs-plugins\32bit\ ${{ env.project-name }}.dll ${{ env.project-name }}.pdb 388 | robocopy .\fftw3\bin\64bit\ .\release\obs-plugins\64bit\ libfftw3-3.dll 389 | robocopy .\fftw3\bin\32bit\ .\release\obs-plugins\32bit\ libfftw3-3.dll 390 | robocopy /E .\data .\release\data\obs-plugins\${{ env.project-name }} 391 | robocopy .\package .\release README.txt 392 | 393 | cd ${{ github.workspace }} 394 | iscc .\package\installer-Windows.iss /O. /F"${{ env.project-name }}.${{ env.GIT_TAG }}.installer.windows" 395 | - name: 'Publish Windows binary' 396 | if: success() 397 | uses: actions/upload-artifact@v2-preview 398 | with: 399 | name: '${{ env.project-name }}.${{ env.GIT_TAG }}.bin.windows' 400 | path: ${{ github.workspace }}\release\**\* 401 | - name: 'Publish Windows installer' 402 | if: success() 403 | uses: actions/upload-artifact@v2-preview 404 | with: 405 | name: '${{ env.project-name }}.${{ env.GIT_TAG }}.installer.windows' 406 | path: ${{ github.workspace }}/*.exe 407 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Prerequisites 2 | *.d 3 | *.iss 4 | *.pkgproj 5 | *.user 6 | build*/ 7 | README.txt 8 | # Compiled Object files 9 | *.slo 10 | *.lo 11 | *.o 12 | *.obj 13 | 14 | # Precompiled Headers 15 | *.gch 16 | *.pch 17 | 18 | # Compiled Dynamic libraries 19 | *.so 20 | *.dylib 21 | *.dll 22 | 23 | # Fortran module files 24 | *.mod 25 | *.smod 26 | 27 | # Compiled Static libraries 28 | *.lai 29 | *.la 30 | *.a 31 | *.lib 32 | 33 | # misc 34 | *.zip 35 | .DS_Store 36 | # Executables 37 | *.exe 38 | *.out 39 | *.app 40 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.5) 2 | project(spectralizer VERSION 1.3.4) 3 | set(PLUGIN_AUTHOR "univrsal") 4 | set(PLUGIN_GIT spectralizer) 5 | set(LINUX_MAINTAINER_EMAIL "uni@vrsal.cf") 6 | set(MACOS_BUNDLEID "cf.vrsal.spectralizer") 7 | set(CMAKE_CXX_STANDARD 11) 8 | set(CMAKE_PREFIX_PATH "${QTDIR}") 9 | string(TIMESTAMP TODAY "%Y.%m.%d %H:%M") 10 | add_definitions(-DBUILD_TIME="${TODAY}") 11 | add_definitions(-DSPECTRALIZER_VERSION="${PROJECT_VERSION}") 12 | 13 | 14 | if (WIN32 OR APPLE) 15 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake") 16 | endif() 17 | 18 | option(LOCAL_INSTALLATION "Whether to install for the current user (default: OFF)" OFF) 19 | option(GLOBAL_INSTALLATION "Whether to install for all users (default: OFF)" OFF) 20 | option(USE_CMAKE_LIBDIR "Whether to use install to the cmake defined library directory, which breaks on ubuntu. (default: OFF)" OFF) 21 | 22 | if (MSVC) 23 | set(spectralizer_PLATFORM_DEPS 24 | ${W32_PTHREADS_LIB}) 25 | endif () 26 | 27 | if ("${CMAKE_SYSTEM_NAME}" MATCHES "Linux") 28 | add_definitions(-DLINUX=1) 29 | add_definitions(-DUNIX=1) 30 | endif () 31 | 32 | find_package(LibObs REQUIRED) 33 | find_path(FFTW_INCLUDE_DIRS fftw3.h) 34 | find_library(FFTW_LIBRARIES fftw3) 35 | 36 | configure_file( 37 | package/installer-macOS.pkgproj.in 38 | ${CMAKE_SOURCE_DIR}/package/installer-macOS.pkgproj 39 | ) 40 | configure_file( 41 | package/installer-Windows.iss.in 42 | ${CMAKE_SOURCE_DIR}/package/installer-Windows.iss 43 | ) 44 | configure_file( 45 | package/README.txt.in 46 | ${CMAKE_SOURCE_DIR}/package/README.txt 47 | ) 48 | 49 | set(spectralizer_SOURCES 50 | src/spectralizer.cpp 51 | src/source/visualizer_source.cpp 52 | src/source/visualizer_source.hpp 53 | src/util/util.hpp 54 | src/util/util.cpp 55 | src/util/audio/spectrum_visualizer.cpp 56 | src/util/audio/spectrum_visualizer.hpp 57 | src/util/audio/bar_visualizer.cpp 58 | src/util/audio/bar_visualizer.hpp 59 | src/util/audio/circle_bar_visualizer.cpp 60 | src/util/audio/circle_bar_visualizer.hpp 61 | src/util/audio/wire_visualizer.cpp 62 | src/util/audio/wire_visualizer.hpp 63 | src/util/audio/fifo.cpp 64 | src/util/audio/fifo.hpp 65 | src/util/audio/obs_internal_source.cpp 66 | src/util/audio/obs_internal_source.hpp 67 | src/util/audio/audio_visualizer.cpp 68 | src/util/audio/audio_visualizer.hpp 69 | src/util/audio/audio_source.hpp) 70 | 71 | if (APPLE) 72 | add_definitions(-DMACOS=1) 73 | endif() 74 | 75 | add_library(spectralizer MODULE 76 | ${spectralizer_SOURCES}) 77 | 78 | target_link_libraries(spectralizer 79 | ${LIBOBS_LIBRARIES} 80 | ${FFTW_LIBRARIES} 81 | ${OBS_FRONTEND_LIB} 82 | ${spectralizer_PLATFORM_DEPS}) 83 | 84 | include_directories(${FFTW_INCLUDE_DIRS} 85 | "${LIBOBS_INCLUDE_DIR}/../UI/obs-frontend-api" 86 | ${LIBOBS_INCLUDE_DIR} 87 | ) 88 | 89 | # Installation stuff 90 | 91 | if(CMAKE_SIZEOF_VOID_P EQUAL 8) 92 | set(ARCH_NAME "64bit") 93 | set(OBS_BUILDDIR_ARCH "build64") 94 | else() 95 | set(ARCH_NAME "32bit") 96 | set(OBS_BUILDDIR_ARCH "build32") 97 | endif() 98 | 99 | if(WIN32) 100 | # Enable Multicore Builds and disable FH4 (to not depend on VCRUNTIME140_1.DLL when building with VS2019) 101 | if (MSVC) 102 | add_definitions(/MP /d2FH4-) 103 | endif() 104 | 105 | include_directories( 106 | "${LIBOBS_INCLUDE_DIR}" 107 | ) 108 | 109 | target_link_libraries(${CMAKE_PROJECT_NAME} 110 | "${OBS_FRONTEND_LIB}" 111 | ) 112 | 113 | if(CMAKE_SIZEOF_VOID_P EQUAL 8) 114 | set(ARCH_NAME "64bit") 115 | set(OBS_BUILDDIR_ARCH "build64") 116 | else() 117 | set(ARCH_NAME "32bit") 118 | set(OBS_BUILDDIR_ARCH "build32") 119 | endif() 120 | 121 | get_filename_component(LibOBS_DIR ${LIBOBS_LIB} DIRECTORY) 122 | 123 | add_custom_command(TARGET ${CMAKE_PROJECT_NAME} POST_BUILD 124 | # Copy to obs-studio dev environment for immediate testing 125 | COMMAND 126 | "${CMAKE_COMMAND}" -E copy 127 | "$" 128 | "${LibOBS_DIR}/../../rundir/$/obs-plugins/${ARCH_NAME}" 129 | 130 | COMMAND 131 | "${CMAKE_COMMAND}" -E copy 132 | "$" 133 | "${LibOBS_DIR}/../../rundir/$/obs-plugins/${ARCH_NAME}" 134 | 135 | COMMAND 136 | "${CMAKE_COMMAND}" -E make_directory 137 | "${LibOBS_DIR}/../../rundir/$/data/obs-plugins/${CMAKE_PROJECT_NAME}" 138 | 139 | COMMAND 140 | "${CMAKE_COMMAND}" -E copy_directory 141 | "${CMAKE_CURRENT_SOURCE_DIR}/data" 142 | "${LibOBS_DIR}/../../rundir/$/data/obs-plugins/${CMAKE_PROJECT_NAME}" 143 | COMMAND 144 | ${CMAKE_COMMAND} -E copy 145 | "${CMAKE_CURRENT_SOURCE_DIR}/fftw3/bin/${ARCH_NAME}/libfftw3-3.dll" 146 | "${LibOBS_DIR}/../../rundir/$/obs-plugins/${ARCH_NAME}" 147 | ) 148 | elseif(UNIX AND NOT APPLE) 149 | include(GNUInstallDirs) 150 | 151 | set_target_properties(${CMAKE_PROJECT_NAME} PROPERTIES PREFIX "") 152 | target_link_libraries(${CMAKE_PROJECT_NAME} obs-frontend-api) 153 | 154 | if (LOCAL_INSTALLATION) 155 | # Installs into home directory 156 | install(TARGETS ${CMAKE_PROJECT_NAME} 157 | LIBRARY DESTINATION "$ENV{HOME}/.config/obs-studio/plugins/${CMAKE_PROJECT_NAME}/bin/${ARCH_NAME}") 158 | 159 | install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data 160 | DESTINATION "$ENV{HOME}/.config/obs-studio/plugins/${CMAKE_PROJECT_NAME}") 161 | elseif(GLOBAL_INSTALLATION) 162 | # For *.deb installer 163 | if (USE_CMAKE_LIBDIR) 164 | install(TARGETS ${CMAKE_PROJECT_NAME} 165 | LIBRARY DESTINATION "lib/obs-plugins") # hardcoded, since ubuntu uses the wrong path by default 166 | else() 167 | install(TARGETS ${CMAKE_PROJECT_NAME} 168 | LIBRARY DESTINATION "/usr/lib/obs-plugins") 169 | endif() 170 | 171 | file(GLOB locale_files ${CMAKE_SOURCE_DIR}/data/locale/*.ini) 172 | file(GLOB other_files ${CMAKE_SOURCE_DIR}/data/*.*) 173 | 174 | install(FILES ${locale_files} 175 | DESTINATION "${CMAKE_INSTALL_FULL_DATAROOTDIR}/obs/obs-plugins/${CMAKE_PROJECT_NAME}/locale") 176 | install(FILES ${other_files} 177 | DESTINATION "${CMAKE_INSTALL_FULL_DATAROOTDIR}/obs/obs-plugins/${CMAKE_PROJECT_NAME}") 178 | else() 179 | # For *.zip binary 180 | install(TARGETS ${CMAKE_PROJECT_NAME} 181 | LIBRARY DESTINATION "${CMAKE_PROJECT_NAME}/bin/${ARCH_NAME}") 182 | 183 | install(DIRECTORY ${CMAKE_SOURCE_DIR}/data 184 | DESTINATION "${CMAKE_PROJECT_NAME}") 185 | 186 | install(FILES "${CMAKE_SOURCE_DIR}/package/README.txt" 187 | DESTINATION "${CMAKE_PROJECT_NAME}") 188 | endif() 189 | elseif(APPLE) 190 | if (LOCAL_INSTALLATION) 191 | # Installs into home directory 192 | install(TARGETS ${CMAKE_PROJECT_NAME} 193 | LIBRARY DESTINATION "$ENV{HOME}/Library/Application Support/obs-studio/plugins/${CMAKE_PROJECT_NAME}/bin/") 194 | 195 | install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data 196 | DESTINATION "$ENV{HOME}/Library/Application Support/obs-studio/plugins/${CMAKE_PROJECT_NAME}") 197 | endif() 198 | endif() 199 | -------------------------------------------------------------------------------- /COPYING.txt: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc. 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Library General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | 294 | Copyright (C) 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License 307 | along with this program; if not, write to the Free Software 308 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA 309 | 310 | 311 | Also add information on how to contact you by electronic and paper mail. 312 | 313 | If the program is interactive, make it output a short notice like this 314 | when it starts in an interactive mode: 315 | 316 | Gnomovision version 69, Copyright (C) year name of author 317 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 318 | This is free software, and you are welcome to redistribute it 319 | under certain conditions; type `show c' for details. 320 | 321 | The hypothetical commands `show w' and `show c' should show the appropriate 322 | parts of the General Public License. Of course, the commands you use may 323 | be called something other than `show w' and `show c'; they could even be 324 | mouse-clicks or menu items--whatever suits your program. 325 | 326 | You should also get your employer (if you work as a programmer) or your 327 | school, if any, to sign a "copyright disclaimer" for the program, if 328 | necessary. Here is a sample; alter the names: 329 | 330 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 331 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 332 | 333 | , 1 April 1989 334 | Ty Coon, President of Vice 335 | 336 | This General Public License does not permit incorporating your program into 337 | proprietary programs. If your program is a subroutine library, you may 338 | consider it more useful to permit linking proprietary applications with the 339 | library. If this is what you want to do, use the GNU Library General 340 | Public License instead of this License. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Spectralizer 2 | ### Spectralizer will not be developed anymore, if you're looking for an excellent replacement check out [Waveform](https://obsproject.com/forum/resources/waveform.1423/). 3 | 4 | ![nightly](https://github.com/univrsal/spectralizer/workflows/nightly/badge.svg) 5 | 6 | Audio visualization for [obs-studio](https://obsproject.com/) using [fftw](http://fftw.org/), based on [cli-visualizer](https://github.com/dpayne/cli-visualizer) 7 | 8 | Allows for vizualisation of [MPD](https://www.musicpd.org/) and internal obs audio sources. 9 | 10 | Issues have moved to [git.vrsal.xyz/alex/spectralizer/issues](https://git.vrsal.xyz/alex/spectralizer/issues). You can submit new ones under [bugs.vrsal.xyz/alex/spectralizer](https://bugs.vrsal.xyz/alex/spectralizer) and comment under bugs.vrsal.xyz/alex/tuna/[issue number] (for example https://bugs.vrsal.xyz/alex/spectralizer/63 for [this](https://git.vrsal.xyz/alex/spectralizer/issues/63) issue) 11 | 12 | ![demo](https://i.imgur.com/3QyBqgb.png) 13 | -------------------------------------------------------------------------------- /cmake/FindLibObs.cmake: -------------------------------------------------------------------------------- 1 | # This module can be copied and used by external plugins for OBS 2 | # 3 | # Once done these will be defined: 4 | # 5 | # LIBOBS_FOUND 6 | # LIBOBS_INCLUDE_DIRS 7 | # LIBOBS_LIBRARIES 8 | 9 | find_package(PkgConfig QUIET) 10 | if (PKG_CONFIG_FOUND) 11 | pkg_check_modules(_OBS QUIET obs libobs) 12 | endif() 13 | 14 | if(CMAKE_SIZEOF_VOID_P EQUAL 8) 15 | set(_lib_suffix 64) 16 | else() 17 | set(_lib_suffix 32) 18 | endif() 19 | 20 | if(DEFINED CMAKE_BUILD_TYPE) 21 | if(CMAKE_BUILD_TYPE STREQUAL "Debug") 22 | set(_build_type_base "debug") 23 | else() 24 | set(_build_type_base "release") 25 | endif() 26 | endif() 27 | 28 | find_path(LIBOBS_INCLUDE_DIR 29 | NAMES obs.h 30 | HINTS 31 | ENV obsPath${_lib_suffix} 32 | ENV obsPath 33 | ${obsPath} 34 | PATHS 35 | /usr/include /usr/local/include /opt/local/include /sw/include 36 | PATH_SUFFIXES 37 | libobs 38 | ) 39 | 40 | function(find_obs_lib base_name repo_build_path lib_name) 41 | string(TOUPPER "${base_name}" base_name_u) 42 | 43 | if(DEFINED _build_type_base) 44 | set(_build_type_${repo_build_path} "${_build_type_base}/${repo_build_path}") 45 | set(_build_type_${repo_build_path}${_lib_suffix} "${_build_type_base}${_lib_suffix}/${repo_build_path}") 46 | endif() 47 | 48 | find_library(${base_name_u}_LIB 49 | NAMES ${_${base_name_u}_LIBRARIES} ${lib_name} lib${lib_name} 50 | HINTS 51 | ENV obsPath${_lib_suffix} 52 | ENV obsPath 53 | ${obsPath} 54 | ${_${base_name_u}_LIBRARY_DIRS} 55 | PATHS 56 | /usr/lib /usr/local/lib /opt/local/lib /sw/lib 57 | PATH_SUFFIXES 58 | lib${_lib_suffix} lib 59 | libs${_lib_suffix} libs 60 | bin${_lib_suffix} bin 61 | ../lib${_lib_suffix} ../lib 62 | ../libs${_lib_suffix} ../libs 63 | ../bin${_lib_suffix} ../bin 64 | # base repo non-msvc-specific search paths 65 | ${_build_type_${repo_build_path}} 66 | ${_build_type_${repo_build_path}${_lib_suffix}} 67 | build/${repo_build_path} 68 | build${_lib_suffix}/${repo_build_path} 69 | # base repo msvc-specific search paths on windows 70 | build${_lib_suffix}/${repo_build_path}/Debug 71 | build${_lib_suffix}/${repo_build_path}/RelWithDebInfo 72 | build/${repo_build_path}/Debug 73 | build/${repo_build_path}/RelWithDebInfo 74 | ) 75 | endfunction() 76 | 77 | find_obs_lib(LIBOBS libobs obs) 78 | 79 | if(MSVC) 80 | find_obs_lib(W32_PTHREADS deps/w32-pthreads w32-pthreads) 81 | endif() 82 | 83 | include(FindPackageHandleStandardArgs) 84 | find_package_handle_standard_args(Libobs DEFAULT_MSG LIBOBS_LIB LIBOBS_INCLUDE_DIR) 85 | mark_as_advanced(LIBOBS_INCLUDE_DIR LIBOBS_LIB) 86 | 87 | if(LIBOBS_FOUND) 88 | if(MSVC) 89 | if (NOT DEFINED W32_PTHREADS_LIB) 90 | message(FATAL_ERROR "Could not find the w32-pthreads library" ) 91 | endif() 92 | 93 | set(W32_PTHREADS_INCLUDE_DIR ${LIBOBS_INCLUDE_DIR}/../deps/w32-pthreads) 94 | endif() 95 | 96 | set(LIBOBS_INCLUDE_DIRS ${LIBOBS_INCLUDE_DIR} ${W32_PTHREADS_INCLUDE_DIR}) 97 | set(LIBOBS_LIBRARIES ${LIBOBS_LIB} ${W32_PTHREADS_LIB}) 98 | include(${LIBOBS_INCLUDE_DIR}/../cmake/external/ObsPluginHelpers.cmake) 99 | 100 | # allows external plugins to easily use/share common dependencies that are often included with libobs (such as FFmpeg) 101 | if(NOT DEFINED INCLUDED_LIBOBS_CMAKE_MODULES) 102 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${LIBOBS_INCLUDE_DIR}/../cmake/Modules/") 103 | set(INCLUDED_LIBOBS_CMAKE_MODULES true) 104 | endif() 105 | else() 106 | message(FATAL_ERROR "Could not find the libobs library" ) 107 | endif() 108 | -------------------------------------------------------------------------------- /data/locale/en-US.ini: -------------------------------------------------------------------------------- 1 | Spectralizer.Source="Spectralizer" 2 | Spectralizer.Mode="Mode" 3 | Spectralizer.Mode.Bars="Bars" 4 | Spectralizer.Mode.Circle.Bars="Circular bars" 5 | Spectralizer.Offset="Offset" 6 | Spectralizer.Padding="Padding" 7 | Spectralizer.Mode.Wire="Wire" 8 | Spectralizer.Wire.Thickness="Wire thickness" 9 | Spectralizer.Wire.Mode="Wire mode" 10 | Spectralizer.Wire.Mode.Thin="Thin line" 11 | Spectralizer.Wire.Mode.Thick="Custom thickness" 12 | Spectralizer.Wire.Mode.Fill="Filled" 13 | Spectralizer.Wire.Mode.Fill.Invert="Inverted Fill" 14 | Spectralizer.Stereo="Stereo" 15 | Spectralizer.Stereo.Space="Stereo space" 16 | Spectralizer.Detail="Detail" 17 | Spectralizer.RefreshRate="Refresh rate" 18 | Spectralizer.AudioSource="Audio source" 19 | Spectralizer.AudioSource.None="None" 20 | Spectralizer.Source.Fifo="MPD Fifo" 21 | Spectralizer.Source.Fifo.Path="MPD Fifo path" 22 | Spectralizer.AutoClear="Fix falloff with JACK" 23 | Spectralizer.Gravity="Gravity" 24 | Spectralizer.Falloff="Falloff" 25 | Spectralizer.Integral="Smoothing" 26 | Spectralizer.Sensitivity="Sensitivity" 27 | Spectralizer.Bar.Width="Bar width" 28 | Spectralizer.Bar.Height="Bar height" 29 | Spectralizer.Bar.Space="Bar spacing" 30 | Spectralizer.Corner.Rounding="Use round corners" 31 | Spectralizer.Corner.Points="Corner points" 32 | Spectralizer.Corner.Radius="Corner radius" 33 | Spectralizer.Wire.Height="Wire height" 34 | Spectralizer.Wire.Space="Wire point spacing" 35 | Spectralizer.SampleRate="Sample rate" 36 | Spectralizer.Color="Color" 37 | Spectralizer.Filter.Mode="Filter" 38 | Spectralizer.Filter.None="None" 39 | Spectralizer.Filter.Monstercat="Monstercat filter" 40 | Spectralizer.Filter.SGS="SGS Filter" 41 | Spectralizer.Filter.SGS.Passes="Filter passes" 42 | Spectralizer.Filter.SGS.Points="Filter points" 43 | Spectralizer.Filter.Strength="Filter strength" 44 | Spectralizer.Use.AutoScale="Enable automatic scaling" 45 | Spectralizer.Scale.Size="Scale size" 46 | Spectralizer.Scale.Boost="Scale boost" 47 | Spectralizer.LogFreqScale.Enable="Logarithmic frequency scale" 48 | Spectralizer.LogFreqScale.Quality="Log scale quality" 49 | Spectralizer.LogFreqScale.Quality.Fast="Fast" 50 | Spectralizer.LogFreqScale.Quality.Precise="Precise" 51 | Spectralizer.LogFreqScale.Start="Log scale start freq" 52 | Spectralizer.LogFreqScale.UseHPF="Apply HPF to log scale" 53 | Spectralizer.LogFreqScale.HPFCurve="Log scale HPF curve" 54 | -------------------------------------------------------------------------------- /data/locale/ko-KR.ini: -------------------------------------------------------------------------------- 1 | Spectralizer.Source="오디오 비주얼라이저" 2 | Spectralizer.Mode="모드" 3 | Spectralizer.Mode.Bars="막대" 4 | Spectralizer.Mode.Wire="와이어" 5 | Spectralizer.Stereo="스테레오" 6 | Spectralizer.Stereo.Space="스테레오 간격" 7 | Spectralizer.Detail="막대 개수" 8 | Spectralizer.AudioSource="오디오 소스" 9 | Spectralizer.AudioSource.None="없음" 10 | Spectralizer.Source.Fifo="MPD Fifo" 11 | Spectralizer.Source.Fifo.Path="MPD Fifo 경로" 12 | Spectralizer.AutoClear="JACK으로 낙하 수정" 13 | Spectralizer.Gravity="중력" 14 | Spectralizer.Falloff="낙하" 15 | Spectralizer.Integral="부드러움" 16 | Spectralizer.Sensitivity="민감도" 17 | Spectralizer.Bar.Width="막대 너비" 18 | Spectralizer.Bar.Height="막대 높이" 19 | Spectralizer.Bar.Space="막대 간격" 20 | Spectralizer.SampleRate="샘플 레이트" 21 | Spectralizer.Color="색" 22 | Spectralizer.Filter.Mode="필터" 23 | Spectralizer.Filter.None="없음" 24 | Spectralizer.Filter.Monstercat="몬스터캣 필터" 25 | Spectralizer.Filter.SGS="SGS 필터" 26 | Spectralizer.Filter.SGS.Passes="필터 패스" 27 | Spectralizer.Filter.SGS.Points="필터 포인트" 28 | Spectralizer.Filter.Strength="필터 강도" 29 | -------------------------------------------------------------------------------- /data/locale/ru-RU.ini: -------------------------------------------------------------------------------- 1 | Spectralizer.Source="Аудио визуализатор" 2 | Spectralizer.Mode="Режим" 3 | Spectralizer.Mode.Bars="бары" 4 | Spectralizer.Mode.Wire="провода" 5 | Spectralizer.Wire.Thickness="Толщина провода" 6 | Spectralizer.Wire.Mode="Проводной режим" 7 | Spectralizer.Wire.Mode.Thin="Тонкая линия" 8 | Spectralizer.Wire.Mode.Thick="Пользовательская толщина" 9 | Spectralizer.Wire.Mode.Fill="Заполнение" 10 | Spectralizer.Wire.Mode.Fill.Invert="Перевернутая заливка" 11 | Spectralizer.Stereo="Стерео" 12 | Spectralizer.Stereo.Space="Стерео пространство" 13 | Spectralizer.Detail="подробности" 14 | Spectralizer.RefreshRate="Частота обновления" 15 | Spectralizer.AudioSource="Источник аудио" 16 | Spectralizer.AudioSource.None="нечего" 17 | Spectralizer.Source.Fifo="MPD Fifo" 18 | Spectralizer.Source.Fifo.Path="MPD Fifo path" 19 | Spectralizer.AutoClear="Исправить падение с JACK" 20 | Spectralizer.Gravity="Сила тяжести" 21 | Spectralizer.Falloff="спад" 22 | Spectralizer.Integral="сглаживание" 23 | Spectralizer.Sensitivity="чувствительность" 24 | Spectralizer.Bar.Width="Ширина полосы" 25 | Spectralizer.Bar.Height="Высота полосы" 26 | Spectralizer.Bar.Space="Расстояние между барами" 27 | Spectralizer.Wire.Height="Высота провода" 28 | Spectralizer.Wire.Space="Расстояние между точками проволоки" 29 | Spectralizer.SampleRate="Частота дискретизации" 30 | Spectralizer.Color="цвет" 31 | Spectralizer.Filter.Mode="Фильтр" 32 | Spectralizer.Filter.None="Ничего" 33 | Spectralizer.Filter.Monstercat="Monstercat фильтр" 34 | Spectralizer.Filter.SGS="SGS Фильтр" 35 | Spectralizer.Filter.SGS.Passes="Фильтр проходит" 36 | Spectralizer.Filter.SGS.Points="Точки фильтра" 37 | Spectralizer.Filter.Strength="Сила фильтра" 38 | Spectralizer.Use.AutoScale="Включить автоматическое масштабирование" 39 | Spectralizer.Scale.Size="Размер шкалы" 40 | Spectralizer.Scale.Boost="Увеличение масштаба" 41 | -------------------------------------------------------------------------------- /data/locale/zh-CN.ini: -------------------------------------------------------------------------------- 1 | Spectralizer.Source="音波显示" 2 | Spectralizer.Mode="模式" 3 | Spectralizer.Mode.Bars="长方形" 4 | Spectralizer.Mode.Circle.Bars="圆圈" 5 | Spectralizer.Offset="旋转角度" 6 | Spectralizer.Padding="填充大小" 7 | Spectralizer.Mode.Wire="波线" 8 | Spectralizer.Wire.Thickness="线条厚度" 9 | Spectralizer.Wire.Mode="线条模式" 10 | Spectralizer.Wire.Mode.Thin="细线" 11 | Spectralizer.Wire.Mode.Thick="自定义厚度" 12 | Spectralizer.Wire.Mode.Fill="填充" 13 | Spectralizer.Wire.Mode.Fill.Invert="倒填" 14 | Spectralizer.Stereo="双声道" 15 | Spectralizer.Stereo.Space="双声道距离" 16 | Spectralizer.Detail="长度" 17 | Spectralizer.RefreshRate="刷新率" 18 | Spectralizer.AudioSource="声源" 19 | Spectralizer.AudioSource.None="无" 20 | Spectralizer.Source.Fifo="先进先出" 21 | Spectralizer.Source.Fifo.Path="MPD Fifo路径" 22 | Spectralizer.AutoClear="用千斤顶固定衰减" 23 | Spectralizer.Gravity="重力" 24 | Spectralizer.Falloff="衰减" 25 | Spectralizer.Integral="平滑" 26 | Spectralizer.Sensitivity="体贴" 27 | Spectralizer.Bar.Width="条宽" 28 | Spectralizer.Bar.Height="条高" 29 | Spectralizer.Bar.Space="条间距" 30 | Spectralizer.Corner.Rounding="使用圆角" 31 | Spectralizer.Corner.Points="角点" 32 | Spectralizer.Corner.Radius="角半径" 33 | Spectralizer.Wire.Height="线高度" 34 | Spectralizer.Wire.Space="线间距" 35 | Spectralizer.SampleRate="采样率" 36 | Spectralizer.Color="颜色" 37 | Spectralizer.Filter.Mode="滤器" 38 | Spectralizer.Filter.None="无" 39 | Spectralizer.Filter.Monstercat="怪兽猫过滤器" 40 | Spectralizer.Filter.SGS="SGS滤波器" 41 | Spectralizer.Filter.SGS.Passes="滤过" 42 | Spectralizer.Filter.SGS.Points="过滤点" 43 | Spectralizer.Filter.Strength="过滤强度" 44 | Spectralizer.Use.AutoScale="启用自动缩放" 45 | Spectralizer.Scale.Size="规模" 46 | Spectralizer.Scale.Boost="放大" 47 | Spectralizer.LogFreqScale.Enable="按赫兹划分频率" 48 | Spectralizer.LogFreqScale.Quality="原木刻度质量" 49 | Spectralizer.LogFreqScale.Quality.Fast="快速的" 50 | Spectralizer.LogFreqScale.Quality.Precise="准确的" 51 | Spectralizer.LogFreqScale.Start="对数刻度起始频率" 52 | Spectralizer.LogFreqScale.UseHPF="将HPF应用于对数刻度" 53 | Spectralizer.LogFreqScale.HPFCurve="对数标度HPF曲线" 54 | -------------------------------------------------------------------------------- /fftw3/COPYING.txt: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc. 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Library General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | 294 | Copyright (C) 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License 307 | along with this program; if not, write to the Free Software 308 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 309 | 310 | 311 | Also add information on how to contact you by electronic and paper mail. 312 | 313 | If the program is interactive, make it output a short notice like this 314 | when it starts in an interactive mode: 315 | 316 | Gnomovision version 69, Copyright (C) year name of author 317 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 318 | This is free software, and you are welcome to redistribute it 319 | under certain conditions; type `show c' for details. 320 | 321 | The hypothetical commands `show w' and `show c' should show the appropriate 322 | parts of the General Public License. Of course, the commands you use may 323 | be called something other than `show w' and `show c'; they could even be 324 | mouse-clicks or menu items--whatever suits your program. 325 | 326 | You should also get your employer (if you work as a programmer) or your 327 | school, if any, to sign a "copyright disclaimer" for the program, if 328 | necessary. Here is a sample; alter the names: 329 | 330 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 331 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 332 | 333 | , 1 April 1989 334 | Ty Coon, President of Vice 335 | 336 | This General Public License does not permit incorporating your program into 337 | proprietary programs. If your program is a subroutine library, you may 338 | consider it more useful to permit linking proprietary applications with the 339 | library. If this is what you want to do, use the GNU Library General 340 | Public License instead of this License. 341 | -------------------------------------------------------------------------------- /fftw3/COPYRIGHT.txt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2003, 2007-14 Matteo Frigo 3 | * Copyright (c) 2003, 2007-14 Massachusetts Institute of Technology 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | * 19 | */ 20 | -------------------------------------------------------------------------------- /fftw3/bin/32bit/libfftw3-3.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/univrsal/spectralizer/9cab74053a7021a41aab298d57d3245d7532d633/fftw3/bin/32bit/libfftw3-3.dll -------------------------------------------------------------------------------- /fftw3/bin/32bit/libfftw3-3.exp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/univrsal/spectralizer/9cab74053a7021a41aab298d57d3245d7532d633/fftw3/bin/32bit/libfftw3-3.exp -------------------------------------------------------------------------------- /fftw3/bin/32bit/libfftw3-3.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/univrsal/spectralizer/9cab74053a7021a41aab298d57d3245d7532d633/fftw3/bin/32bit/libfftw3-3.lib -------------------------------------------------------------------------------- /fftw3/bin/32bit/libfftw3f-3.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/univrsal/spectralizer/9cab74053a7021a41aab298d57d3245d7532d633/fftw3/bin/32bit/libfftw3f-3.dll -------------------------------------------------------------------------------- /fftw3/bin/32bit/libfftw3f-3.exp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/univrsal/spectralizer/9cab74053a7021a41aab298d57d3245d7532d633/fftw3/bin/32bit/libfftw3f-3.exp -------------------------------------------------------------------------------- /fftw3/bin/32bit/libfftw3f-3.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/univrsal/spectralizer/9cab74053a7021a41aab298d57d3245d7532d633/fftw3/bin/32bit/libfftw3f-3.lib -------------------------------------------------------------------------------- /fftw3/bin/32bit/libfftw3l-3.def: -------------------------------------------------------------------------------- 1 | LIBRARY libfftw3l-3.dll 2 | EXPORTS 3 | fftwl_alignment_of 4 | fftwl_alloc_complex 5 | fftwl_alloc_real 6 | fftwl_assertion_failed 7 | fftwl_bufdist 8 | fftwl_choose_radix 9 | fftwl_cleanup 10 | fftwl_cleanup_threads 11 | fftwl_codelet_e01_8 12 | fftwl_codelet_e10_8 13 | fftwl_codelet_hb_10 14 | fftwl_codelet_hb_12 15 | fftwl_codelet_hb_15 16 | fftwl_codelet_hb_16 17 | fftwl_codelet_hb_2 18 | fftwl_codelet_hb_20 19 | fftwl_codelet_hb2_16 20 | fftwl_codelet_hb2_20 21 | fftwl_codelet_hb2_25 22 | fftwl_codelet_hb2_32 23 | fftwl_codelet_hb2_4 24 | fftwl_codelet_hb_25 25 | fftwl_codelet_hb2_5 26 | fftwl_codelet_hb2_8 27 | fftwl_codelet_hb_3 28 | fftwl_codelet_hb_32 29 | fftwl_codelet_hb_4 30 | fftwl_codelet_hb_5 31 | fftwl_codelet_hb_6 32 | fftwl_codelet_hb_64 33 | fftwl_codelet_hb_7 34 | fftwl_codelet_hb_8 35 | fftwl_codelet_hb_9 36 | fftwl_codelet_hc2cb_10 37 | fftwl_codelet_hc2cb_12 38 | fftwl_codelet_hc2cb_16 39 | fftwl_codelet_hc2cb_2 40 | fftwl_codelet_hc2cb_20 41 | fftwl_codelet_hc2cb2_16 42 | fftwl_codelet_hc2cb2_20 43 | fftwl_codelet_hc2cb2_32 44 | fftwl_codelet_hc2cb2_4 45 | fftwl_codelet_hc2cb2_8 46 | fftwl_codelet_hc2cb_32 47 | fftwl_codelet_hc2cb_4 48 | fftwl_codelet_hc2cb_6 49 | fftwl_codelet_hc2cb_8 50 | fftwl_codelet_hc2cbdft_10 51 | fftwl_codelet_hc2cbdft_12 52 | fftwl_codelet_hc2cbdft_16 53 | fftwl_codelet_hc2cbdft_2 54 | fftwl_codelet_hc2cbdft_20 55 | fftwl_codelet_hc2cbdft2_16 56 | fftwl_codelet_hc2cbdft2_20 57 | fftwl_codelet_hc2cbdft2_32 58 | fftwl_codelet_hc2cbdft2_4 59 | fftwl_codelet_hc2cbdft2_8 60 | fftwl_codelet_hc2cbdft_32 61 | fftwl_codelet_hc2cbdft_4 62 | fftwl_codelet_hc2cbdft_6 63 | fftwl_codelet_hc2cbdft_8 64 | fftwl_codelet_hc2cf_10 65 | fftwl_codelet_hc2cf_12 66 | fftwl_codelet_hc2cf_16 67 | fftwl_codelet_hc2cf_2 68 | fftwl_codelet_hc2cf_20 69 | fftwl_codelet_hc2cf2_16 70 | fftwl_codelet_hc2cf2_20 71 | fftwl_codelet_hc2cf2_32 72 | fftwl_codelet_hc2cf2_4 73 | fftwl_codelet_hc2cf2_8 74 | fftwl_codelet_hc2cf_32 75 | fftwl_codelet_hc2cf_4 76 | fftwl_codelet_hc2cf_6 77 | fftwl_codelet_hc2cf_8 78 | fftwl_codelet_hc2cfdft_10 79 | fftwl_codelet_hc2cfdft_12 80 | fftwl_codelet_hc2cfdft_16 81 | fftwl_codelet_hc2cfdft_2 82 | fftwl_codelet_hc2cfdft_20 83 | fftwl_codelet_hc2cfdft2_16 84 | fftwl_codelet_hc2cfdft2_20 85 | fftwl_codelet_hc2cfdft2_32 86 | fftwl_codelet_hc2cfdft2_4 87 | fftwl_codelet_hc2cfdft2_8 88 | fftwl_codelet_hc2cfdft_32 89 | fftwl_codelet_hc2cfdft_4 90 | fftwl_codelet_hc2cfdft_6 91 | fftwl_codelet_hc2cfdft_8 92 | fftwl_codelet_hf_10 93 | fftwl_codelet_hf_12 94 | fftwl_codelet_hf_15 95 | fftwl_codelet_hf_16 96 | fftwl_codelet_hf_2 97 | fftwl_codelet_hf_20 98 | fftwl_codelet_hf2_16 99 | fftwl_codelet_hf2_20 100 | fftwl_codelet_hf2_25 101 | fftwl_codelet_hf2_32 102 | fftwl_codelet_hf2_4 103 | fftwl_codelet_hf_25 104 | fftwl_codelet_hf2_5 105 | fftwl_codelet_hf2_8 106 | fftwl_codelet_hf_3 107 | fftwl_codelet_hf_32 108 | fftwl_codelet_hf_4 109 | fftwl_codelet_hf_5 110 | fftwl_codelet_hf_6 111 | fftwl_codelet_hf_64 112 | fftwl_codelet_hf_7 113 | fftwl_codelet_hf_8 114 | fftwl_codelet_hf_9 115 | fftwl_codelet_n1_10 116 | fftwl_codelet_n1_11 117 | fftwl_codelet_n1_12 118 | fftwl_codelet_n1_13 119 | fftwl_codelet_n1_14 120 | fftwl_codelet_n1_15 121 | fftwl_codelet_n1_16 122 | fftwl_codelet_n1_2 123 | fftwl_codelet_n1_20 124 | fftwl_codelet_n1_25 125 | fftwl_codelet_n1_3 126 | fftwl_codelet_n1_32 127 | fftwl_codelet_n1_4 128 | fftwl_codelet_n1_5 129 | fftwl_codelet_n1_6 130 | fftwl_codelet_n1_64 131 | fftwl_codelet_n1_7 132 | fftwl_codelet_n1_8 133 | fftwl_codelet_n1_9 134 | fftwl_codelet_q1_2 135 | fftwl_codelet_q1_3 136 | fftwl_codelet_q1_4 137 | fftwl_codelet_q1_5 138 | fftwl_codelet_q1_6 139 | fftwl_codelet_q1_8 140 | fftwl_codelet_r2cb_10 141 | fftwl_codelet_r2cb_11 142 | fftwl_codelet_r2cb_12 143 | fftwl_codelet_r2cb_128 144 | fftwl_codelet_r2cb_13 145 | fftwl_codelet_r2cb_14 146 | fftwl_codelet_r2cb_15 147 | fftwl_codelet_r2cb_16 148 | fftwl_codelet_r2cb_2 149 | fftwl_codelet_r2cb_20 150 | fftwl_codelet_r2cb_25 151 | fftwl_codelet_r2cb_3 152 | fftwl_codelet_r2cb_32 153 | fftwl_codelet_r2cb_4 154 | fftwl_codelet_r2cb_5 155 | fftwl_codelet_r2cb_6 156 | fftwl_codelet_r2cb_64 157 | fftwl_codelet_r2cb_7 158 | fftwl_codelet_r2cb_8 159 | fftwl_codelet_r2cb_9 160 | fftwl_codelet_r2cbIII_10 161 | fftwl_codelet_r2cbIII_12 162 | fftwl_codelet_r2cbIII_15 163 | fftwl_codelet_r2cbIII_16 164 | fftwl_codelet_r2cbIII_2 165 | fftwl_codelet_r2cbIII_20 166 | fftwl_codelet_r2cbIII_25 167 | fftwl_codelet_r2cbIII_3 168 | fftwl_codelet_r2cbIII_32 169 | fftwl_codelet_r2cbIII_4 170 | fftwl_codelet_r2cbIII_5 171 | fftwl_codelet_r2cbIII_6 172 | fftwl_codelet_r2cbIII_64 173 | fftwl_codelet_r2cbIII_7 174 | fftwl_codelet_r2cbIII_8 175 | fftwl_codelet_r2cbIII_9 176 | fftwl_codelet_r2cf_10 177 | fftwl_codelet_r2cf_11 178 | fftwl_codelet_r2cf_12 179 | fftwl_codelet_r2cf_128 180 | fftwl_codelet_r2cf_13 181 | fftwl_codelet_r2cf_14 182 | fftwl_codelet_r2cf_15 183 | fftwl_codelet_r2cf_16 184 | fftwl_codelet_r2cf_2 185 | fftwl_codelet_r2cf_20 186 | fftwl_codelet_r2cf_25 187 | fftwl_codelet_r2cf_3 188 | fftwl_codelet_r2cf_32 189 | fftwl_codelet_r2cf_4 190 | fftwl_codelet_r2cf_5 191 | fftwl_codelet_r2cf_6 192 | fftwl_codelet_r2cf_64 193 | fftwl_codelet_r2cf_7 194 | fftwl_codelet_r2cf_8 195 | fftwl_codelet_r2cf_9 196 | fftwl_codelet_r2cfII_10 197 | fftwl_codelet_r2cfII_12 198 | fftwl_codelet_r2cfII_15 199 | fftwl_codelet_r2cfII_16 200 | fftwl_codelet_r2cfII_2 201 | fftwl_codelet_r2cfII_20 202 | fftwl_codelet_r2cfII_25 203 | fftwl_codelet_r2cfII_3 204 | fftwl_codelet_r2cfII_32 205 | fftwl_codelet_r2cfII_4 206 | fftwl_codelet_r2cfII_5 207 | fftwl_codelet_r2cfII_6 208 | fftwl_codelet_r2cfII_64 209 | fftwl_codelet_r2cfII_7 210 | fftwl_codelet_r2cfII_8 211 | fftwl_codelet_r2cfII_9 212 | fftwl_codelet_t1_10 213 | fftwl_codelet_t1_12 214 | fftwl_codelet_t1_15 215 | fftwl_codelet_t1_16 216 | fftwl_codelet_t1_2 217 | fftwl_codelet_t1_20 218 | fftwl_codelet_t1_25 219 | fftwl_codelet_t1_3 220 | fftwl_codelet_t1_32 221 | fftwl_codelet_t1_4 222 | fftwl_codelet_t1_5 223 | fftwl_codelet_t1_6 224 | fftwl_codelet_t1_64 225 | fftwl_codelet_t1_7 226 | fftwl_codelet_t1_8 227 | fftwl_codelet_t1_9 228 | fftwl_codelet_t2_10 229 | fftwl_codelet_t2_16 230 | fftwl_codelet_t2_20 231 | fftwl_codelet_t2_25 232 | fftwl_codelet_t2_32 233 | fftwl_codelet_t2_4 234 | fftwl_codelet_t2_5 235 | fftwl_codelet_t2_64 236 | fftwl_codelet_t2_8 237 | fftwl_compute_tilesz 238 | fftwl_configure_planner 239 | fftwl_cost 240 | fftwl_cpy1d 241 | fftwl_cpy2d 242 | fftwl_cpy2d_ci 243 | fftwl_cpy2d_co 244 | fftwl_cpy2d_pair 245 | fftwl_cpy2d_pair_ci 246 | fftwl_cpy2d_pair_co 247 | fftwl_cpy2d_tiled 248 | fftwl_cpy2d_tiledbuf 249 | fftwl_ct_applicable 250 | fftwl_ct_genericbuf_register 251 | fftwl_ct_generic_register 252 | fftwl_ct_uglyp 253 | fftwl_destroy_plan 254 | fftwl_dft_bluestein_register 255 | fftwl_dft_buffered_register 256 | fftwl_dft_conf_standard 257 | fftwl_dft_generic_register 258 | fftwl_dft_indirect_register 259 | fftwl_dft_indirect_transpose_register 260 | fftwl_dft_nop_register 261 | fftwl_dft_r2hc_register 262 | fftwl_dft_rader_register 263 | fftwl_dft_rank_geq2_register 264 | fftwl_dft_solve 265 | fftwl_dft_thr_vrank_geq1_register 266 | fftwl_dft_vrank_geq1_register 267 | fftwl_dft_zerotens 268 | fftwl_dht_r2hc_register 269 | fftwl_dht_rader_register 270 | fftwl_dimcmp 271 | fftwl_elapsed_since 272 | fftwl_estimate_cost 273 | fftwl_execute 274 | fftwl_execute_dft 275 | fftwl_execute_dft_c2r 276 | fftwl_execute_dft_r2c 277 | fftwl_execute_r2r 278 | fftwl_execute_split_dft 279 | fftwl_execute_split_dft_c2r 280 | fftwl_execute_split_dft_r2c 281 | fftwl_export_wisdom 282 | fftwl_export_wisdom_to_file 283 | fftwl_export_wisdom_to_filename 284 | fftwl_export_wisdom_to_string 285 | fftwl_extract_reim 286 | fftwl_factors_into 287 | fftwl_factors_into_small_primes 288 | fftwl_find_generator 289 | fftwl_first_divisor 290 | fftwl_flops 291 | fftwl_forget_wisdom 292 | fftwl_fprint_plan 293 | fftwl_free 294 | fftwl_get_crude_time 295 | fftwl_guru64_kosherp 296 | fftwl_guru_kosherp 297 | fftwl_hash 298 | fftwl_hc2hc_applicable 299 | fftwl_hc2hc_generic_register 300 | fftwl_iabs 301 | fftwl_ialignment_of 302 | fftwl_iestimate_cost 303 | fftwl_ifree 304 | fftwl_ifree0 305 | fftwl_imax 306 | fftwl_imin 307 | fftwl_import_system_wisdom 308 | fftwl_import_wisdom 309 | fftwl_import_wisdom_from_file 310 | fftwl_import_wisdom_from_filename 311 | fftwl_import_wisdom_from_string 312 | fftwl_init_threads 313 | fftwl_is_prime 314 | fftwl_isqrt 315 | fftwl_ithreads_init 316 | fftwl_kdft_dif_register 317 | fftwl_kdft_difsq_register 318 | fftwl_kdft_dit_register 319 | fftwl_kdft_register 320 | fftwl_kernel_free 321 | fftwl_kernel_malloc 322 | fftwl_khc2c_register 323 | fftwl_khc2hc_register 324 | fftwl_kr2c_register 325 | fftwl_kr2r_register 326 | fftwl_make_planner_thread_safe 327 | fftwl_malloc 328 | fftwl_malloc_plain 329 | fftwl_many_kosherp 330 | fftwl_mapflags 331 | fftwl_map_r2r_kind 332 | fftwl_md5begin 333 | fftwl_md5end 334 | fftwl_md5int 335 | fftwl_md5INT 336 | fftwl_md5putb 337 | fftwl_md5putc 338 | fftwl_md5puts 339 | fftwl_md5unsigned 340 | fftwl_measure_execution_time 341 | fftwl_mkapiplan 342 | fftwl_mkplan 343 | fftwl_mkplan_d 344 | fftwl_mkplan_dft 345 | fftwl_mkplan_dftw 346 | fftwl_mkplan_f_d 347 | fftwl_mkplan_hc2c 348 | fftwl_mkplan_hc2hc 349 | fftwl_mkplanner 350 | fftwl_mkplan_rdft 351 | fftwl_mkplan_rdft2 352 | fftwl_mkprinter 353 | fftwl_mkprinter_cnt 354 | fftwl_mkprinter_file 355 | fftwl_mkprinter_str 356 | fftwl_mkproblem 357 | fftwl_mkproblem_dft 358 | fftwl_mkproblem_dft_d 359 | fftwl_mkproblem_rdft 360 | fftwl_mkproblem_rdft_0_d 361 | fftwl_mkproblem_rdft_1 362 | fftwl_mkproblem_rdft_1_d 363 | fftwl_mkproblem_rdft2 364 | fftwl_mkproblem_rdft2_d 365 | fftwl_mkproblem_rdft2_d_3pointers 366 | fftwl_mkproblem_rdft_d 367 | fftwl_mkproblem_unsolvable 368 | fftwl_mkscanner 369 | fftwl_mksolver 370 | fftwl_mksolver_ct 371 | fftwl_mksolver_ct_threads 372 | fftwl_mksolver_dft_direct 373 | fftwl_mksolver_dft_directbuf 374 | fftwl_mksolver_hc2c 375 | fftwl_mksolver_hc2hc 376 | fftwl_mksolver_hc2hc_threads 377 | fftwl_mksolver_rdft2_direct 378 | fftwl_mksolver_rdft_r2c_direct 379 | fftwl_mksolver_rdft_r2c_directbuf 380 | fftwl_mksolver_rdft_r2r_direct 381 | fftwl_mktensor 382 | fftwl_mktensor_0d 383 | fftwl_mktensor_1d 384 | fftwl_mktensor_2d 385 | fftwl_mktensor_3d 386 | fftwl_mktensor_4d 387 | fftwl_mktensor_5d 388 | fftwl_mktensor_iodims 389 | fftwl_mktensor_iodims64 390 | fftwl_mktensor_rowmajor 391 | fftwl_mktriggen 392 | fftwl_modulo 393 | fftwl_nbuf 394 | fftwl_nbuf_redundant 395 | fftwl_next_prime 396 | fftwl_null_awake 397 | fftwl_ops_add 398 | fftwl_ops_add2 399 | fftwl_ops_cpy 400 | fftwl_ops_madd 401 | fftwl_ops_madd2 402 | fftwl_ops_other 403 | fftwl_ops_zero 404 | fftwl_pickdim 405 | fftwl_plan_awake 406 | fftwl_plan_destroy_internal 407 | fftwl_plan_dft 408 | fftwl_plan_dft_1d 409 | fftwl_plan_dft_2d 410 | fftwl_plan_dft_3d 411 | fftwl_plan_dft_c2r 412 | fftwl_plan_dft_c2r_1d 413 | fftwl_plan_dft_c2r_2d 414 | fftwl_plan_dft_c2r_3d 415 | fftwl_plan_dft_r2c 416 | fftwl_plan_dft_r2c_1d 417 | fftwl_plan_dft_r2c_2d 418 | fftwl_plan_dft_r2c_3d 419 | fftwl_plan_guru64_dft 420 | fftwl_plan_guru64_dft_c2r 421 | fftwl_plan_guru64_dft_r2c 422 | fftwl_plan_guru64_r2r 423 | fftwl_plan_guru64_split_dft 424 | fftwl_plan_guru64_split_dft_c2r 425 | fftwl_plan_guru64_split_dft_r2c 426 | fftwl_plan_guru_dft 427 | fftwl_plan_guru_dft_c2r 428 | fftwl_plan_guru_dft_r2c 429 | fftwl_plan_guru_r2r 430 | fftwl_plan_guru_split_dft 431 | fftwl_plan_guru_split_dft_c2r 432 | fftwl_plan_guru_split_dft_r2c 433 | fftwl_plan_many_dft 434 | fftwl_plan_many_dft_c2r 435 | fftwl_plan_many_dft_r2c 436 | fftwl_plan_many_r2r 437 | fftwl_planner_destroy 438 | fftwl_plan_null_destroy 439 | fftwl_plan_r2r 440 | fftwl_plan_r2r_1d 441 | fftwl_plan_r2r_2d 442 | fftwl_plan_r2r_3d 443 | fftwl_plan_with_nthreads 444 | fftwl_power_mod 445 | fftwl_printer_destroy 446 | fftwl_print_plan 447 | fftwl_problem_destroy 448 | fftwl_rader_tl_delete 449 | fftwl_rader_tl_find 450 | fftwl_rader_tl_insert 451 | fftwl_rdft2_buffered_register 452 | fftwl_rdft2_complex_n 453 | fftwl_rdft2_inplace_strides 454 | fftwl_rdft2_nop_register 455 | fftwl_rdft2_pad 456 | fftwl_rdft2_rank0_register 457 | fftwl_rdft2_rank_geq2_register 458 | fftwl_rdft2_rdft_register 459 | fftwl_rdft2_solve 460 | fftwl_rdft2_strides 461 | fftwl_rdft2_tensor_max_index 462 | fftwl_rdft2_thr_vrank_geq1_register 463 | fftwl_rdft2_vrank_geq1_register 464 | fftwl_rdft_buffered_register 465 | fftwl_rdft_conf_standard 466 | fftwl_rdft_dht_register 467 | fftwl_rdft_generic_register 468 | fftwl_rdft_indirect_register 469 | fftwl_rdft_kind_str 470 | fftwl_rdft_nop_register 471 | fftwl_rdft_rank0_register 472 | fftwl_rdft_rank_geq2_register 473 | fftwl_rdft_solve 474 | fftwl_rdft_thr_vrank_geq1_register 475 | fftwl_rdft_vrank3_transpose_register 476 | fftwl_rdft_vrank_geq1_register 477 | fftwl_rdft_zerotens 478 | fftwl_redft00e_r2hc_pad_register 479 | fftwl_regsolver_ct_directw 480 | fftwl_regsolver_ct_directwsq 481 | fftwl_regsolver_hc2c_direct 482 | fftwl_regsolver_hc2hc_direct 483 | fftwl_reodft00e_splitradix_register 484 | fftwl_reodft010e_r2hc_register 485 | fftwl_reodft11e_r2hc_odd_register 486 | fftwl_reodft11e_radix2_r2hc_register 487 | fftwl_reodft_conf_standard 488 | fftwl_rodft00e_r2hc_pad_register 489 | fftwl_safe_mulmod 490 | fftwl_scanner_destroy 491 | fftwl_set_planner_hooks 492 | fftwl_set_timelimit 493 | fftwl_solver_destroy 494 | fftwl_solver_register 495 | fftwl_solver_use 496 | fftwl_solvtab_exec 497 | fftwl_spawn_loop 498 | fftwl_sprint_plan 499 | fftwl_tensor_append 500 | fftwl_tensor_compress 501 | fftwl_tensor_compress_contiguous 502 | fftwl_tensor_copy 503 | fftwl_tensor_copy_except 504 | fftwl_tensor_copy_inplace 505 | fftwl_tensor_copy_sub 506 | fftwl_tensor_destroy 507 | fftwl_tensor_destroy2 508 | fftwl_tensor_destroy4 509 | fftwl_tensor_equal 510 | fftwl_tensor_inplace_locations 511 | fftwl_tensor_inplace_strides 512 | fftwl_tensor_inplace_strides2 513 | fftwl_tensor_kosherp 514 | fftwl_tensor_max_index 515 | fftwl_tensor_md5 516 | fftwl_tensor_min_istride 517 | fftwl_tensor_min_ostride 518 | fftwl_tensor_min_stride 519 | fftwl_tensor_print 520 | fftwl_tensor_split 521 | fftwl_tensor_strides_decrease 522 | fftwl_tensor_sz 523 | fftwl_tensor_tornk1 524 | fftwl_the_planner 525 | fftwl_threads_cleanup 526 | fftwl_threads_conf_standard 527 | fftwl_threads_register_planner_hooks 528 | fftwl_tile2d 529 | fftwl_toobig 530 | fftwl_transpose 531 | fftwl_transpose_tiled 532 | fftwl_transpose_tiledbuf 533 | fftwl_triggen_destroy 534 | fftwl_twiddle_awake 535 | fftwl_twiddle_length 536 | fftwl_zero1d_pair 537 | lfftw_cleanup_ 538 | lfftw_cleanup__ 539 | lfftw_cleanup_threads_ 540 | lfftw_cleanup_threads__ 541 | lfftw_cost_ 542 | lfftw_cost__ 543 | lfftw_destroy_plan_ 544 | lfftw_destroy_plan__ 545 | lfftw_estimate_cost_ 546 | lfftw_estimate_cost__ 547 | lfftw_execute_ 548 | lfftw_execute__ 549 | lfftw_execute_dft_ 550 | lfftw_execute_dft__ 551 | lfftw_execute_dft_c2r_ 552 | lfftw_execute_dft_c2r__ 553 | lfftw_execute_dft_r2c_ 554 | lfftw_execute_dft_r2c__ 555 | lfftw_execute_r2r_ 556 | lfftw_execute_r2r__ 557 | lfftw_execute_split_dft_ 558 | lfftw_execute_split_dft__ 559 | lfftw_execute_split_dft_c2r_ 560 | lfftw_execute_split_dft_c2r__ 561 | lfftw_execute_split_dft_r2c_ 562 | lfftw_execute_split_dft_r2c__ 563 | lfftw_export_wisdom_ 564 | lfftw_export_wisdom__ 565 | lfftw_flops_ 566 | lfftw_flops__ 567 | lfftw_forget_wisdom_ 568 | lfftw_forget_wisdom__ 569 | lfftw_import_system_wisdom_ 570 | lfftw_import_system_wisdom__ 571 | lfftw_import_wisdom_ 572 | lfftw_import_wisdom__ 573 | lfftw_init_threads_ 574 | lfftw_init_threads__ 575 | lfftw_plan_dft_ 576 | lfftw_plan_dft__ 577 | lfftw_plan_dft_1d_ 578 | lfftw_plan_dft_1d__ 579 | lfftw_plan_dft_2d_ 580 | lfftw_plan_dft_2d__ 581 | lfftw_plan_dft_3d_ 582 | lfftw_plan_dft_3d__ 583 | lfftw_plan_dft_c2r_ 584 | lfftw_plan_dft_c2r__ 585 | lfftw_plan_dft_c2r_1d_ 586 | lfftw_plan_dft_c2r_1d__ 587 | lfftw_plan_dft_c2r_2d_ 588 | lfftw_plan_dft_c2r_2d__ 589 | lfftw_plan_dft_c2r_3d_ 590 | lfftw_plan_dft_c2r_3d__ 591 | lfftw_plan_dft_r2c_ 592 | lfftw_plan_dft_r2c__ 593 | lfftw_plan_dft_r2c_1d_ 594 | lfftw_plan_dft_r2c_1d__ 595 | lfftw_plan_dft_r2c_2d_ 596 | lfftw_plan_dft_r2c_2d__ 597 | lfftw_plan_dft_r2c_3d_ 598 | lfftw_plan_dft_r2c_3d__ 599 | lfftw_plan_guru_dft_ 600 | lfftw_plan_guru_dft__ 601 | lfftw_plan_guru_dft_c2r_ 602 | lfftw_plan_guru_dft_c2r__ 603 | lfftw_plan_guru_dft_r2c_ 604 | lfftw_plan_guru_dft_r2c__ 605 | lfftw_plan_guru_r2r_ 606 | lfftw_plan_guru_r2r__ 607 | lfftw_plan_guru_split_dft_ 608 | lfftw_plan_guru_split_dft__ 609 | lfftw_plan_guru_split_dft_c2r_ 610 | lfftw_plan_guru_split_dft_c2r__ 611 | lfftw_plan_guru_split_dft_r2c_ 612 | lfftw_plan_guru_split_dft_r2c__ 613 | lfftw_plan_many_dft_ 614 | lfftw_plan_many_dft__ 615 | lfftw_plan_many_dft_c2r_ 616 | lfftw_plan_many_dft_c2r__ 617 | lfftw_plan_many_dft_r2c_ 618 | lfftw_plan_many_dft_r2c__ 619 | lfftw_plan_many_r2r_ 620 | lfftw_plan_many_r2r__ 621 | lfftw_plan_r2r_ 622 | lfftw_plan_r2r__ 623 | lfftw_plan_r2r_1d_ 624 | lfftw_plan_r2r_1d__ 625 | lfftw_plan_r2r_2d_ 626 | lfftw_plan_r2r_2d__ 627 | lfftw_plan_r2r_3d_ 628 | lfftw_plan_r2r_3d__ 629 | lfftw_plan_with_nthreads_ 630 | lfftw_plan_with_nthreads__ 631 | lfftw_print_plan_ 632 | lfftw_print_plan__ 633 | lfftw_set_timelimit_ 634 | lfftw_set_timelimit__ 635 | -------------------------------------------------------------------------------- /fftw3/bin/32bit/libfftw3l-3.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/univrsal/spectralizer/9cab74053a7021a41aab298d57d3245d7532d633/fftw3/bin/32bit/libfftw3l-3.dll -------------------------------------------------------------------------------- /fftw3/bin/32bit/libfftw3l-3.exp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/univrsal/spectralizer/9cab74053a7021a41aab298d57d3245d7532d633/fftw3/bin/32bit/libfftw3l-3.exp -------------------------------------------------------------------------------- /fftw3/bin/32bit/libfftw3l-3.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/univrsal/spectralizer/9cab74053a7021a41aab298d57d3245d7532d633/fftw3/bin/32bit/libfftw3l-3.lib -------------------------------------------------------------------------------- /fftw3/bin/64bit/libfftw3-3.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/univrsal/spectralizer/9cab74053a7021a41aab298d57d3245d7532d633/fftw3/bin/64bit/libfftw3-3.dll -------------------------------------------------------------------------------- /fftw3/bin/64bit/libfftw3-3.exp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/univrsal/spectralizer/9cab74053a7021a41aab298d57d3245d7532d633/fftw3/bin/64bit/libfftw3-3.exp -------------------------------------------------------------------------------- /fftw3/bin/64bit/libfftw3-3.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/univrsal/spectralizer/9cab74053a7021a41aab298d57d3245d7532d633/fftw3/bin/64bit/libfftw3-3.lib -------------------------------------------------------------------------------- /fftw3/bin/64bit/libfftw3f-3.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/univrsal/spectralizer/9cab74053a7021a41aab298d57d3245d7532d633/fftw3/bin/64bit/libfftw3f-3.dll -------------------------------------------------------------------------------- /fftw3/bin/64bit/libfftw3f-3.exp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/univrsal/spectralizer/9cab74053a7021a41aab298d57d3245d7532d633/fftw3/bin/64bit/libfftw3f-3.exp -------------------------------------------------------------------------------- /fftw3/bin/64bit/libfftw3f-3.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/univrsal/spectralizer/9cab74053a7021a41aab298d57d3245d7532d633/fftw3/bin/64bit/libfftw3f-3.lib -------------------------------------------------------------------------------- /fftw3/bin/64bit/libfftw3l-3.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/univrsal/spectralizer/9cab74053a7021a41aab298d57d3245d7532d633/fftw3/bin/64bit/libfftw3l-3.dll -------------------------------------------------------------------------------- /fftw3/bin/64bit/libfftw3l-3.exp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/univrsal/spectralizer/9cab74053a7021a41aab298d57d3245d7532d633/fftw3/bin/64bit/libfftw3l-3.exp -------------------------------------------------------------------------------- /fftw3/bin/64bit/libfftw3l-3.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/univrsal/spectralizer/9cab74053a7021a41aab298d57d3245d7532d633/fftw3/bin/64bit/libfftw3l-3.lib -------------------------------------------------------------------------------- /fftw3/include/fftw3.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2003, 2007-14 Matteo Frigo 3 | * Copyright (c) 2003, 2007-14 Massachusetts Institute of Technology 4 | * 5 | * The following statement of license applies *only* to this header file, 6 | * and *not* to the other files distributed with FFTW or derived therefrom: 7 | * 8 | * Redistribution and use in source and binary forms, with or without 9 | * modification, are permitted provided that the following conditions 10 | * are met: 11 | * 12 | * 1. Redistributions of source code must retain the above copyright 13 | * notice, this list of conditions and the following disclaimer. 14 | * 15 | * 2. Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in the 17 | * documentation and/or other materials provided with the distribution. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS 20 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 23 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 25 | * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 27 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 28 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | /***************************** NOTE TO USERS ********************************* 33 | * 34 | * THIS IS A HEADER FILE, NOT A MANUAL 35 | * 36 | * If you want to know how to use FFTW, please read the manual, 37 | * online at http://www.fftw.org/doc/ and also included with FFTW. 38 | * For a quick start, see the manual's tutorial section. 39 | * 40 | * (Reading header files to learn how to use a library is a habit 41 | * stemming from code lacking a proper manual. Arguably, it's a 42 | * *bad* habit in most cases, because header files can contain 43 | * interfaces that are not part of the public, stable API.) 44 | * 45 | ****************************************************************************/ 46 | 47 | #ifndef FFTW3_H 48 | #define FFTW3_H 49 | 50 | #include 51 | 52 | #ifdef __cplusplus 53 | extern "C" { 54 | #endif /* __cplusplus */ 55 | 56 | /* If is included, use the C99 complex type. Otherwise 57 | define a type bit-compatible with C99 complex */ 58 | #if !defined(FFTW_NO_Complex) && defined(_Complex_I) && defined(complex) && defined(I) 59 | #define FFTW_DEFINE_COMPLEX(R, C) typedef R _Complex C 60 | #else 61 | #define FFTW_DEFINE_COMPLEX(R, C) typedef R C[2] 62 | #endif 63 | 64 | #define FFTW_CONCAT(prefix, name) prefix##name 65 | #define FFTW_MANGLE_DOUBLE(name) FFTW_CONCAT(fftw_, name) 66 | #define FFTW_MANGLE_FLOAT(name) FFTW_CONCAT(fftwf_, name) 67 | #define FFTW_MANGLE_LONG_DOUBLE(name) FFTW_CONCAT(fftwl_, name) 68 | #define FFTW_MANGLE_QUAD(name) FFTW_CONCAT(fftwq_, name) 69 | 70 | /* IMPORTANT: for Windows compilers, you should add a line 71 | */ 72 | #define FFTW_DLL 73 | /* 74 | here and in kernel/ifftw.h if you are compiling/using FFTW as a 75 | DLL, in order to do the proper importing/exporting, or 76 | alternatively compile with -DFFTW_DLL or the equivalent 77 | command-line flag. This is not necessary under MinGW/Cygwin, where 78 | libtool does the imports/exports automatically. */ 79 | #if defined(FFTW_DLL) && (defined(_WIN32) || defined(__WIN32__)) 80 | /* annoying Windows syntax for shared-library declarations */ 81 | #if defined(COMPILING_FFTW) /* defined in api.h when compiling FFTW */ 82 | #define FFTW_EXTERN extern __declspec(dllexport) 83 | #else /* user is calling FFTW; import symbol */ 84 | #define FFTW_EXTERN extern __declspec(dllimport) 85 | #endif 86 | #else 87 | #define FFTW_EXTERN extern 88 | #endif 89 | 90 | enum fftw_r2r_kind_do_not_use_me { 91 | FFTW_R2HC = 0, 92 | FFTW_HC2R = 1, 93 | FFTW_DHT = 2, 94 | FFTW_REDFT00 = 3, 95 | FFTW_REDFT01 = 4, 96 | FFTW_REDFT10 = 5, 97 | FFTW_REDFT11 = 6, 98 | FFTW_RODFT00 = 7, 99 | FFTW_RODFT01 = 8, 100 | FFTW_RODFT10 = 9, 101 | FFTW_RODFT11 = 10 102 | }; 103 | 104 | struct fftw_iodim_do_not_use_me { 105 | int n; /* dimension size */ 106 | int is; /* input stride */ 107 | int os; /* output stride */ 108 | }; 109 | 110 | #include /* for ptrdiff_t */ 111 | struct fftw_iodim64_do_not_use_me { 112 | ptrdiff_t n; /* dimension size */ 113 | ptrdiff_t is; /* input stride */ 114 | ptrdiff_t os; /* output stride */ 115 | }; 116 | 117 | typedef void (*fftw_write_char_func_do_not_use_me)(char c, void *); 118 | typedef int (*fftw_read_char_func_do_not_use_me)(void *); 119 | 120 | /* 121 | huge second-order macro that defines prototypes for all API 122 | functions. We expand this macro for each supported precision 123 | 124 | X: name-mangling macro 125 | R: real data type 126 | C: complex data type 127 | */ 128 | 129 | #define FFTW_DEFINE_API(X, R, C) \ 130 | \ 131 | FFTW_DEFINE_COMPLEX(R, C); \ 132 | \ 133 | typedef struct X(plan_s) * X(plan); \ 134 | \ 135 | typedef struct fftw_iodim_do_not_use_me X(iodim); \ 136 | typedef struct fftw_iodim64_do_not_use_me X(iodim64); \ 137 | \ 138 | typedef enum fftw_r2r_kind_do_not_use_me X(r2r_kind); \ 139 | \ 140 | typedef fftw_write_char_func_do_not_use_me X(write_char_func); \ 141 | typedef fftw_read_char_func_do_not_use_me X(read_char_func); \ 142 | \ 143 | FFTW_EXTERN void X(execute)(const X(plan) p); \ 144 | \ 145 | FFTW_EXTERN X(plan) X(plan_dft)(int rank, const int *n, C *in, C *out, int sign, unsigned flags); \ 146 | \ 147 | FFTW_EXTERN X(plan) X(plan_dft_1d)(int n, C *in, C *out, int sign, unsigned flags); \ 148 | FFTW_EXTERN X(plan) X(plan_dft_2d)(int n0, int n1, C *in, C *out, int sign, unsigned flags); \ 149 | FFTW_EXTERN X(plan) X(plan_dft_3d)(int n0, int n1, int n2, C *in, C *out, int sign, unsigned flags); \ 150 | \ 151 | FFTW_EXTERN X(plan) \ 152 | X(plan_many_dft)(int rank, const int *n, int howmany, C *in, const int *inembed, int istride, int idist, \ 153 | C *out, const int *onembed, int ostride, int odist, int sign, unsigned flags); \ 154 | \ 155 | FFTW_EXTERN X(plan) X(plan_guru_dft)(int rank, const X(iodim) * dims, int howmany_rank, \ 156 | const X(iodim) * howmany_dims, C * in, C * out, int sign, unsigned flags); \ 157 | FFTW_EXTERN X(plan) \ 158 | X(plan_guru_split_dft)(int rank, const X(iodim) * dims, int howmany_rank, const X(iodim) * howmany_dims, \ 159 | R * ri, R * ii, R * ro, R * io, unsigned flags); \ 160 | \ 161 | FFTW_EXTERN X(plan) \ 162 | X(plan_guru64_dft)(int rank, const X(iodim64) * dims, int howmany_rank, const X(iodim64) * howmany_dims, \ 163 | C * in, C * out, int sign, unsigned flags); \ 164 | FFTW_EXTERN X(plan) \ 165 | X(plan_guru64_split_dft)(int rank, const X(iodim64) * dims, int howmany_rank, const X(iodim64) * howmany_dims, \ 166 | R * ri, R * ii, R * ro, R * io, unsigned flags); \ 167 | \ 168 | FFTW_EXTERN void X(execute_dft)(const X(plan) p, C *in, C *out); \ 169 | FFTW_EXTERN void X(execute_split_dft)(const X(plan) p, R *ri, R *ii, R *ro, R *io); \ 170 | \ 171 | FFTW_EXTERN X(plan) \ 172 | X(plan_many_dft_r2c)(int rank, const int *n, int howmany, R *in, const int *inembed, int istride, int idist, \ 173 | C *out, const int *onembed, int ostride, int odist, unsigned flags); \ 174 | \ 175 | FFTW_EXTERN X(plan) X(plan_dft_r2c)(int rank, const int *n, R *in, C *out, unsigned flags); \ 176 | \ 177 | FFTW_EXTERN X(plan) X(plan_dft_r2c_1d)(int n, R *in, C *out, unsigned flags); \ 178 | FFTW_EXTERN X(plan) X(plan_dft_r2c_2d)(int n0, int n1, R *in, C *out, unsigned flags); \ 179 | FFTW_EXTERN X(plan) X(plan_dft_r2c_3d)(int n0, int n1, int n2, R *in, C *out, unsigned flags); \ 180 | \ 181 | FFTW_EXTERN X(plan) \ 182 | X(plan_many_dft_c2r)(int rank, const int *n, int howmany, C *in, const int *inembed, int istride, int idist, \ 183 | R *out, const int *onembed, int ostride, int odist, unsigned flags); \ 184 | \ 185 | FFTW_EXTERN X(plan) X(plan_dft_c2r)(int rank, const int *n, C *in, R *out, unsigned flags); \ 186 | \ 187 | FFTW_EXTERN X(plan) X(plan_dft_c2r_1d)(int n, C *in, R *out, unsigned flags); \ 188 | FFTW_EXTERN X(plan) X(plan_dft_c2r_2d)(int n0, int n1, C *in, R *out, unsigned flags); \ 189 | FFTW_EXTERN X(plan) X(plan_dft_c2r_3d)(int n0, int n1, int n2, C *in, R *out, unsigned flags); \ 190 | \ 191 | FFTW_EXTERN X(plan) X(plan_guru_dft_r2c)(int rank, const X(iodim) * dims, int howmany_rank, \ 192 | const X(iodim) * howmany_dims, R * in, C * out, unsigned flags); \ 193 | FFTW_EXTERN X(plan) X(plan_guru_dft_c2r)(int rank, const X(iodim) * dims, int howmany_rank, \ 194 | const X(iodim) * howmany_dims, C * in, R * out, unsigned flags); \ 195 | \ 196 | FFTW_EXTERN X(plan) \ 197 | X(plan_guru_split_dft_r2c)(int rank, const X(iodim) * dims, int howmany_rank, const X(iodim) * howmany_dims, \ 198 | R * in, R * ro, R * io, unsigned flags); \ 199 | FFTW_EXTERN X(plan) \ 200 | X(plan_guru_split_dft_c2r)(int rank, const X(iodim) * dims, int howmany_rank, const X(iodim) * howmany_dims, \ 201 | R * ri, R * ii, R * out, unsigned flags); \ 202 | \ 203 | FFTW_EXTERN X(plan) X(plan_guru64_dft_r2c)(int rank, const X(iodim64) * dims, int howmany_rank, \ 204 | const X(iodim64) * howmany_dims, R * in, C * out, unsigned flags); \ 205 | FFTW_EXTERN X(plan) X(plan_guru64_dft_c2r)(int rank, const X(iodim64) * dims, int howmany_rank, \ 206 | const X(iodim64) * howmany_dims, C * in, R * out, unsigned flags); \ 207 | \ 208 | FFTW_EXTERN X(plan) \ 209 | X(plan_guru64_split_dft_r2c)(int rank, const X(iodim64) * dims, int howmany_rank, \ 210 | const X(iodim64) * howmany_dims, R * in, R * ro, R * io, unsigned flags); \ 211 | FFTW_EXTERN X(plan) \ 212 | X(plan_guru64_split_dft_c2r)(int rank, const X(iodim64) * dims, int howmany_rank, \ 213 | const X(iodim64) * howmany_dims, R * ri, R * ii, R * out, unsigned flags); \ 214 | \ 215 | FFTW_EXTERN void X(execute_dft_r2c)(const X(plan) p, R *in, C *out); \ 216 | FFTW_EXTERN void X(execute_dft_c2r)(const X(plan) p, C *in, R *out); \ 217 | \ 218 | FFTW_EXTERN void X(execute_split_dft_r2c)(const X(plan) p, R *in, R *ro, R *io); \ 219 | FFTW_EXTERN void X(execute_split_dft_c2r)(const X(plan) p, R *ri, R *ii, R *out); \ 220 | \ 221 | FFTW_EXTERN X(plan) X(plan_many_r2r)(int rank, const int *n, int howmany, R *in, const int *inembed, int istride, \ 222 | int idist, R *out, const int *onembed, int ostride, int odist, \ 223 | const X(r2r_kind) * kind, unsigned flags); \ 224 | \ 225 | FFTW_EXTERN X(plan) X(plan_r2r)(int rank, const int *n, R *in, R *out, const X(r2r_kind) * kind, unsigned flags); \ 226 | \ 227 | FFTW_EXTERN X(plan) X(plan_r2r_1d)(int n, R *in, R *out, X(r2r_kind) kind, unsigned flags); \ 228 | FFTW_EXTERN X(plan) \ 229 | X(plan_r2r_2d)(int n0, int n1, R *in, R *out, X(r2r_kind) kind0, X(r2r_kind) kind1, unsigned flags); \ 230 | FFTW_EXTERN X(plan) X(plan_r2r_3d)(int n0, int n1, int n2, R *in, R *out, X(r2r_kind) kind0, X(r2r_kind) kind1, \ 231 | X(r2r_kind) kind2, unsigned flags); \ 232 | \ 233 | FFTW_EXTERN X(plan) \ 234 | X(plan_guru_r2r)(int rank, const X(iodim) * dims, int howmany_rank, const X(iodim) * howmany_dims, R * in, \ 235 | R * out, const X(r2r_kind) * kind, unsigned flags); \ 236 | \ 237 | FFTW_EXTERN X(plan) \ 238 | X(plan_guru64_r2r)(int rank, const X(iodim64) * dims, int howmany_rank, const X(iodim64) * howmany_dims, \ 239 | R * in, R * out, const X(r2r_kind) * kind, unsigned flags); \ 240 | \ 241 | FFTW_EXTERN void X(execute_r2r)(const X(plan) p, R *in, R *out); \ 242 | \ 243 | FFTW_EXTERN void X(destroy_plan)(X(plan) p); \ 244 | FFTW_EXTERN void X(forget_wisdom)(void); \ 245 | FFTW_EXTERN void X(cleanup)(void); \ 246 | \ 247 | FFTW_EXTERN void X(set_timelimit)(double t); \ 248 | \ 249 | FFTW_EXTERN void X(plan_with_nthreads)(int nthreads); \ 250 | FFTW_EXTERN int X(init_threads)(void); \ 251 | FFTW_EXTERN void X(cleanup_threads)(void); \ 252 | FFTW_EXTERN void X(make_planner_thread_safe)(void); \ 253 | \ 254 | FFTW_EXTERN int X(export_wisdom_to_filename)(const char *filename); \ 255 | FFTW_EXTERN void X(export_wisdom_to_file)(FILE * output_file); \ 256 | FFTW_EXTERN char *X(export_wisdom_to_string)(void); \ 257 | FFTW_EXTERN void X(export_wisdom)(X(write_char_func) write_char, void *data); \ 258 | FFTW_EXTERN int X(import_system_wisdom)(void); \ 259 | FFTW_EXTERN int X(import_wisdom_from_filename)(const char *filename); \ 260 | FFTW_EXTERN int X(import_wisdom_from_file)(FILE * input_file); \ 261 | FFTW_EXTERN int X(import_wisdom_from_string)(const char *input_string); \ 262 | FFTW_EXTERN int X(import_wisdom)(X(read_char_func) read_char, void *data); \ 263 | \ 264 | FFTW_EXTERN void X(fprint_plan)(const X(plan) p, FILE *output_file); \ 265 | FFTW_EXTERN void X(print_plan)(const X(plan) p); \ 266 | FFTW_EXTERN char *X(sprint_plan)(const X(plan) p); \ 267 | \ 268 | FFTW_EXTERN void *X(malloc)(size_t n); \ 269 | FFTW_EXTERN R *X(alloc_real)(size_t n); \ 270 | FFTW_EXTERN C *X(alloc_complex)(size_t n); \ 271 | FFTW_EXTERN void X(free)(void *p); \ 272 | \ 273 | FFTW_EXTERN void X(flops)(const X(plan) p, double *add, double *mul, double *fmas); \ 274 | FFTW_EXTERN double X(estimate_cost)(const X(plan) p); \ 275 | FFTW_EXTERN double X(cost)(const X(plan) p); \ 276 | \ 277 | FFTW_EXTERN int X(alignment_of)(R * p); \ 278 | FFTW_EXTERN const char X(version)[]; \ 279 | FFTW_EXTERN const char X(cc)[]; \ 280 | FFTW_EXTERN const char X(codelet_optim)[]; 281 | 282 | /* end of FFTW_DEFINE_API macro */ 283 | 284 | FFTW_DEFINE_API(FFTW_MANGLE_DOUBLE, double, fftw_complex) 285 | FFTW_DEFINE_API(FFTW_MANGLE_FLOAT, float, fftwf_complex) 286 | FFTW_DEFINE_API(FFTW_MANGLE_LONG_DOUBLE, long double, fftwl_complex) 287 | 288 | /* __float128 (quad precision) is a gcc extension on i386, x86_64, and ia64 289 | for gcc >= 4.6 (compiled in FFTW with --enable-quad-precision) */ 290 | #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) && \ 291 | !(defined(__ICC) || defined(__INTEL_COMPILER) || defined(__CUDACC__) || defined(__PGI)) && \ 292 | (defined(__i386__) || defined(__x86_64__) || defined(__ia64__)) 293 | #if !defined(FFTW_NO_Complex) && defined(_Complex_I) && defined(complex) && defined(I) 294 | /* note: __float128 is a typedef, which is not supported with the _Complex 295 | keyword in gcc, so instead we use this ugly __attribute__ version. 296 | However, we can't simply pass the __attribute__ version to 297 | FFTW_DEFINE_API because the __attribute__ confuses gcc in pointer 298 | types. Hence redefining FFTW_DEFINE_COMPLEX. Ugh. */ 299 | #undef FFTW_DEFINE_COMPLEX 300 | #define FFTW_DEFINE_COMPLEX(R, C) typedef _Complex float __attribute__((mode(TC))) C 301 | #endif 302 | FFTW_DEFINE_API(FFTW_MANGLE_QUAD, __float128, fftwq_complex) 303 | #endif 304 | 305 | #define FFTW_FORWARD (-1) 306 | #define FFTW_BACKWARD (+1) 307 | 308 | #define FFTW_NO_TIMELIMIT (-1.0) 309 | 310 | /* documented flags */ 311 | #define FFTW_MEASURE (0U) 312 | #define FFTW_DESTROY_INPUT (1U << 0) 313 | #define FFTW_UNALIGNED (1U << 1) 314 | #define FFTW_CONSERVE_MEMORY (1U << 2) 315 | #define FFTW_EXHAUSTIVE (1U << 3) /* NO_EXHAUSTIVE is default */ 316 | #define FFTW_PRESERVE_INPUT (1U << 4) /* cancels FFTW_DESTROY_INPUT */ 317 | #define FFTW_PATIENT (1U << 5) /* IMPATIENT is default */ 318 | #define FFTW_ESTIMATE (1U << 6) 319 | #define FFTW_WISDOM_ONLY (1U << 21) 320 | 321 | /* undocumented beyond-guru flags */ 322 | #define FFTW_ESTIMATE_PATIENT (1U << 7) 323 | #define FFTW_BELIEVE_PCOST (1U << 8) 324 | #define FFTW_NO_DFT_R2HC (1U << 9) 325 | #define FFTW_NO_NONTHREADED (1U << 10) 326 | #define FFTW_NO_BUFFERING (1U << 11) 327 | #define FFTW_NO_INDIRECT_OP (1U << 12) 328 | #define FFTW_ALLOW_LARGE_GENERIC (1U << 13) /* NO_LARGE_GENERIC is default */ 329 | #define FFTW_NO_RANK_SPLITS (1U << 14) 330 | #define FFTW_NO_VRANK_SPLITS (1U << 15) 331 | #define FFTW_NO_VRECURSE (1U << 16) 332 | #define FFTW_NO_SIMD (1U << 17) 333 | #define FFTW_NO_SLOW (1U << 18) 334 | #define FFTW_NO_FIXED_RADIX_LARGE_N (1U << 19) 335 | #define FFTW_ALLOW_PRUNING (1U << 20) 336 | 337 | #ifdef __cplusplus 338 | } /* extern "C" */ 339 | #endif /* __cplusplus */ 340 | 341 | #endif /* FFTW3_H */ 342 | -------------------------------------------------------------------------------- /format.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | find ./src -iname *.h* -o -iname *.c* | xargs clang-format -style=file -i -verbose 3 | -------------------------------------------------------------------------------- /package/README.txt.in: -------------------------------------------------------------------------------- 1 | @CMAKE_PROJECT_NAME@ v@CMAKE_PROJECT_VERSION@ 2 | This program is licensed under the GPL v2.0 See COPYING 3 | github.com/univrsal/@PLUGIN_GIT@ 4 | 5 | INSTALLATION 6 | 7 | Linux: 8 | ------ 9 | 1. Create a plugin folder in your home directory: 10 | $ mkdir -p ~/.config/obs-studio/plugins/@CMAKE_PROJECT_NAME@ 11 | 2. Extract the folder bin and data into the newly created folder 12 | $ mv plugin/* ~/.config/obs-studio/plugins/@CMAKE_PROJECT_NAME@ 13 | 14 | Windows: 15 | -------- 16 | 1. Extract the archive 17 | 2. Open your obs studio installation directory (Usually C:\Program Files\obs-studio) 18 | 3. Copy the folders "data" and "obs-plugins" into your obs installation directory. 19 | "data" contains the translations and additional files, "obs-plugins" the actual plugin 20 | You'll need to grant administrative rights to merge the folders. 21 | -------------------------------------------------------------------------------- /package/installer-Windows.iss.in: -------------------------------------------------------------------------------- 1 | #define MyAppName "@CMAKE_PROJECT_NAME@" 2 | #define MyAppVersion "@CMAKE_PROJECT_VERSION@" 3 | #define MyAppPublisher "@PLUGIN_AUTHOR@" 4 | #define MyAppURL "https://github.com/univrsal/@PLUGIN_GIT@" 5 | 6 | [Setup] 7 | ; NOTE: The value of AppId uniquely identifies this application. 8 | ; Do not use the same AppId value in installers for other applications. 9 | ; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) 10 | AppId={{e1cb7c35-233b-464c-99a9-472b8121c03e} 11 | AppName={#MyAppName} 12 | AppVersion={#MyAppVersion} 13 | AppPublisher={#MyAppPublisher} 14 | AppPublisherURL={#MyAppURL} 15 | AppSupportURL={#MyAppURL} 16 | AppUpdatesURL={#MyAppURL} 17 | DefaultDirName={code:GetDirName} 18 | DefaultGroupName={#MyAppName} 19 | OutputBaseFilename={#MyAppName}-{#MyAppVersion}-Windows-Installer 20 | Compression=lzma 21 | SolidCompression=yes 22 | 23 | [Languages] 24 | Name: "english"; MessagesFile: "compiler:Default.isl" 25 | 26 | [Files] 27 | Source: "..\release\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs 28 | Source: "..\COPYING.txt"; Flags: dontcopy 29 | ; NOTE: Don't use "Flags: ignoreversion" on any shared system files 30 | 31 | [Icons] 32 | Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}" 33 | Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}" 34 | 35 | [Code] 36 | procedure InitializeWizard(); 37 | var 38 | GPLText: AnsiString; 39 | Page: TOutputMsgMemoWizardPage; 40 | begin 41 | ExtractTemporaryFile('COPYING.txt'); 42 | LoadStringFromFile(ExpandConstant('{tmp}\COPYING.txt'), GPLText); 43 | Page := CreateOutputMsgMemoPage(wpWelcome, 44 | 'License Information', 'Please review the license terms before installing {#MyAppName}', 45 | 'Press Page Down to see the rest of the agreement. Once you are aware of your rights, click Next to continue.', 46 | String(GPLText) 47 | ); 48 | end; 49 | 50 | // credit where it's due : 51 | // following function come from https://github.com/Xaymar/obs-studio_amf-encoder-plugin/blob/master/%23Resources/Installer.in.iss#L45 52 | function GetDirName(Value: string): string; 53 | var 54 | InstallPath: string; 55 | begin 56 | // initialize default path, which will be returned when the following registry 57 | // key queries fail due to missing keys or for some different reason 58 | Result := '{pf}\obs-studio'; 59 | // query the first registry value; if this succeeds, return the obtained value 60 | if RegQueryStringValue(HKLM32, 'SOFTWARE\OBS Studio', '', InstallPath) then 61 | Result := InstallPath 62 | end; 63 | 64 | -------------------------------------------------------------------------------- /package/macOS-intro.txt: -------------------------------------------------------------------------------- 1 | This will automatically install the plugin to the appropriate directories. 2 | 3 | NOTICE: 4 | ======= 5 | This plugin depends on fftw3 (fftw.org), which you have to install manually. 6 | For this get the brew package manager from https://brew.sh and then run 7 | brew install fftw in a terminal. 8 | Also, I offer no support for macOS versions. 9 | -------------------------------------------------------------------------------- /src/source/visualizer_source.hpp: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is part of spectralizer 3 | * which is licensed under the GPL v2.0 4 | * See LICENSE or http://www.gnu.org/licenses 5 | * github.com/univrsal/spectralizer 6 | */ 7 | #pragma once 8 | 9 | #include "../util/util.hpp" 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | namespace audio { 16 | class audio_visualizer; 17 | } 18 | 19 | namespace source { 20 | 21 | struct config { 22 | std::mutex value_mutex; 23 | 24 | /* obs source stuff */ 25 | obs_source_t *source = nullptr; 26 | obs_data_t *settings = nullptr; 27 | 28 | /* Misc */ 29 | const char *fifo_path = defaults::fifo_path; 30 | bool auto_clear = false; 31 | pcm_stereo_sample *buffer = nullptr; 32 | 33 | /* Appearance settings */ 34 | visual_mode visual = defaults::visual; 35 | smooting_mode smoothing = defaults::smoothing; 36 | uint32_t color = defaults::color; 37 | uint16_t detail = defaults::detail, cx = defaults::cx, cy = defaults::cy; 38 | uint16_t fps = defaults::fps; 39 | 40 | /* Audio settings */ 41 | uint32_t sample_rate = defaults::sample_rate; 42 | uint32_t sample_size = defaults::sample_size; 43 | 44 | std::string audio_source_name = ""; 45 | double low_cutoff_freq = defaults::lfreq_cut; 46 | double high_cutoff_freq = defaults::hfreq_cut; 47 | 48 | /* smoothing */ 49 | uint32_t sgs_points = defaults::sgs_points, sgs_passes = defaults::sgs_passes; 50 | 51 | /* scaling */ 52 | bool use_auto_scale = defaults::use_auto_scale; 53 | double scale_boost = defaults::scale_boost; 54 | double scale_size = defaults::scale_size; 55 | 56 | double mcat_smoothing_factor = defaults::mcat_smooth; 57 | 58 | /* log frequency scale */ 59 | bool log_freq_scale = defaults::log_freq_scale; 60 | log_freq_qual log_freq_quality = defaults::log_freq_quality; 61 | double log_freq_start = defaults::log_freq_start; 62 | bool log_freq_use_hpf = defaults::log_freq_use_hpf; 63 | double log_freq_hpf_curve = defaults::log_freq_hpf_curve; 64 | 65 | /* Bar visualizer settings */ 66 | uint16_t bar_space = defaults::bar_space; 67 | uint16_t bar_width = defaults::bar_width; 68 | uint16_t bar_height = defaults::bar_height; 69 | uint16_t bar_min_height = defaults::bar_min_height; 70 | 71 | bool rounded_corners = false; 72 | float corner_radius = 0.5f; 73 | uint16_t corner_points = defaults::corner_points; 74 | 75 | /* Wire visualizer settings */ 76 | uint16_t wire_thickness = defaults::wire_thickness; 77 | enum wire_mode wire_mode = defaults::wire_mode; 78 | 79 | /* Circular visualizer settings */ 80 | float offset; // in degree 81 | float padding; // in % 82 | 83 | /* General spectrum settings */ 84 | bool stereo = defaults::stereo; 85 | int16_t stereo_space = 0; 86 | double falloff_weight = defaults::falloff_weight; 87 | double gravity = defaults::gravity; 88 | }; 89 | 90 | class visualizer_source { 91 | config m_config; 92 | audio::audio_visualizer *m_visualizer = nullptr; 93 | std::map m_source_names; 94 | 95 | public: 96 | visualizer_source(obs_source_t *source, obs_data_t *settings); 97 | ~visualizer_source(); 98 | 99 | inline void update(obs_data_t *settings); 100 | inline void tick(float seconds); 101 | inline void render(gs_effect_t *effect); 102 | 103 | uint32_t get_width() const { return m_config.cx; } 104 | 105 | uint32_t get_height() const { return m_config.cy; } 106 | 107 | void clear_source_names() { m_source_names.clear(); } 108 | void add_source(uint16_t id, const char *name) { m_source_names[id] = name; } 109 | }; 110 | 111 | /* Util for registering the source */ 112 | static obs_properties_t *get_properties_for_visualiser(void *data); 113 | 114 | void register_visualiser(); 115 | } 116 | -------------------------------------------------------------------------------- /src/spectralizer.cpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * This file is part of spectralizer 3 | * github.con/univrsal/spectralizer 4 | * Copyright 2020 univrsal . 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, version 2 of the License. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | *************************************************************************/ 18 | 19 | #include "source/visualizer_source.hpp" 20 | #include 21 | 22 | OBS_DECLARE_MODULE() 23 | 24 | OBS_MODULE_USE_DEFAULT_LOCALE("spectralizer", "en-US") 25 | 26 | MODULE_EXPORT const char *obs_module_description(void) 27 | { 28 | return "Spectrum visualizer"; 29 | } 30 | 31 | bool obs_module_load() 32 | { 33 | blog(LOG_INFO, "[spectralizer] Loading v%s build time %s", SPECTRALIZER_VERSION, BUILD_TIME); 34 | source::register_visualiser(); 35 | return true; 36 | } 37 | 38 | void obs_module_unload() 39 | { 40 | /* NO-OP */ 41 | } 42 | -------------------------------------------------------------------------------- /src/util/audio/audio_source.hpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * This file is part of spectralizer 3 | * github.con/univrsal/spectralizer 4 | * Copyright 2020 univrsal . 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, version 2 of the License. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | *************************************************************************/ 18 | 19 | #pragma once 20 | 21 | #define BUFFER_SIZE 1024 22 | 23 | namespace source { 24 | struct config; 25 | } 26 | 27 | namespace audio { 28 | /* Base class for audio reading */ 29 | class audio_source { 30 | protected: 31 | source::config *m_cfg; 32 | 33 | public: 34 | explicit audio_source(source::config *cfg) : m_cfg(cfg) {} 35 | 36 | virtual ~audio_source() {} 37 | 38 | /* obs_source methods */ 39 | virtual void update() = 0; 40 | virtual bool tick(float seconds) = 0; 41 | }; 42 | } 43 | -------------------------------------------------------------------------------- /src/util/audio/audio_visualizer.cpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * This file is part of spectralizer 3 | * github.con/univrsal/spectralizer 4 | * Copyright 2020 univrsal . 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, version 2 of the License. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | *************************************************************************/ 18 | 19 | #include "audio_visualizer.hpp" 20 | #include "../../source/visualizer_source.hpp" 21 | #include "audio_source.hpp" 22 | #include "fifo.hpp" 23 | #include "obs_internal_source.hpp" 24 | 25 | namespace audio { 26 | 27 | audio_visualizer::audio_visualizer(source::config *cfg) 28 | { 29 | m_cfg = cfg; 30 | } 31 | 32 | audio_visualizer::~audio_visualizer() 33 | { 34 | delete m_source; 35 | m_source = nullptr; 36 | } 37 | 38 | void audio_visualizer::update() 39 | { 40 | if (m_source) 41 | m_source->update(); 42 | if (!m_source || m_cfg->audio_source_name != m_source_id) { 43 | m_source_id = m_cfg->audio_source_name; 44 | if (m_source) 45 | delete m_source; 46 | if (m_cfg->audio_source_name.empty() || m_cfg->audio_source_name == std::string(defaults::audio_source)) { 47 | m_source = nullptr; 48 | } else if (m_cfg->audio_source_name == std::string("mpd")) { 49 | m_source = new fifo(m_cfg); 50 | } else { 51 | m_source = new obs_internal_source(m_cfg); 52 | } 53 | } 54 | } 55 | 56 | void audio_visualizer::tick(float seconds) 57 | { 58 | if (m_source) 59 | m_data_read = m_source->tick(seconds); 60 | else 61 | m_data_read = false; 62 | 63 | #ifdef LINUX 64 | if (m_cfg->auto_clear && !m_data_read) { 65 | /* Clear buffer */ 66 | memset(m_cfg->buffer, 0, m_cfg->sample_size * sizeof(pcm_stereo_sample)); 67 | } 68 | #endif 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /src/util/audio/audio_visualizer.hpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * This file is part of spectralizer 3 | * github.con/univrsal/spectralizer 4 | * Copyright 2020 univrsal . 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, version 2 of the License. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | *************************************************************************/ 18 | 19 | #pragma once 20 | 21 | #include 22 | #include 23 | 24 | namespace source { 25 | struct config; 26 | } 27 | 28 | namespace audio { 29 | class audio_source; 30 | 31 | class audio_visualizer { 32 | protected: 33 | audio::audio_source *m_source = nullptr; 34 | source::config *m_cfg = nullptr; 35 | std::string m_source_id = "none"; /* where to read audio from */ 36 | bool m_data_read = false; /* Audio source will return false if reading failed */ 37 | 38 | public: 39 | audio_visualizer(source::config *cfg); 40 | virtual ~audio_visualizer(); 41 | 42 | virtual void update(); 43 | 44 | /* Active is set to true, if the current tick is in sync with the 45 | * user configured fps */ 46 | virtual void tick(float seconds); 47 | 48 | virtual void render(gs_effect_t *effect) = 0; 49 | }; 50 | } 51 | -------------------------------------------------------------------------------- /src/util/audio/bar_visualizer.cpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * This file is part of spectralizer 3 | * github.con/univrsal/spectralizer 4 | * Copyright 2020 univrsal . 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, version 2 of the License. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | *************************************************************************/ 18 | 19 | #include "bar_visualizer.hpp" 20 | #include "../../source/visualizer_source.hpp" 21 | #include "../../util/util.hpp" 22 | 23 | namespace audio { 24 | 25 | void bar_visualizer::draw_rectangle_bars() 26 | { 27 | size_t i = 0, pos_x = 0; 28 | uint32_t height; 29 | for (; i < m_bars_left.size() - DEAD_BAR_OFFSET; i++) { /* Leave the four dead bars the end */ 30 | auto val = m_bars_left[i] > 1.0 ? m_bars_left[i] : 1.0; 31 | height = UTIL_MAX(static_cast(round(val)), 1); 32 | height = UTIL_MIN(height, m_cfg->bar_height); 33 | 34 | pos_x = i * (m_cfg->bar_width + m_cfg->bar_space); 35 | gs_matrix_push(); 36 | gs_matrix_translate3f(pos_x, (m_cfg->bar_height - height), 0); 37 | gs_draw_sprite(nullptr, 0, m_cfg->bar_width, height); 38 | gs_matrix_pop(); 39 | } 40 | } 41 | 42 | void bar_visualizer::draw_stereo_rectangle_bars() 43 | { 44 | size_t i = 0, pos_x = 0; 45 | uint32_t height_l, height_r; 46 | uint32_t offset = m_cfg->stereo_space / 2; 47 | uint32_t center = m_cfg->bar_height / 2 + offset; 48 | 49 | for (; i < m_bars_left.size() - DEAD_BAR_OFFSET; i++) { /* Leave the four dead bars the end */ 50 | double bar_left = (m_bars_left[i] > 1.0 ? m_bars_left[i] : 1.0); 51 | double bar_right = (m_bars_right[i] > 1.0 ? m_bars_right[i] : 1.0); 52 | 53 | height_l = UTIL_MAX(static_cast(round(bar_left)), 1); 54 | height_l = UTIL_MIN(height_l, (m_cfg->bar_height / 2)); 55 | height_r = UTIL_MAX(static_cast(round(bar_right)), 1); 56 | height_r = UTIL_MIN(height_r, (m_cfg->bar_height / 2)); 57 | 58 | pos_x = i * (m_cfg->bar_width + m_cfg->bar_space); 59 | 60 | /* Top */ 61 | gs_matrix_push(); 62 | gs_matrix_translate3f(pos_x, (center - height_l) - offset, 0); 63 | gs_draw_sprite(nullptr, 0, m_cfg->bar_width, height_l); 64 | gs_matrix_pop(); 65 | 66 | /* Bottom */ 67 | gs_matrix_push(); 68 | gs_matrix_translate3f(pos_x, center + offset, 0); 69 | gs_draw_sprite(nullptr, 0, m_cfg->bar_width, height_r); 70 | gs_matrix_pop(); 71 | } 72 | } 73 | 74 | void bar_visualizer::draw_rounded_bars() 75 | { 76 | size_t i = 0, pos_x = 0; 77 | uint32_t height; 78 | uint32_t vert_count = m_cfg->corner_points * 4; 79 | for (; i < m_bars_left.size() - DEAD_BAR_OFFSET; i++) { /* Leave the four dead bars the end */ 80 | vert_count = 0; 81 | auto val = m_bars_left[i] > 1.0 ? m_bars_left[i] : 1.0; 82 | 83 | // The bar needs to be at least a square so the circle fits 84 | height = UTIL_MAX(static_cast(round(val)), m_cfg->bar_width); 85 | height = UTIL_MIN(height, m_cfg->bar_height); 86 | 87 | pos_x = i * (m_cfg->bar_width + m_cfg->bar_space); 88 | auto verts = make_rounded_rectangle(height); 89 | gs_matrix_push(); 90 | gs_load_vertexbuffer(verts); 91 | gs_matrix_translate3f(pos_x, (m_cfg->bar_height - height), 0); 92 | gs_draw(GS_TRISTRIP, 0, (m_cfg->corner_points + 1) * 8 + 20); 93 | gs_matrix_pop(); 94 | gs_vertexbuffer_destroy(verts); 95 | } 96 | } 97 | 98 | void bar_visualizer::draw_stereo_rounded_bars() 99 | { 100 | 101 | size_t i = 0, pos_x = 0; 102 | uint32_t height_l, height_r; 103 | int32_t offset = m_cfg->stereo_space / 2; 104 | uint32_t center = m_cfg->bar_height / 2 + offset; 105 | 106 | for (; i < m_bars_left.size() - DEAD_BAR_OFFSET; i++) { /* Leave the four dead bars the end */ 107 | double bar_left = (m_bars_left[i] > 1.0 ? m_bars_left[i] : 1.0); 108 | double bar_right = (m_bars_right[i] > 1.0 ? m_bars_right[i] : 1.0); 109 | 110 | // The bar needs to be at least a square so the circle fits 111 | height_l = UTIL_MAX(static_cast(round(bar_left)), m_cfg->bar_width); 112 | height_l = UTIL_MIN(height_l, (m_cfg->bar_height / 2)); 113 | height_r = UTIL_MAX(static_cast(round(bar_right)), m_cfg->bar_width); 114 | height_r = UTIL_MIN(height_r, (m_cfg->bar_height / 2)); 115 | 116 | pos_x = i * (m_cfg->bar_width + m_cfg->bar_space); 117 | auto verts_left = make_rounded_rectangle(height_l); 118 | auto verts_right = make_rounded_rectangle(height_r); 119 | 120 | /* Top */ 121 | gs_matrix_push(); 122 | gs_load_vertexbuffer(verts_left); 123 | gs_matrix_translate3f(pos_x, (center - height_l) - offset, 0); 124 | gs_draw(GS_TRISTRIP, 0, (m_cfg->corner_points + 1) * 8 + 20); 125 | gs_matrix_pop(); 126 | 127 | /* Bottom */ 128 | gs_matrix_push(); 129 | gs_load_vertexbuffer(verts_right); 130 | gs_matrix_translate3f(pos_x, center + offset, 0); 131 | gs_draw(GS_TRISTRIP, 0, (m_cfg->corner_points + 1) * 8 + 20); 132 | gs_matrix_pop(); 133 | 134 | gs_vertexbuffer_destroy(verts_left); 135 | gs_vertexbuffer_destroy(verts_right); 136 | } 137 | } 138 | 139 | bar_visualizer::bar_visualizer(source::config *cfg) : spectrum_visualizer(cfg) {} 140 | 141 | void bar_visualizer::render(gs_effect_t *effect) 142 | { 143 | /* Just in case */ 144 | if (m_bars_left.size() != m_cfg->detail + DEAD_BAR_OFFSET) 145 | m_bars_left.resize(m_cfg->detail + DEAD_BAR_OFFSET, 0.0); 146 | if (m_bars_right.size() != m_cfg->detail + DEAD_BAR_OFFSET) 147 | m_bars_right.resize(m_cfg->detail + DEAD_BAR_OFFSET, 0.0); 148 | 149 | if (m_cfg->stereo) { 150 | if (m_cfg->rounded_corners) { 151 | draw_stereo_rounded_bars(); 152 | } else { 153 | draw_stereo_rectangle_bars(); 154 | } 155 | } else { 156 | if (m_cfg->rounded_corners) { 157 | draw_rounded_bars(); 158 | } else { 159 | draw_rectangle_bars(); 160 | } 161 | } 162 | UNUSED_PARAMETER(effect); 163 | } 164 | 165 | } 166 | -------------------------------------------------------------------------------- /src/util/audio/bar_visualizer.hpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * This file is part of spectralizer 3 | * github.con/univrsal/spectralizer 4 | * Copyright 2020 univrsal . 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, version 2 of the License. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | *************************************************************************/ 18 | 19 | #pragma once 20 | #include "spectrum_visualizer.hpp" 21 | 22 | namespace audio { 23 | class bar_visualizer : public spectrum_visualizer { 24 | void draw_rectangle_bars(); 25 | void draw_stereo_rectangle_bars(); 26 | void draw_rounded_bars(); 27 | void draw_stereo_rounded_bars(); 28 | 29 | public: 30 | explicit bar_visualizer(source::config *cfg); 31 | void render(gs_effect_t *effect) override; 32 | }; 33 | } 34 | -------------------------------------------------------------------------------- /src/util/audio/circle_bar_visualizer.cpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * This file is part of spectralizer 3 | * github.con/univrsal/spectralizer 4 | * Copyright 2020 univrsal . 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, version 2 of the License. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | *************************************************************************/ 18 | 19 | #include "circle_bar_visualizer.hpp" 20 | #include "../../source/visualizer_source.hpp" 21 | 22 | namespace audio { 23 | void circle_bar_visualizer::draw_square_rectangle_circle() 24 | { 25 | // First translate everything to the center, offset for rotation, rotate, undo offset 26 | auto count = m_bars_left.size() - DEAD_BAR_OFFSET; 27 | for (size_t i = 0; i < count; i++) { /* Leave the four dead bars the end */ 28 | float pos = float(i) / (count); 29 | auto w = UTIL_MAX(m_bars_left[i], 1); 30 | gs_matrix_push(); 31 | { 32 | gs_matrix_translate3f(m_cfg->cx / 2, m_cfg->cx / 2 + m_radius, 0); 33 | 34 | gs_matrix_translate3f(0, -m_radius, 0); 35 | gs_matrix_rotaa4f(0, 0, 1, pos * (M_PI * 2 - m_padding) + m_cfg->offset); 36 | gs_matrix_translate3f(0, m_radius, 0); 37 | 38 | gs_draw_sprite(nullptr, 0, m_cfg->bar_width, w); 39 | } 40 | gs_matrix_pop(); 41 | } 42 | } 43 | 44 | void circle_bar_visualizer::draw_rounded_bar_circle() 45 | { 46 | // First translate everything to the center, offset for rotation, rotate, undo offset 47 | auto count = m_bars_left.size() - DEAD_BAR_OFFSET; 48 | for (size_t i = 0; i < count; i++) { /* Leave the four dead bars the end */ 49 | float pos = float(i) / (count); 50 | auto w = UTIL_MAX(m_bars_left[i], m_cfg->bar_width); 51 | auto verts = make_rounded_rectangle(w); 52 | gs_matrix_push(); 53 | { 54 | gs_load_vertexbuffer(verts); 55 | gs_matrix_translate3f(m_cfg->cx / 2, m_cfg->cx / 2 + m_radius, 0); 56 | gs_matrix_translate3f(0, -m_radius, 0); 57 | gs_matrix_rotaa4f(0, 0, 1, pos * (M_PI * 2 - m_padding) + m_cfg->offset); 58 | gs_matrix_translate3f(0, m_radius, 0); 59 | gs_draw(GS_TRISTRIP, 0, (m_cfg->corner_points + 1) * 8 + 20); 60 | } 61 | gs_matrix_pop(); 62 | gs_vertexbuffer_destroy(verts); 63 | } 64 | } 65 | 66 | circle_bar_visualizer::circle_bar_visualizer(source::config *cfg) : spectrum_visualizer(cfg) 67 | { 68 | update(); 69 | } 70 | 71 | void circle_bar_visualizer::render(gs_effect_t *) 72 | { 73 | if (m_cfg->rounded_corners) { 74 | draw_rounded_bar_circle(); 75 | } else { 76 | draw_square_rectangle_circle(); 77 | } 78 | } 79 | 80 | void circle_bar_visualizer::update() 81 | { 82 | spectrum_visualizer::update(); 83 | auto count = m_bars_left.empty() ? m_cfg->detail : m_bars_left.size(); 84 | float spectrum_width = ((m_cfg->bar_width + m_cfg->bar_space) * count); 85 | m_radius = (spectrum_width * (1 + m_cfg->padding)) / (2 * M_PI); 86 | m_padding = m_cfg->padding * 2 * M_PI; 87 | m_cfg->cx = m_radius * 2 + m_cfg->bar_height * 2; 88 | m_cfg->cy = m_cfg->cx; 89 | } 90 | 91 | } 92 | -------------------------------------------------------------------------------- /src/util/audio/circle_bar_visualizer.hpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * This file is part of spectralize 3 | * github.con/univrsal/spectralize 4 | * Copyright 2020 univrsal . 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, version 2 of the License. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | *************************************************************************/ 18 | 19 | #pragma once 20 | #include "spectrum_visualizer.hpp" 21 | 22 | namespace audio { 23 | class circle_bar_visualizer : public spectrum_visualizer { 24 | float m_radius = 0.0; 25 | float m_padding = 0.0; 26 | 27 | void draw_square_rectangle_circle(); 28 | void draw_rounded_bar_circle(); 29 | 30 | public: 31 | explicit circle_bar_visualizer(source::config *cfg); 32 | void render(gs_effect_t *effect) override; 33 | void update() override; 34 | }; 35 | } 36 | -------------------------------------------------------------------------------- /src/util/audio/fifo.cpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * This file is part of spectralizer 3 | * github.con/univrsal/spectralizer 4 | * Copyright 2020 univrsal . 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, version 2 of the License. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | *************************************************************************/ 18 | 19 | #ifdef LINUX 20 | #include "fifo.hpp" 21 | #include "../../source/visualizer_source.hpp" 22 | #include 23 | #include 24 | #include 25 | 26 | #define MAX_READ_ATTEMPTS 100 27 | #define READ_ATTEMPT_SLEEP 1L * 1000000L 28 | 29 | namespace audio { 30 | 31 | fifo::fifo(source::config *cfg) : audio_source(cfg) 32 | { 33 | update(); 34 | } 35 | 36 | fifo::~fifo() 37 | { 38 | if (m_fifo_fd) 39 | close(m_fifo_fd); 40 | m_fifo_fd = 0; 41 | } 42 | 43 | void fifo::update() 44 | { 45 | m_file_path = m_cfg->fifo_path; 46 | open_fifo(); 47 | } 48 | 49 | bool fifo::tick(float seconds) 50 | { 51 | if (m_fifo_fd < 0 && !open_fifo()) 52 | return false; 53 | 54 | auto buffer_size_bytes = static_cast(sizeof(pcm_stereo_sample) * m_cfg->sample_size); 55 | size_t bytes_left = buffer_size_bytes; 56 | auto attempts = 0; 57 | memset(m_cfg->buffer, 0, buffer_size_bytes); 58 | 59 | while (bytes_left > 0) { 60 | int64_t bytes_read = read(m_fifo_fd, m_cfg->buffer, bytes_left); 61 | 62 | if (bytes_read == 0) { 63 | debug("Could not read any bytes"); 64 | return false; 65 | } else if (bytes_read == -1) { 66 | if (errno == EAGAIN) { 67 | if (attempts > MAX_READ_ATTEMPTS) { 68 | debug("Couldn't finish reading buffer, bytes read: %d," 69 | "buffer size: %d", 70 | bytes_read, buffer_size_bytes); 71 | memset(m_cfg->buffer, 0, buffer_size_bytes); 72 | close(m_fifo_fd); 73 | m_fifo_fd = -1; 74 | return false; 75 | } 76 | /* TODO: Sleep? Would delay thread */ 77 | ++attempts; 78 | } else { 79 | debug("Error reading file: %d %s", errno, strerror(errno)); 80 | } 81 | } else { 82 | bytes_left -= (size_t)bytes_read; 83 | } 84 | } 85 | 86 | return true; 87 | } 88 | 89 | bool fifo::open_fifo() 90 | { 91 | if (m_fifo_fd) 92 | close(m_fifo_fd); 93 | 94 | if (m_file_path && strlen(m_file_path) > 0) { 95 | m_fifo_fd = open(m_file_path, O_RDONLY); 96 | 97 | if (m_fifo_fd < 0) { 98 | warn("Failed to open fifo '%s'", m_file_path); 99 | } else { 100 | auto flags = fcntl(m_fifo_fd, F_GETFL, 0); 101 | auto ret = fcntl(m_fifo_fd, F_SETFL, flags | O_NONBLOCK); 102 | if (ret < 0) 103 | warn("Failed to set fifo flags!"); 104 | return ret >= 0; 105 | } 106 | } 107 | return false; 108 | } 109 | } /* namespace audio */ 110 | #endif /* LINUX */ 111 | -------------------------------------------------------------------------------- /src/util/audio/fifo.hpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * This file is part of spectralizer 3 | * github.con/univrsal/spectralizer 4 | * Copyright 2020 univrsal . 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, version 2 of the License. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | *************************************************************************/ 18 | 19 | #include "audio_source.hpp" 20 | 21 | namespace audio { 22 | class fifo : public audio_source { 23 | #ifdef LINUX 24 | private: 25 | const char *m_file_path = nullptr; 26 | int m_fifo_fd = 0; 27 | bool open_fifo(); 28 | 29 | public: 30 | fifo(source::config *cfg); 31 | ~fifo() override; 32 | void update() override; 33 | bool tick(float seconds) override; 34 | #else /* Stubs on Windows */ 35 | public: 36 | fifo(source::config *cfg) : audio_source(cfg) {} 37 | ~fifo() override {} 38 | void update() override {} 39 | bool tick(float seconds) override { return false; } 40 | #endif /* Linux */ 41 | }; 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/util/audio/obs_internal_source.cpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * This file is part of spectralizer 3 | * github.con/univrsal/spectralizer 4 | * Copyright 2020 univrsal . 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, version 2 of the License. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | *************************************************************************/ 18 | 19 | #include "obs_internal_source.hpp" 20 | #include "../../source/visualizer_source.hpp" 21 | #include 22 | 23 | #define DEFAULT_AUDIO_BUF_MS 10 24 | #define MS_IN_S 100 25 | 26 | namespace audio { 27 | 28 | static void audio_capture(void *param, obs_source_t *src, const struct audio_data *data, bool muted) 29 | { 30 | obs_internal_source *s = reinterpret_cast(param); 31 | if (s) 32 | s->capture(src, data, muted); 33 | } 34 | 35 | obs_internal_source::obs_internal_source(source::config *cfg) : audio_source(cfg) 36 | { 37 | circlebuf_init(&m_audio_data[0]); 38 | circlebuf_init(&m_audio_data[1]); 39 | update(); 40 | // make sure that the buffer is empty on startup 41 | memset(m_audio_buf[0], 0, m_audio_buf_len * sizeof(float)); 42 | memset(m_audio_buf[1], 0, m_audio_buf_len * sizeof(float)); 43 | } 44 | 45 | obs_internal_source::~obs_internal_source() 46 | { 47 | if (m_capture_source) { 48 | obs_source_t *source = obs_weak_source_get_source(m_capture_source); 49 | if (source) { 50 | info("Removed audio capture from '%s'", obs_source_get_name(source)); 51 | obs_source_remove_audio_capture_callback(source, audio_capture, this); 52 | obs_source_release(source); 53 | } 54 | obs_weak_source_release(m_capture_source); 55 | } 56 | 57 | for (size_t i = 0; i < 2; i++) { 58 | circlebuf_free(&m_audio_data[i]); 59 | bfree(m_audio_buf[i]); 60 | } 61 | } 62 | 63 | void obs_internal_source::capture(obs_source_t *src, const struct audio_data *data, bool muted) 64 | { 65 | m_cfg->value_mutex.lock(); 66 | 67 | if (m_max_capture_frames < data->frames) 68 | m_max_capture_frames = data->frames; 69 | 70 | size_t expected = m_max_capture_frames * sizeof(float); 71 | 72 | if (expected) { 73 | if (m_audio_data[0].size > expected * 2) { 74 | for (auto &buf : m_audio_data) { 75 | circlebuf_pop_front(&buf, nullptr, expected); 76 | } 77 | } 78 | 79 | if (muted) { 80 | for (size_t i = 0; i < UTIL_MIN(m_num_channels, 2); i++) { 81 | circlebuf_push_back_zero(&m_audio_data[i], data->frames * sizeof(float)); 82 | } 83 | } else { 84 | for (size_t i = 0; i < UTIL_MIN(m_num_channels, 2); i++) { 85 | circlebuf_push_back(&m_audio_data[i], data->data[i], data->frames * sizeof(float)); 86 | } 87 | } 88 | } 89 | 90 | #ifdef LINUX 91 | if (m_cfg->auto_clear) 92 | m_last_capture = os_gettime_ns(); 93 | #endif 94 | m_cfg->value_mutex.unlock(); 95 | } 96 | 97 | bool obs_internal_source::tick(float seconds) 98 | { 99 | /* Audio capturing is done in separate callback 100 | * and is technically only finished, once the circle buffer is 101 | * filled, but we'll just assume that's always the case */ 102 | 103 | /* Update / refresh audio capturing */ 104 | std::string new_name = ""; 105 | if (!m_capture_name.empty() && !m_capture_source) { 106 | uint64_t t = os_gettime_ns(); 107 | 108 | if (t - m_capture_check_time > 3000000000) { 109 | new_name = m_capture_name; 110 | m_capture_check_time = t; 111 | } 112 | } 113 | 114 | if (!new_name.empty()) { 115 | obs_source_t *capture = obs_get_source_by_name(new_name.c_str()); 116 | obs_weak_source_t *weak_capture = capture ? obs_source_get_weak_source(capture) : NULL; 117 | 118 | if (!m_capture_name.empty() && new_name == m_capture_name) { 119 | m_capture_source = weak_capture; 120 | weak_capture = nullptr; 121 | } 122 | 123 | if (capture) { 124 | info("Added audio capture to '%s'", obs_source_get_name(capture)); 125 | obs_source_add_audio_capture_callback(capture, audio_capture, this); 126 | obs_weak_source_release(weak_capture); 127 | obs_source_release(capture); 128 | } 129 | } 130 | 131 | /* Copy captured data */ 132 | size_t data_size = m_audio_buf_len * sizeof(float); 133 | if (!data_size) { 134 | debug("Buffer is empty"); 135 | return false; 136 | } 137 | 138 | if (m_audio_data[0].size < data_size) { 139 | /* Clear buffers */ 140 | memset(m_audio_buf[0], 0, data_size); 141 | memset(m_audio_buf[1], 0, data_size); 142 | debug("No Data in circle buffer"); 143 | return false; 144 | } else { 145 | /* Otherwise copy & convert */ 146 | for (size_t i = 0; i < UTIL_MIN(m_num_channels, 2); i++) { 147 | circlebuf_pop_front(&m_audio_data[i], m_audio_buf[i], data_size); 148 | } 149 | 150 | /* Convert to int16 */ 151 | for (size_t chan = 0; chan < UTIL_MIN(m_num_channels, 2); chan++) { 152 | if (!m_audio_buf[chan]) 153 | continue; 154 | 155 | for (uint32_t i = 0; i < m_audio_buf_len; i++) { 156 | if (chan == 0) { 157 | m_cfg->buffer[i].l = static_cast(m_audio_buf[chan][i] * (UINT16_MAX / 2)); 158 | } else { 159 | m_cfg->buffer[i].r = static_cast(m_audio_buf[chan][i] * (UINT16_MAX / 2)); 160 | } 161 | } 162 | } 163 | } 164 | 165 | return true; 166 | } 167 | 168 | void obs_internal_source::resize_audio_buf(size_t new_len) 169 | { 170 | m_audio_buf_len = new_len; 171 | m_audio_buf[0] = static_cast(brealloc(m_audio_buf[0], new_len * sizeof(float))); 172 | m_audio_buf[1] = static_cast(brealloc(m_audio_buf[1], new_len * sizeof(float))); 173 | } 174 | 175 | void obs_internal_source::update() 176 | { 177 | m_cfg->sample_rate = audio_output_get_sample_rate(obs_get_audio()); 178 | /* Usually the frame rate is used as a divisor, but 179 | * it seems that rates below 60 result in a sample size that's too large 180 | * and therefore will break the visualizer so I'll just use 60 as a constant here 181 | */ 182 | m_cfg->sample_size = m_cfg->sample_rate / 60; 183 | // FIXME see comment in visualizer_source.cpp: get_properties_for_visualiser() 184 | /*if (m_cfg->log_freq_scale) { 185 | if (m_cfg->log_freq_quality == LFQ_PRECISE) { 186 | m_cfg->sample_size *= defaults::log_freq_quality_precise_detail_mul; 187 | } else { 188 | m_cfg->sample_size *= defaults::log_freq_quality_fast_detail_mul; 189 | } 190 | }*/ 191 | m_num_channels = audio_output_get_channels(obs_get_audio()); 192 | obs_weak_source_t *old = nullptr; 193 | 194 | if (m_cfg->audio_source_name.empty()) { 195 | if (m_capture_source) { 196 | old = m_capture_source; 197 | m_capture_source = nullptr; 198 | } 199 | m_capture_name = ""; 200 | } else { 201 | if (m_capture_name.empty() || m_capture_name != m_cfg->audio_source_name) { 202 | if (m_capture_source) { 203 | old = m_capture_source; 204 | m_capture_source = nullptr; 205 | } 206 | m_capture_name = m_cfg->audio_source_name; 207 | m_capture_check_time = os_gettime_ns() - 3000000000; 208 | } 209 | } 210 | 211 | if (old) { 212 | obs_source_t *old_source = obs_weak_source_get_source(old); 213 | if (old_source) { 214 | info("Removed audio capture from '%s'", obs_source_get_name(old_source)); 215 | obs_source_remove_audio_capture_callback(old_source, audio_capture, this); 216 | obs_source_release(old_source); 217 | } 218 | obs_weak_source_release(old); 219 | } 220 | 221 | if (m_audio_buf_len != m_cfg->sample_size) 222 | resize_audio_buf(m_cfg->sample_size); 223 | } 224 | 225 | } 226 | -------------------------------------------------------------------------------- /src/util/audio/obs_internal_source.hpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * This file is part of spectralizer 3 | * github.con/univrsal/spectralizer 4 | * Copyright 2020 univrsal . 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, version 2 of the License. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | *************************************************************************/ 18 | 19 | #pragma once 20 | #include "audio_source.hpp" 21 | #include 22 | #include 23 | #include 24 | #include 25 | 26 | namespace audio { 27 | 28 | class obs_internal_source : public audio_source { 29 | std::string m_capture_name = ""; 30 | obs_weak_source_t *m_capture_source = nullptr; 31 | size_t m_max_capture_frames = 0; 32 | uint8_t m_num_channels = 0; 33 | uint64_t m_capture_check_time = 0; 34 | circlebuf m_audio_data[2]; /* Left & Right data from capture callback */ 35 | float *m_audio_buf[2]{}; /* Copy of captured audio */ 36 | size_t m_audio_buf_len = 0; 37 | #ifdef LINUX 38 | /* Used to keep track of last audio capture callback to decide 39 | * whether audio playback has stopped to clear the buffer. 40 | * This usually is needed when JACK is used 41 | */ 42 | uint64_t m_last_capture = 0; 43 | #endif 44 | void resize_audio_buf(size_t new_len); 45 | 46 | public: 47 | obs_internal_source(source::config *cfg); 48 | ~obs_internal_source() override; 49 | 50 | bool tick(float seconds) override; 51 | void update() override; 52 | 53 | void capture(obs_source_t *src, const struct audio_data *data, bool muted); 54 | }; 55 | 56 | } 57 | -------------------------------------------------------------------------------- /src/util/audio/spectrum_visualizer.hpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * This file is part of spectralizer 3 | * github.con/univrsal/spectralizer 4 | * Copyright 2020 univrsal . 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, version 2 of the License. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | *************************************************************************/ 18 | 19 | #pragma once 20 | #include "../util.hpp" 21 | #include "audio_visualizer.hpp" 22 | #include 23 | #include 24 | 25 | #define DEAD_BAR_OFFSET 5 /* The last five bars seem to always be silent, so we cut them off */ 26 | 27 | /* Save some writing */ 28 | using doublev = std::vector; 29 | using uint32v = std::vector; 30 | 31 | namespace audio { 32 | 33 | class spectrum_visualizer : public audio_visualizer { 34 | uint32_t m_last_bar_count; 35 | double m_last_log_freq_start; 36 | bool m_sleeping = false; 37 | float m_sleep_count = 0.f; 38 | /* fft calculation vars */ 39 | size_t m_fftw_results; 40 | double *m_fftw_input_left; 41 | double *m_fftw_input_right; 42 | /* log scale related containers */ 43 | doublev m_bar_freq; 44 | doublev m_fftw_magnitudes; 45 | 46 | fftw_complex *m_fftw_output_left; 47 | fftw_complex *m_fftw_output_right; 48 | 49 | fftw_plan m_fftw_plan_left; 50 | fftw_plan m_fftw_plan_right; 51 | 52 | /* Frequency cutoff variables */ 53 | uint32v m_low_cutoff_frequencies; 54 | uint32v m_high_cutoff_frequencies; 55 | doublev m_frequency_constants_per_bin; 56 | 57 | uint64_t m_silent_runs; /* determines sleep state */ 58 | 59 | bool prepare_fft_input(pcm_stereo_sample *buffer, uint32_t sample_size, double *fftw_input, 60 | channel_mode channel_mode); 61 | 62 | void create_spectrum_bars(fftw_complex *fftw_output, size_t fftw_results, int32_t win_height, 63 | uint32_t number_of_bars, doublev *bars); 64 | 65 | void generate_bars(uint32_t number_of_bars, size_t fftw_results, const uint32v &low_cutoff_frequencies, 66 | const uint32v &high_cutoff_frequencies, const fftw_complex *fftw_output, doublev *bars) const; 67 | void generate_log_bars(uint32_t number_of_bars, size_t fftw_results, const fftw_complex *fftw_output, 68 | doublev &magnitudes, doublev &bars) const; 69 | 70 | void recalculate_cutoff_frequencies(uint32_t number_of_bars, uint32v *low_cutoff_frequencies, 71 | uint32v *high_cutoff_frequencies, doublev *freqconst_per_bin); 72 | void recalculate_target_log_frequencies(uint32_t number_of_bars); 73 | void smooth_bars(doublev *bars); 74 | void apply_falloff(const doublev &bars, doublev *falloff_bars) const; 75 | void calculate_moving_average_and_std_dev(double new_value, size_t max_number_of_elements, doublev *old_values, 76 | double *moving_average, double *std_dev) const; 77 | void maybe_reset_scaling_window(double current_max_height, size_t max_number_of_elements, doublev *values, 78 | double *moving_average, double *std_dev); 79 | void scale_bars(int32_t height, doublev *bars); 80 | void sgs_smoothing(doublev *bars); 81 | void monstercat_smoothing(doublev *bars); 82 | 83 | protected: 84 | /* New values are smoothly copied over if smoothing is used 85 | * otherwise they're directly copied */ 86 | doublev m_bars_left, m_bars_right, m_bars_left_new, m_bars_right_new; 87 | // doublev m_bars_falloff_left, m_bars_falloff_right; 88 | doublev m_previous_max_heights; 89 | doublev m_monstercat_smoothing_weights; 90 | 91 | gs_vertbuffer_t *make_rounded_rectangle(float height); 92 | float m_corner_radius = 0; 93 | std::vector m_circle_points; 94 | 95 | public: 96 | explicit spectrum_visualizer(source::config *cfg); 97 | 98 | ~spectrum_visualizer() override; 99 | 100 | virtual void update() override; 101 | 102 | void tick(float seconds) override; 103 | }; 104 | 105 | } 106 | -------------------------------------------------------------------------------- /src/util/audio/wire_visualizer.cpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * This file is part of spectralizer 3 | * github.con/univrsal/spectralizer 4 | * Copyright 2020 univrsal . 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, version 2 of the License. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | *************************************************************************/ 18 | 19 | #include "wire_visualizer.hpp" 20 | #include "../../source/visualizer_source.hpp" 21 | #include 22 | 23 | namespace audio { 24 | wire_visualizer::wire_visualizer(source::config *cfg) : spectrum_visualizer(cfg) {} 25 | 26 | gs_vertbuffer_t *wire_visualizer::make_thin(channel_mode cm) 27 | { 28 | gs_render_start(true); 29 | size_t i = 0, pos_x = 0; 30 | int32_t height = 0; 31 | int32_t offset = 0; 32 | int32_t center = 0; 33 | 34 | if (cm != CM_BOTH) { 35 | offset = m_cfg->stereo_space / 2; 36 | center = m_cfg->bar_height / 2 + offset; 37 | } 38 | 39 | if (cm == CM_RIGHT) { 40 | for (; i < UTIL_MIN(m_cfg->detail + 1, m_bars_right.size()); i++) { 41 | auto val = m_bars_right[i]; 42 | height = UTIL_MAX(static_cast(round(val)), 1); 43 | 44 | pos_x = i * (m_cfg->bar_width + m_cfg->bar_space); 45 | gs_vertex2f(pos_x, center + offset + height); 46 | } 47 | } else if (cm == CM_LEFT) { 48 | for (; i < UTIL_MIN(m_cfg->detail + 1, m_bars_left.size()); i++) { 49 | auto val = m_bars_left[i]; 50 | height = UTIL_MAX(static_cast(round(val)), 1); 51 | 52 | pos_x = i * (m_cfg->bar_width + m_cfg->bar_space); 53 | gs_vertex2f(pos_x, center - offset - height); 54 | } 55 | } else { 56 | for (; i < UTIL_MIN(m_cfg->detail + 1, m_bars_left.size()); i++) { 57 | auto val = m_bars_left[i]; 58 | height = UTIL_MAX(static_cast(round(val)), 1); 59 | 60 | pos_x = i * (m_cfg->bar_width + m_cfg->bar_space); 61 | gs_vertex2f(pos_x, m_cfg->bar_height - height); 62 | } 63 | } 64 | 65 | return gs_render_save(); 66 | } 67 | 68 | gs_vertbuffer_t *wire_visualizer::make_thick(channel_mode cm) 69 | { 70 | gs_render_start(true); 71 | size_t i = 0, pos_x = 0; 72 | int32_t height = 0; 73 | int32_t offset = 0; 74 | int32_t center = 0; 75 | 76 | if (cm != CM_BOTH) { 77 | offset = m_cfg->stereo_space / 2; 78 | center = m_cfg->bar_height / 2 + offset; 79 | } 80 | 81 | if (cm == CM_RIGHT) { 82 | for (; i < UTIL_MIN(m_cfg->detail + 1, m_bars_right.size()); i++) { 83 | auto val = m_bars_right[i]; 84 | height = UTIL_MAX(static_cast(round(val)), 1); 85 | 86 | pos_x = i * (m_cfg->bar_width + m_cfg->bar_space); 87 | gs_vertex2f(pos_x, center + offset + height); 88 | gs_vertex2f(pos_x, center + offset + height - m_cfg->wire_thickness); 89 | } 90 | } else if (cm == CM_LEFT) { 91 | for (; i < UTIL_MIN(m_cfg->detail + 1, m_bars_left.size()); i++) { 92 | auto val = m_bars_left[i]; 93 | height = UTIL_MAX(static_cast(round(val)), 1); 94 | 95 | pos_x = i * (m_cfg->bar_width + m_cfg->bar_space); 96 | gs_vertex2f(pos_x, center - offset - height); 97 | gs_vertex2f(pos_x, center - offset - height + m_cfg->wire_thickness); 98 | } 99 | } else { 100 | for (; i < UTIL_MIN(m_cfg->detail + 1, m_bars_left.size()); i++) { 101 | auto val = m_bars_left[i]; 102 | height = UTIL_MAX(static_cast(round(val)), 1); 103 | 104 | pos_x = i * (m_cfg->bar_width + m_cfg->bar_space); 105 | gs_vertex2f(pos_x, m_cfg->bar_height - height); 106 | gs_vertex2f(pos_x, m_cfg->bar_height - height + m_cfg->wire_thickness); 107 | } 108 | } 109 | return gs_render_save(); 110 | } 111 | 112 | gs_vertbuffer_t *wire_visualizer::make_filled(channel_mode cm) 113 | { 114 | 115 | gs_render_start(true); 116 | size_t i = 0, pos_x = 0; 117 | int32_t height = 0; 118 | int32_t offset = 0; 119 | int32_t center = 0; 120 | 121 | if (cm != CM_BOTH) { 122 | offset = m_cfg->stereo_space / 2; 123 | center = m_cfg->bar_height / 2 + offset; 124 | } 125 | 126 | if (cm == CM_RIGHT) { 127 | for (; i < UTIL_MIN(m_cfg->detail + 1, m_bars_right.size()); i++) { 128 | auto val = m_bars_right[i]; 129 | height = UTIL_MAX(static_cast(round(val)), 1); 130 | 131 | pos_x = i * (m_cfg->bar_width + m_cfg->bar_space); 132 | gs_vertex2f(pos_x, center + offset + height); 133 | gs_vertex2f(pos_x, center + offset); 134 | } 135 | } else if (cm == CM_LEFT) { 136 | for (; i < UTIL_MIN(m_cfg->detail + 1, m_bars_left.size()); i++) { 137 | auto val = m_bars_left[i]; 138 | height = UTIL_MAX(static_cast(round(val)), 1); 139 | 140 | pos_x = i * (m_cfg->bar_width + m_cfg->bar_space); 141 | gs_vertex2f(pos_x, center - offset - height); 142 | gs_vertex2f(pos_x, center - offset); 143 | } 144 | } else { 145 | for (; i < UTIL_MIN(m_cfg->detail + 1, m_bars_left.size()); i++) { 146 | auto val = m_bars_left[i]; 147 | height = UTIL_MAX(static_cast(round(val)), 1); 148 | 149 | pos_x = i * (m_cfg->bar_width + m_cfg->bar_space); 150 | gs_vertex2f(pos_x, m_cfg->bar_height - height); 151 | gs_vertex2f(pos_x, m_cfg->bar_height); 152 | } 153 | } 154 | return gs_render_save(); 155 | } 156 | 157 | gs_vertbuffer_t *wire_visualizer::make_filled_inverted(channel_mode cm) 158 | { 159 | gs_render_start(true); 160 | size_t i = 0, pos_x = 0; 161 | uint32_t height = 0; 162 | int32_t offset = 0; 163 | int32_t center = 0; 164 | 165 | if (cm != CM_BOTH) { 166 | offset = m_cfg->stereo_space / 2; 167 | center = m_cfg->bar_height / 2 + offset; 168 | } 169 | 170 | if (cm == CM_RIGHT) { 171 | for (; i < m_bars_left.size() - DEAD_BAR_OFFSET; i++) { 172 | auto val = m_bars_right[i]; 173 | height = UTIL_MAX(static_cast(round(val)), 1); 174 | 175 | pos_x = i * (m_cfg->bar_width + m_cfg->bar_space); 176 | gs_vertex2f(pos_x, center + offset + height); 177 | gs_vertex2f(pos_x, m_cfg->cx); 178 | } 179 | } else if (cm == CM_LEFT) { 180 | for (; i < m_bars_left.size() - DEAD_BAR_OFFSET; i++) { 181 | auto val = m_bars_left[i]; 182 | height = UTIL_MAX(static_cast(round(val)), 1); 183 | 184 | pos_x = i * (m_cfg->bar_width + m_cfg->bar_space); 185 | gs_vertex2f(pos_x, center - offset - height); 186 | gs_vertex2f(pos_x, 0); 187 | } 188 | } else { 189 | for (; i < m_bars_left.size() - DEAD_BAR_OFFSET; i++) { 190 | auto val = m_bars_left[i]; 191 | height = UTIL_MAX(static_cast(round(val)), 1); 192 | 193 | pos_x = i * (m_cfg->bar_width + m_cfg->bar_space); 194 | gs_vertex2f(pos_x, m_cfg->bar_height - height); 195 | gs_vertex2f(pos_x, 0); 196 | } 197 | } 198 | return gs_render_save(); 199 | } 200 | 201 | void wire_visualizer::render(gs_effect_t *e) 202 | { 203 | gs_vertbuffer_t *vb_left = nullptr, *vb_right = nullptr; 204 | enum gs_draw_mode m = GS_TRISTRIP; 205 | uint32_t num_verts = 0; 206 | channel_mode main = m_cfg->stereo ? CM_LEFT : CM_BOTH; 207 | 208 | switch (m_cfg->wire_mode) { 209 | case WM_THIN: 210 | vb_left = make_thin(main); 211 | if (m_cfg->stereo) 212 | vb_right = make_thin(CM_RIGHT); 213 | m = GS_LINESTRIP; 214 | num_verts = m_cfg->detail; 215 | break; 216 | case WM_THICK: 217 | vb_left = make_thick(main); 218 | if (m_cfg->stereo) 219 | vb_right = make_thick(CM_RIGHT); 220 | num_verts = m_cfg->detail * 2; 221 | break; 222 | case WM_FILL_INVERTED: 223 | vb_left = make_filled_inverted(main); 224 | if (m_cfg->stereo) 225 | vb_right = make_filled_inverted(CM_RIGHT); 226 | num_verts = m_cfg->detail * 2; 227 | break; 228 | case WM_FILL: 229 | vb_left = make_filled(main); 230 | if (m_cfg->stereo) 231 | vb_right = make_filled(CM_RIGHT); 232 | num_verts = m_cfg->detail * 2; 233 | break; 234 | } 235 | 236 | gs_load_vertexbuffer(vb_left); 237 | gs_draw(m, 0, num_verts); 238 | 239 | if (vb_right) { 240 | gs_load_vertexbuffer(vb_right); 241 | gs_draw(m, 0, num_verts); 242 | } 243 | 244 | gs_vertexbuffer_destroy(vb_left); 245 | gs_vertexbuffer_destroy(vb_right); 246 | } 247 | } 248 | -------------------------------------------------------------------------------- /src/util/audio/wire_visualizer.hpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * This file is part of spectralizer 3 | * github.con/univrsal/spectralizer 4 | * Copyright 2020 univrsal . 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, version 2 of the License. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | *************************************************************************/ 18 | 19 | #pragma once 20 | #include "spectrum_visualizer.hpp" 21 | 22 | namespace audio { 23 | class wire_visualizer : public spectrum_visualizer { 24 | gs_vertbuffer_t *make_thin(channel_mode cm); 25 | gs_vertbuffer_t *make_thick(channel_mode cm); 26 | gs_vertbuffer_t *make_filled(channel_mode cm); 27 | gs_vertbuffer_t *make_filled_inverted(channel_mode cm); 28 | 29 | public: 30 | explicit wire_visualizer(source::config *cfg); 31 | 32 | void render(gs_effect_t *e) override; 33 | }; 34 | } 35 | -------------------------------------------------------------------------------- /src/util/util.cpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * This file is part of spectralizer 3 | * github.con/univrsal/spectralizer 4 | * Copyright 2020 univrsal . 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, version 2 of the License. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | *************************************************************************/ 18 | 19 | #include "util.hpp" 20 | 21 | /* clang-format off */ 22 | namespace defaults { 23 | const bool stereo = false; 24 | const visual_mode visual = VM_BARS; 25 | const smooting_mode smoothing = SM_NONE; 26 | const uint32_t color = 0xffffffff; 27 | 28 | const bool log_freq_scale = false; 29 | const log_freq_qual log_freq_quality = LFQ_FAST; 30 | const double log_freq_start = 40.0; 31 | const bool log_freq_use_hpf = true; 32 | const double log_freq_hpf_curve = 20.0; 33 | 34 | /* constants for log_freq-related options */ 35 | const double log_freq_hpf_curve_max = 100.0; 36 | const uint32_t log_freq_quality_fast_detail_mul = 2; 37 | const uint32_t log_freq_quality_precise_detail_mul = 8; 38 | 39 | const uint16_t detail = 32, 40 | cx = 50, 41 | cy = 50, 42 | fps = 30; 43 | 44 | const uint32_t sample_rate = 44100, 45 | sample_size = sample_rate / fps; 46 | 47 | const double lfreq_cut = 30, 48 | hfreq_cut = 22050, 49 | falloff_weight = .95, 50 | gravity = .8; 51 | 52 | const uint32_t sgs_points = 3, /* Should be a odd number */ 53 | sgs_passes = 2; 54 | 55 | const double mcat_smooth = 1.5; 56 | 57 | const uint16_t bar_space = 2, 58 | bar_width = 5, 59 | bar_height = 100, 60 | bar_min_height = 5, 61 | corner_points = 5; 62 | 63 | const uint16_t wire_thickness = 5; 64 | const enum wire_mode wire_mode = WM_THIN; 65 | 66 | const char *fifo_path = "/tmp/mpd.fifo"; 67 | const char *audio_source = "none"; 68 | 69 | const bool use_auto_scale = true; 70 | const double scale_boost = 0.0; 71 | const double scale_size = 1.0; 72 | } 73 | 74 | namespace constants { 75 | const int auto_scale_span = 30; 76 | const double auto_scaling_reset_window = 0.1; 77 | const double auto_scaling_erase_percent = 0.75; 78 | /* Amount of deviation needed between short term and long 79 | * term moving max height averages to trigger an autoscaling reset */ 80 | const double deviation_amount_to_reset = 1.0; 81 | } 82 | /* clang-format on */ 83 | -------------------------------------------------------------------------------- /src/util/util.hpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * This file is part of spectralizer 3 | * github.con/univrsal/spectralizer 4 | * Copyright 2020 univrsal . 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, version 2 of the License. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | *************************************************************************/ 18 | 19 | #pragma once 20 | 21 | #include 22 | #include 23 | 24 | /* Logging */ 25 | #define log_src(log_level, format, ...) \ 26 | blog(log_level, "[spectralizer: '%s'] " format, obs_source_get_name(context->source), ##__VA_ARGS__) 27 | #define write_log(log_level, format, ...) blog(log_level, "[spectralizer] " format, ##__VA_ARGS__) 28 | 29 | #define debug(format, ...) write_log(LOG_DEBUG, format, ##__VA_ARGS__) 30 | #define info(format, ...) write_log(LOG_INFO, format, ##__VA_ARGS__) 31 | #define warn(format, ...) write_log(LOG_WARNING, format, ##__VA_ARGS__) 32 | 33 | /* clang-format off */ 34 | 35 | #define UTIL_EULER 2.7182818284590452353 36 | #define UTIL_SWAP(a, b) do { typeof(a) tmp = a; a = b; b = tmp; } while (0) 37 | #define UTIL_MAX(a, b) (((a) > (b)) ? (a) : (b)) 38 | #define UTIL_MIN(a, b) (((a) < (b)) ? (a) : (b)) 39 | #define UTIL_CLAMP(lower, x, upper) (UTIL_MIN(upper, UTIL_MAX(x, lower))) 40 | #define T_(v) obs_module_text(v) 41 | 42 | #define T_SOURCE T_("Spectralizer.Source") 43 | #define T_SOURCE_MODE T_("Spectralizer.Mode") 44 | #define T_MODE_BARS T_("Spectralizer.Mode.Bars") 45 | #define T_MODE_CIRCLE_BARS T_("Spectralizer.Mode.Circle.Bars") 46 | #define T_MODE_WIRE T_("Spectralizer.Mode.Wire") 47 | #define T_STEREO T_("Spectralizer.Stereo") 48 | #define T_STEREO_SPACE T_("Spectralizer.Stereo.Space") 49 | #define T_DETAIL T_("Spectralizer.Detail") 50 | #define T_REFRESH_RATE T_("Spectralizer.RefreshRate") 51 | #define T_AUDIO_SOURCE T_("Spectralizer.AudioSource") 52 | #define T_AUDIO_SOURCE_NONE T_("Spectralizer.AudioSource.None") 53 | #define T_SOURCE_MPD T_("Spectralizer.Source.Fifo") 54 | #define T_FIFO_PATH T_("Spectralizer.Source.Fifo.Path") 55 | #define T_BAR_WIDTH T_("Spectralizer.Bar.Width") 56 | #define T_BAR_HEIGHT T_("Spectralizer.Bar.Height") 57 | #define T_SAMPLE_RATE T_("Spectralizer.SampleRate") 58 | #define T_BAR_SPACING T_("Spectralizer.Bar.Space") 59 | #define T_WIRE_SPACING T_("Spectralizer.Wire.Space") 60 | #define T_WIRE_HEIGHT T_("Spectralizer.Wire.Height") 61 | #define T_COLOR T_("Spectralizer.Color") 62 | #define T_GRAVITY T_("Spectralizer.Gravity") 63 | #define T_FALLOFF T_("Spectralizer.Falloff") 64 | #define T_FILTER_MODE T_("Spectralizer.Filter.Mode") 65 | #define T_FILTER_NONE T_AUDIO_SOURCE_NONE 66 | #define T_FILTER_MONSTERCAT T_("Spectralizer.Filter.Monstercat") 67 | #define T_FILTER_SGS T_("Spectralizer.Filter.SGS") 68 | #define T_SGS_PASSES T_("Spectralizer.Filter.SGS.Passes") 69 | #define T_SGS_POINTS T_("Spectralizer.Filter.SGS.Points") 70 | #define T_FILTER_STRENGTH T_("Spectralizer.Filter.Strength") 71 | #define T_AUTO_CLEAR T_("Spectralizer.AutoClear") 72 | #define T_AUTO_SCALE T_("Spectralizer.Use.AutoScale") 73 | #define T_SCALE_BOOST T_("Spectralizer.Scale.Boost") 74 | #define T_SCALE_SIZE T_("Spectralizer.Scale.Size") 75 | #define T_WIRE_MODE_THIN T_("Spectralizer.Wire.Mode.Thin") 76 | #define T_WIRE_MODE_THICK T_("Spectralizer.Wire.Mode.Thick") 77 | #define T_WIRE_MODE_FILL T_("Spectralizer.Wire.Mode.Fill") 78 | #define T_WIRE_MODE_FILL_INVERTED T_("Spectralizer.Wire.Mode.Fill.Invert") 79 | #define T_WIRE_MODE T_("Spectralizer.Wire.Mode") 80 | #define T_WIRE_THICKNESS T_("Spectralizer.Wire.Thickness") 81 | #define T_LOG_FREQ_SCALE T_("Spectralizer.LogFreqScale.Enable") 82 | #define T_LOG_FREQ_SCALE_QUAL T_("Spectralizer.LogFreqScale.Quality") 83 | #define T_LOG_FREQ_SCALE_QUAL_FAST T_("Spectralizer.LogFreqScale.Quality.Fast") 84 | #define T_LOG_FREQ_SCALE_QUAL_PRECISE T_("Spectralizer.LogFreqScale.Quality.Precise") 85 | #define T_LOG_FREQ_SCALE_START T_("Spectralizer.LogFreqScale.Start") 86 | #define T_LOG_FREQ_SCALE_USE_HPF T_("Spectralizer.LogFreqScale.UseHPF") 87 | #define T_LOG_FREQ_SCALE_HPF_CURVE T_("Spectralizer.LogFreqScale.HPFCurve") 88 | #define T_OFFSET T_("Spectralizer.Offset") 89 | #define T_PADDING T_("Spectralizer.Padding") 90 | #define T_EXPONENT T_("Spectralizer.Boost") 91 | #define T_EXPONENT_ENABLED T_("Spectralizer.Boost.Enabled") 92 | #define T_CORNER_ROUNDING T_("Spectralizer.Corner.Rounding") 93 | #define T_CORNER_RADIUS T_("Spectralizer.Corner.Radius") 94 | #define T_CORNER_POINTS T_("Spectralizer.Corner.Points") 95 | 96 | #define S_EXPONENT_ENABLED "boost_enabled" 97 | #define S_EXPONENT "boost" 98 | #define S_SOURCE_MODE "source_mode" 99 | #define S_STEREO "stereo" 100 | #define S_STEREO_SPACE "stereo_space" 101 | #define S_DETAIL "detail" 102 | #define S_REFRESH_RATE "refresh_rate" 103 | #define S_AUDIO_SOURCE "audio_source" 104 | #define S_FIFO_PATH "fifo_path" 105 | #define S_BAR_WIDTH "width" 106 | #define S_BAR_HEIGHT "height" 107 | #define S_SAMPLE_RATE "sample_rate" 108 | #define S_BAR_SPACE "bar_space" 109 | #define S_COLOR "color" 110 | #define S_FILTER_MODE "filter_mode" 111 | #define S_SGS_PASSES "sgs_passes" 112 | #define S_SGS_POINTS "sgs_points" 113 | #define S_GRAVITY "gravity" 114 | #define S_FALLOFF "falloff" 115 | #define S_FILTER_STRENGTH "filter_strength" 116 | #define S_AUTO_CLEAR "auto_clear" 117 | #define S_AUTO_SCALE "use_auto_scale" 118 | #define S_SCALE_BOOST "scale_boost" 119 | #define S_SCALE_SIZE "scale_size" 120 | #define S_WIRE_MODE "wire_mode" 121 | #define S_WIRE_THICKNESS "wire_thickness" 122 | #define S_LOG_FREQ_SCALE "log_freq_scale" 123 | #define S_LOG_FREQ_SCALE_QUALITY "log_freq_scale_quality" 124 | #define S_LOG_FREQ_SCALE_START "log_freq_scale_start" 125 | #define S_LOG_FREQ_SCALE_USE_HPF "log_freq_scale_use_hpf" 126 | #define S_LOG_FREQ_SCALE_HPF_CURVE "log_freq_scale_hpf_curve" 127 | #define S_OFFSET "offset" 128 | #define S_PADDING "padding" 129 | #define S_CORNER_ROUNDING "round_corners" 130 | #define S_CORNER_RADIUS "corner_radius" 131 | #define S_CORNER_POINTS "corner_points" 132 | 133 | enum visual_mode 134 | { 135 | VM_BARS, VM_CIRCULAR_BARS, VM_WIRE 136 | }; 137 | 138 | enum wire_mode 139 | { 140 | WM_THIN, WM_THICK, WM_FILL, WM_FILL_INVERTED 141 | }; 142 | 143 | enum smooting_mode 144 | { 145 | SM_NONE = 0, 146 | SM_MONSTERCAT, 147 | SM_SGS 148 | }; 149 | 150 | enum falloff 151 | { 152 | FO_NONE = 0, 153 | FO_FILL, 154 | FO_TOP 155 | }; 156 | 157 | enum channel_mode 158 | { 159 | CM_LEFT = 0, 160 | CM_RIGHT, 161 | CM_BOTH 162 | }; 163 | 164 | enum freq_scale 165 | { 166 | FS_LIN = 0, 167 | FS_LOG 168 | }; 169 | 170 | enum log_freq_qual 171 | { 172 | LFQ_FAST = 0, 173 | LFQ_PRECISE, 174 | }; 175 | 176 | struct stereo_sample_frame 177 | { 178 | int16_t l, r; 179 | }; 180 | 181 | using pcm_stereo_sample = struct stereo_sample_frame; 182 | 183 | namespace defaults { 184 | extern const bool stereo; 185 | extern const visual_mode visual; 186 | extern const smooting_mode smoothing; 187 | extern const uint32_t color; 188 | 189 | extern const bool log_freq_scale; 190 | extern const log_freq_qual log_freq_quality; 191 | extern const double log_freq_start; 192 | extern const bool log_freq_use_hpf; 193 | extern const double log_freq_hpf_curve; 194 | /* constants for log_freq-related options */ 195 | extern const double log_freq_hpf_curve_max; 196 | extern const uint32_t log_freq_quality_fast_detail_mul; 197 | extern const uint32_t log_freq_quality_precise_detail_mul; 198 | 199 | extern const uint16_t detail, 200 | cx, 201 | cy, 202 | fps; 203 | 204 | extern const uint32_t sample_rate, 205 | sample_size; 206 | 207 | extern const double lfreq_cut, 208 | hfreq_cut, 209 | falloff_weight, 210 | gravity; 211 | extern const uint32_t sgs_points, 212 | sgs_passes; 213 | 214 | extern const double mcat_smooth; 215 | 216 | extern const uint16_t bar_space, 217 | bar_width, 218 | bar_height, 219 | bar_min_height, 220 | corner_points; 221 | 222 | extern const uint16_t wire_thickness; 223 | extern const enum wire_mode wire_mode; 224 | 225 | extern const char *fifo_path; 226 | extern const char *audio_source; 227 | 228 | extern const bool use_auto_scale; 229 | extern const double scale_boost; 230 | extern const double scale_size; 231 | }; 232 | 233 | namespace constants { 234 | extern const int auto_scale_span; 235 | extern const double auto_scaling_reset_window; 236 | extern const double auto_scaling_erase_percent; 237 | /* Amount of deviation needed between short term and long 238 | * term moving max height averages to trigger an autoscaling reset */ 239 | extern const double deviation_amount_to_reset; 240 | } 241 | 242 | /* clang-format on */ 243 | --------------------------------------------------------------------------------