frontend-sdl2 icon indicating copy to clipboard operation
frontend-sdl2 copied to clipboard

[APP BUG] Unable to detect input from audio device on macOS

Open acherunilam opened this issue 1 year ago • 1 comments
trafficstars

Please confirm the following points:

  • [X] This report is NOT about the Android apps in the Play Store
  • [X] I have searched the project page to check if the issue was already reported

Affected Application

projectM Standalone SDL2 Frontend (includes the Steam app)

Affected Version

4.1.0

Operating System

macOS

Additional Application Details

projectMSDL version: 2.0.0 Built/running with projectM4 version: 4.1.0 Built against SDL version: 2.30.4

MacBook version: Air with M2 chip macOS version: 14.5

I also have Rogue Amoeba's Loopback v2.4.0 installed; not sure how relevant the ARK plugin is to this issue.

Type of Defect

Audio issue (no audio recording, delayed reaction)

Log Output

2024-06-19T07:52:58Z Events enabled: 1
2024-06-19T07:52:58Z Recording audio from device "Default capturing device" (ID -1).
2024-06-19T07:52:58Z Opened audio recording device "System default capturing device" (ID -1) with 2 channels at 44100 Hz.
2024-06-19T07:52:58Z Displaying preset: /Applications/projectM.app/Contents/MacOS//../Resources/Presets/207-wave.milk

Describe the Issue

projectM.app on macOS doesn't seem to be detecting any input from any of my audio devices; I cycled through them all using Cmd + I but it made no difference.

image

Steps to reproduce the issue:

  1. Build and install libprojectM.
mkdir -p "$HOME/tech/projectm" && cd "$_"

brew install cmake
git clone https://github.com/projectM-visualizer/projectm && cd projectm
git submodule update --init --recursive

mkdir build && cd $_
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local ..
cmake --build . -j
sudo cmake --build . --target install
  1. Build and install frontend-sdl2.
mkdir -p "$HOME/tech/projectm" && cd "$_"

brew install sdl2 poco freetype
git clone https://github.com/kblaschke/frontend-sdl2 -b installation-and-packaging && cd frontend-sdl2
sed -i '' 's/"{BUNDLE_BASE_DIR/"\${BUNDLE_BASE_DIR/g' CMakeLists.txt  # bug fix
git submodule update --init --recursive

mkdir build && cd $_
cmake -G Xcode -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/Applications/ ..
cmake --build . --target install
  1. Unbreak app.
install_name_tool -add_rpath /usr/local/lib /Applications/projectM.app/Contents/MacOS/projectMSDL
codesign --sign - --force --preserve-metadata=entitlements,requirements,flags,runtime /Applications/projectM.app/Contents/MacOS/projectMSDL

cat <<EOF >/Applications/projectM.app/Contents/Info.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>CFBundleExecutable</key>
    <string>projectMSDL</string>
    <key>CFBundleIdentifier</key>
    <string>com.example.projectM</string>
    <key>CFBundleName</key>
    <string>projectM</string>
    <key>CFBundleVersion</key>
    <string>1.0</string>
    <key>NSHighResolutionCapable</key>
    <true/>
    <key>CFBundleIconFile</key>
    <string>projectMSDL</string>
  </dict>
</plist>
EOF
  1. Configure app.
mkdir "$HOME/Library/Preferences/projectM" && cd "$_"
cp /Applications/projectM.app/Contents/Resources/projectMSDL.properties .

wget -P /Applications/projectM.app/Contents/Resources/Presets 'https://raw.githubusercontent.com/projectM-visualizer/projectm/master/presets/tests/207-wave.milk'
  1. Open app.
open /Applications/projectM.app

acherunilam avatar Jun 20 '24 03:06 acherunilam

Last time I've checked (~1 year ago) it still worked on macOS 13, but sadly, I've no longer got access to a Mac to test this. @revmischa - if you have some minutes to spare, could you have a look and see if this happens to you as well?

kblaschke avatar Feb 28 '25 10:02 kblaschke

Should be properly fixed by issue #110 - closing this issue as duplicate then.

kblaschke avatar Oct 06 '25 13:10 kblaschke