Skip to content

Conversation

dimitre
Copy link
Member

@dimitre dimitre commented Apr 19, 2023

I've added an optional variable that can be passed so the XCode doensn't bundle FMOD
if you add in Project.xcconfig or App.xcconfig
OF_IGNORE_FMOD = 1

@dimitre dimitre marked this pull request as ready for review April 19, 2023 15:05
@dimitre
Copy link
Member Author

dimitre commented Apr 20, 2023

what about the feature and the naming @ofTheo @artificiel?
it is something I would use now in projectGenerator, so less SSD wear

@ofTheo ofTheo added this to the 0.12.0 milestone Apr 20, 2023
@ofTheo
Copy link
Member

ofTheo commented Apr 20, 2023

Yes! Great.
Can we change it to OF_NO_FMOD ?

Also would be great to enable the ofAVEngineSoundPlayer on macOS / iOS / tvOS if this is defined
On Windows @NickHardeman is working on a MediaEngine Sound Player which could also be enabled if this is defined.

@ofTheo ofTheo mentioned this pull request Apr 20, 2023
77 tasks
@dimitre
Copy link
Member Author

dimitre commented Apr 20, 2023

Yes, much better OF_NO_FMOD

@dimitre
Copy link
Member Author

dimitre commented Apr 20, 2023

PR updated.

@ofTheo ofTheo merged commit af09bd7 into openframeworks:master Apr 20, 2023
@ofTheo
Copy link
Member

ofTheo commented Apr 20, 2023

Going to do a separate PR for setting it to switch between fmod and avengine something alongs the lines of:

//FOR AV ENGINE SOUND PLAYER UNCOMMENT TWO LINES BELOW
//OF_NO_FMOD=1
//USER_PREPROCESSOR_DEFINITIONS="OF_NO_FMOD=1"
GCC_PREPROCESSOR_DEFINITIONS=$(inherited)$(USER_PREPROCESSOR_DEFINITIONS)

( shame it needs two lines but the second allows us to do #ifdef OF_NO_FMOD in the cpp )

Then in the build OF script we can pass it through to OF core

xcodebuild -project "$OF_PATH/libs/openFrameworksCompiled/project/osx/openFrameworksLib.xcodeproj" -target openFrameworks -configuration "${CONFIGURATION}"  CLANG_CXX_LANGUAGE_STANDARD=$CLANG_CXX_LANGUAGE_STANDARD MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET GCC_PREPROCESSOR_DEFINITIONS=$USER_PREPROCESSOR_DEFINITIONS

And finally in ofConstants.h

//------------------------------------------------ soundplayer
//MAC_OS and IOS uncomment to enable AVEnginePlayer
#ifdef OF_NO_FMOD
    #undef USE_FMOD
    #if defined(TARGET_OF_IOS) || defined(TARGET_OSX)
        #define OF_SOUND_PLAYER_AV_ENGINE
    #endif
    //add other platforms here 
#endif

@artificiel
Copy link
Contributor

a bit late to the party but considering #7450 it might make sense to insert a "subsystem" layer to give more structure to the defines and have OF_SOUNDPLAYER_NO_FMOD

danoli3 added a commit to danoli3/openFrameworks that referenced this pull request Apr 30, 2023
…studo_all_architectures_ndk24

* commit '515b768b1d9cc133d651d045c64a14c09dd254ba': (298 commits)
  switch package gen to use PG from github (openframeworks#7540)
  fix macOS issue where fullscreen activation is broken after maximizing with green button (openframeworks#7538)
  make MF foundation default for visual studio (openframeworks#7534)
  move serialTest (openframeworks#7536)
  map (openframeworks#7535)
  Fixing GLFW issue in Ubuntu 16.04 - GLFW_TRANSPARENT_FRAMEBUFFER (openframeworks#7532)
  update linux64 (openframeworks#7531)
  add linuxaarch64 to ofxKinect to support kinect on raspberrypi 64 bit (openframeworks#7530)
  add missing gstreamer packages for Ubuntu 22.04 and newer closes openframeworks#7516 (openframeworks#7528)
  RPI - Linux aarch64 minor fixes (openframeworks#7527)
  bump version (openframeworks#7526)
  Windows Media Foundation and XAudio Sound Player (openframeworks#7523)
  Bugfix vs pg (openframeworks#7525)
  use AV_Engine if OF_NO_FMOD is defined (openframeworks#7512)
  manual run nightly
  Proposal: a way of not bundling FMOD in XCode (openframeworks#7507)
  add linuxaarch64 to nightly builds and create_package (openframeworks#7511)
  Rename assimpExample remove 3DModelLoaderExample (openframeworks#7510)
  faster sort and option for natural, fast and by date (openframeworks#7509)
  Media Foundation Video Player fix pixels (openframeworks#7506)
  ...

# Conflicts:
#	addons/ofxAndroid/src/ofAppAndroidWindow.cpp
#	libs/openFrameworks/3d/ofMesh.h
#	libs/openFrameworks/3d/ofMesh.inl
#	libs/openFrameworks/app/ofAppBaseWindow.h
#	libs/openFrameworks/gl/ofMaterial.cpp
#	libs/openFrameworks/gl/ofTexture.h
#	libs/openFrameworks/graphics/ofTrueTypeFont.cpp
#	libs/openFrameworks/graphics/ofTrueTypeFont.h
#	libs/openFrameworks/sound/ofAVEngineSoundPlayer.h
#	libs/openFrameworks/sound/ofAVEngineSoundPlayer.mm
#	libs/openFrameworks/sound/ofSoundBaseTypes.cpp
#	libs/openFrameworks/sound/ofSoundBaseTypes.h
#	libs/openFrameworks/sound/ofSoundStream.cpp
#	libs/openFrameworks/utils/ofConstants.h
#	libs/openFrameworks/utils/ofFileUtils.cpp
#	libs/openFrameworksCompiled/project/android/build.gradle
#	libs/openFrameworksCompiled/project/android/config.android.default.mk
#	libs/openFrameworksCompiled/project/ios/iOS+OFLib.xcodeproj/project.pbxproj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants