开发者

Looking for a simple audio playback library for C++ [closed]

开发者 https://www.devze.com 2023-02-12 18:22 出处:网络
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 8 years ago.

Improve this question

I'm working on a simple audio player, which is going quite well, using Qt and everything. But I'm in need of a solid but simple Audio library. I don't need anything fancy such as 3D sound and what do I know what else these things got nowadays. I'm just looking for something simple and efficient.

A list of features I'm looking for:

  1. Audio playback from files
  2. .ogg, .mp3 and .flac should be supported at the very least.
  3. Should be able to pause playback.
  4. I am planning to use it in C++

See. Nothing huge or anything, but at the same time I am having a hard time finding something suitable. The 开发者_开发百科platform I'm targeting is Windows 7.

Anyone out there that knows something that I might be looking for?


The best possible choice in my opinion is the BASS audio library, which is not open source, but free for non-commercial use.

It is used by the AIMP2 audio player, which you can use to check the sound quality, natively supports a lot of formats including MP3 and OGG, and uses plugins to support even more, including FLAC.


How about libavcodec ? Its LGPL. I'm not sure about ogg >_<


I have used BASS before from a Windows C++ program, and it is very simple to use - link the DLL and call a couple of methods to specify the file to play back.

It certainly handles MP3 playback from a file as that's what I was doing.

I wish I could verify OGG and Flac, but alas I'm behind a firewall that has the site blocked.


Miles is a good and commonly used audio library.


Came across a good answer to my own question via an answer of another. FFmpeg is almost exactly what I'm looking for. Thanks all.


I suggest Openframeworks or use of the rtAudio library - that openframeworks is using - directly. Oh, and on the side: rtAudio has pretty much no license restrictions. ;-) Correct me, if I'm wrong.


DirectShow is actually pretty easy to use, flexible, and comes with Windows. There are a million examples, and it can be as easy or as sophisticated as you need it to be. When I throw together something that needs to play MP3s, I use it. Note that you are targeting Windows 7, so you could consider using Media Foundation instead.


I use a C++ encapsulation of FFMPEG : FOBS
Easy to use and C++ :)

EDIT:

Fobs is no longer maintained. However you can use it as a starting point to make your own C++ encapsulation of FFMPEG.

0

精彩评论

暂无评论...
验证码 换一张
取 消