1

I want to play a sound using C++. I'm not playing an audio file, but a certain voice. (Maybe functions like play_sound(frequency, amplitude, time).).

I want it to be cross-platform.

xiaoyu2006
  • 507
  • 7
  • 20
  • 1
    C++ does not have that specific ability. You need to use a 3rd party library or direct calls to the OS. What OS are you using? – 001 Dec 26 '19 at 14:57
  • MacOS, but I want to cross-platform. @JohnnyMopp – xiaoyu2006 Dec 26 '19 at 14:59
  • Sorry, not a Mac programmer. Searching Google is probably your best option at this point since [_Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow_](https://stackoverflow.com/help/on-topic). – 001 Dec 26 '19 at 15:06

1 Answers1

2

Ycao,

As far as I know, you will need some third party library. Personally, I would use FMOD. It's quite simple to use, well documented, you will find a lot code snippet to bootstart your project and it has a lot of interesting features.

FMOD Website

Scott Stensland
  • 26,870
  • 12
  • 93
  • 104
SunPaz
  • 145
  • 7