openFrameworks icon indicating copy to clipboard operation
openFrameworks copied to clipboard

replace fmod

Open ofTheo opened this issue 15 years ago • 18 comments

can we do it? we need cross platform: playback streaming pitch pan multiplay

for us to be compatible with what exists. OpenAL seems like the best choice. What other options are there?

ofTheo avatar Apr 06 '10 12:04 ofTheo

using quicktime/gstreamer?

arturoc avatar Apr 06 '10 12:04 arturoc

quicktime/gstreamer will not add additional dependencies

dopuskh3 avatar May 22 '10 09:05 dopuskh3

okay we're doing this - working with the swappable renderer

ofTheo avatar May 23 '10 20:05 ofTheo

What is the current state on this? I have a project where I keep copying these .so files around without even using sound. I think losing them would improve usability quite a lot. Of course I'd be willing to help...

underdoeg avatar Jul 17 '11 22:07 underdoeg

+1 for dropping fmodex!

benben avatar Jul 17 '11 22:07 benben

dusting this one off. Has there been any ideas about how to address this? the most current master uses fmod for VS 32/64 bit builds

DomAmato avatar Aug 10 '15 20:08 DomAmato

Fmod removed from MSYS2 in PR #4807

oxillo avatar Feb 13 '16 16:02 oxillo

Hi,

We are trying to clean out the many issues that we have. Many versions of OF have been released since this was issued.

Can you help us by checking if this feature is still requested for a next OF version ?

In case of inactivity, we'll close this issue by end of january, 2020.

Thanks

oxillo avatar Dec 26 '19 07:12 oxillo

Reviving one of the oldest issues for 0.12.0 :)

Hoping we can remove fmod as the default player for macOS and Windows.

For macOS I am working on an AVAudioEngine player which I think can be a 1:1 swap for ofFmodSoundPlayer. I believe it will also work on iOS / tvOS and be a good update for the iOS / tvOS sound player.

For Windows I imagine a Media Foundation replacement sound player could provide similar functionality. But I know a bit less about that.

Would be open if anyone Windows focused wanted to take a stab at it. @oxillo @DomAmato @paulhoux

ofTheo avatar Mar 25 '21 16:03 ofTheo

In iOS/tvOS and we already not using fmod it’s all AVFoundation

On Fri, 26 Mar 2021 at 3:50 am, Theodore Watson @.***> wrote:

Reviving one of the oldest issues for 0.12.0 :)

Hoping we can remove fmod as the default player for macOS and Windows.

For macOS I am working on an AVAudioEngine player which I think can be a 1:1 swap for ofFmodSoundPlayer. I believe it will also work on iOS / tvOS and be a good update for the iOS / tvOS sound player.

For Windows I imagine a Media Foundation replacement sound player could provide similar functionality. But I know a bit less about that.

Would be open if anyone Windows focused wanted to take a stab at it. @oxillo https://github.com/oxillo @DomAmato https://github.com/DomAmato @paulhoux https://github.com/paulhoux

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/openframeworks/openFrameworks/issues/167#issuecomment-807083436, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGK2HHE67FXM3PKQXZVZK3TFNSUPANCNFSM4BNEB7GQ .

danoli3 avatar Mar 25 '21 21:03 danoli3

oh yeah @danoli3 I just meant we could eventually remove the ofxiOSSoundPlayer and have iOS use the AVAudioEngine one which has some nice additional features ( multiplay, setSpeed able to go below 0.5 and above 2.0 etc )

ofTheo avatar Mar 25 '21 22:03 ofTheo

Sounds great!

danoli3 avatar Mar 26 '21 00:03 danoli3

@danoli3 @julapy here is the wip sound player. https://github.com/ofTheo/openFrameworks/blob/AVEngine-SoundPlayer/libs/openFrameworks/sound/ofAVEngineSoundPlayer.m

It has pretty much all the ofFmodSoundPlayer functionality. I just need to add multiplay ( easy-ish ) and FFT ( harder ).

If you want to give it a try you can use the soundPlayerExample and replace the top of ofApp.cpp with:

#include "ofAVEngineSoundPlayer.h"

//--------------------------------------------------------------
void ofApp::setup(){
	
	synth.setPlayer(make_shared<ofAVEngineSoundPlayer>());
	beats.setPlayer(make_shared<ofAVEngineSoundPlayer>());
	vocals.setPlayer(make_shared<ofAVEngineSoundPlayer>());

For it to work on iOS I believe you just need to remove this line: https://github.com/ofTheo/openFrameworks/blob/AVEngine-SoundPlayer/libs/openFrameworks/sound/ofAVEngineSoundPlayer.m#L13

ofTheo avatar Mar 27 '21 21:03 ofTheo

FFT is done with a separate library in ofOpenALSoundPlayer, the code might be relatively straightforward to refactor into it's own class and use it from both players i guess

arturoc avatar Mar 29 '21 09:03 arturoc

sorry i don't have time to implement a prototype, but i've made pretty good experiences with miniaudio in combination with src resample ... just throwing it in the ring if ppl are still looking for alternatives to the current rtaudio/fmod/etc.: https://github.com/mackron/miniaudio (stream to audio interface and file playback) http://www.mega-nerd.com/SRC/ (resampling)

kritzikratzi avatar Mar 29 '21 10:03 kritzikratzi

sorry i don't have time to implement a prototype, but i've made pretty good experiences with miniaudio in combination with src resample ... just throwing it in the ring if ppl are still looking for alternatives to the current rtaudio/fmod/etc.: https://github.com/mackron/miniaudio (stream to audio interface and file playback) http://www.mega-nerd.com/SRC/ (resampling)

FWIW, I also tested miniaudio and its quite popular and works really cross platform. It also has different backends that can be chosen. I also played with LabSound (https://github.com/LabSound/LabSound) that is graph based and used Miniaudio as Engine under the mask. Seems really powerful as well and API is based on Web Audio so easy to find docs.

related to LabSound there as sister projects: LabSynthToy (https://github.com/LabSound/LabSynthToy) - sampler that plays sf2 files (using TinySoundFont) LabMidi (https://github.com/meshula/LabMidi) - for playing midi LabSoundGraphToy (https://github.com/LabSound/LabSoundGraphToy) - exploring nodes

Babylon.js team seems also planning to use LabSound in their BabylonNative/BabylonReactNative projects

pzoltowski avatar Jul 29 '21 14:07 pzoltowski

@ofTheo : sorry, I didn't notice your mention of Mar25, Theo.

I'm currently not in a position to help out with this, since I am fully booked for the next couple of months. Additionally, I don't have a huge amount of experience with Windows audio.

paulhoux avatar Nov 08 '21 11:11 paulhoux

Can we not use OpenAL on all platforms? I've been doing some work on the streaming side making improvements. I have previously gotten OpenAL to work everywhere. Is it the license? I believe it's LGPL. We definitely need to get rid of FMOD though.

BTW I could have a go at this if interest is there.

pierre-aimi avatar Jan 30 '24 05:01 pierre-aimi