openframeworks / openFrameworks

openFrameworks is a community-developed cross platform toolkit for creative coding in C++.
http://openframeworks.cc
Other
9.84k stars 2.56k forks source link

replace fmod #167

Open ofTheo opened 14 years ago

ofTheo commented 14 years ago

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?

arturoc commented 14 years ago

using quicktime/gstreamer?

dopuskh3 commented 14 years ago

quicktime/gstreamer will not add additional dependencies

ofTheo commented 14 years ago

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

underdoeg commented 12 years ago

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...

benben commented 12 years ago

+1 for dropping fmodex!

DomAmato commented 8 years ago

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

oxillo commented 8 years ago

Fmod removed from MSYS2 in PR #4807

oxillo commented 4 years ago

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

ofTheo commented 3 years ago

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

danoli3 commented 3 years ago

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 .

ofTheo commented 3 years ago

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 )

danoli3 commented 3 years ago

Sounds great!

ofTheo commented 3 years ago

@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

arturoc commented 3 years ago

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

kritzikratzi commented 3 years ago

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)

pzoltowski commented 2 years ago

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

paulhoux commented 2 years ago

@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.

pierre-aimi commented 5 months ago

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.