0

In the past years I used my own audio engine written using the WaveOutOpen API. Now I would like to port it to Linux / MacOS. I thought about using OpenAL.

What would be an efficient way to port this to Linux without changing too much code?

I'm mixing the audio data from WAV files and apply effects, such as 3D position, looping, frequency change, and echo.

From what I've seen OpenAL seems similar, but I don't have a very broad view on audio API's.

Would there be someone with audio programming experience who could point me in the right direction?

Z0q
  • 1,689
  • 3
  • 28
  • 57
  • For cross platform audio processing JUCE is pretty much the standard at the moment. – fdcpp Jan 21 '22 at 08:46
  • For clarity, what does an acceptable answer look like in your eyes? Would it be a list of Audio APIs? each with examples of opening and playing a `.wav` file? with spatialisation, pitch shifting, and reverb applied? A simple _yes, use OpenAL as it is cross-platform_? An overview of porting your current codebase to a new Audio API? if so, do you feel it's relevant to have your source code for reference? Would a simple replacement for [`waveOutOpen`](https://docs.microsoft.com/en-us/previous-versions/ms713754(v=vs.85)) suffice? One each for macOS and Linux? or something identical for both? – fdcpp Jan 21 '22 at 09:24
  • @fdcpp Thank you for your comment. That is actually the bigger question that I have, since I might not know the best answer to your question. But ideally I thought it would be cool if there would be a somewhat similar replacement of `waveOutOpen()` and `waveOutWrite()`, so that I could port my existing audio engine code to be cross platform. If I would be able to replace those functions, all should work! – Z0q Jan 22 '22 at 19:33
  • 1
    If you wanted a replacement for the [Windows multimedia API](https://learn.microsoft.com/en-us/windows/win32/api/mmeapi/) that would be cross platform, Then yes, OpenAL would be a valid, if somewhat old fashioned choice. If your application has audio processing as a core component, JUCE would still be the standard. For games, FMOD or WWISE – fdcpp Jan 22 '22 at 20:05
  • @fdcpp, thank you very much! I like old fashioned, haha! If you post an answer, I will accept it – Z0q Jan 22 '22 at 20:40
  • That’s not really the kind of Q and A SO was setup for, ideally, I recommend deleting the question – fdcpp Jan 22 '22 at 20:46
  • @fdcpp I think this would be a valid question if worded correctly. Maybe show some code and then ask "How do I port this to MacOS and Linux"? – Shambhav Jan 27 '22 at 05:21

0 Answers0