Skip to content

Commit

Permalink
Sound now also works on FreeBSD, using jack.
Browse files Browse the repository at this point in the history
  • Loading branch information
dimi309 committed Sep 13, 2023
1 parent 4bbe9e8 commit c21951a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@ cutting edge methods and technologies.
- Android (OpenGL ES 2.0)
- iOS (OpenGL ES 2.0)

*On FreeBSD it is likely that the sound does not work. I have only tested it
on VirtualBox, not linking to alsa like in Linux, but not replacing alsa with
something else either. I do not know if Portaudio can produce sound under
these conditions.*

This library is extremely backwards compatible. It can run on iOS 9.3 and
Android 4.2.

Expand Down
4 changes: 4 additions & 0 deletions deps/scripts/prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ if [ $(uname) == 'Linux' ]; then
echo "No package manager found! Cannot install preprequisites."
exit 1
fi
elif [ $(uname) == 'FreeBSD' ]; then
echo "Installing jackit, using pkg and sudo (you might be required to enter your password..."
sudo pkg install jackit
CMAKE_PORTAUDIO_DEFINITIONS="-DPA_USE_JACK=ON -DPA_BUILD_SHARED=OFF"
fi

CMAKE_DEFINITIONS=-DCMAKE_BUILD_TYPE=$1
Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ if(UNIX AND NOT APPLE) # FreeBSD or Linux
message(STATUS "System: ${CMAKE_SYSTEM_NAME}")
if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
link_directories(/usr/local/lib)
target_link_libraries(small3d PUBLIC m pthread rt X11 dl)
target_link_libraries(small3d PUBLIC m pthread rt jack X11 dl)
else()
target_link_libraries(small3d PUBLIC m pthread rt asound X11 dl)
endif()
Expand Down

0 comments on commit c21951a

Please sign in to comment.