views:

72

answers:

1

I'm working on an application that will read in file paths and play audio files. I'm trying to keep this as simple as possible--by using existing codecs and free/open utilities. I'd like some suggestions on the best way to do this. I've had two ideas, both involving FFmpeg:

  1. Create a simple GUI that allows the user to read pass in file(s) to be played, and then a ffplay.exe process is run in the background to play the file(s).
  2. Go more in-depth by just using libavcodec and basing my project off the functionality available with that.

There are only a few main goals I have for this.

  • Be able to read in and play multiple files without breaks between them
  • Start playback at an arbitrary spot (based on a percent of total duration) within the track
  • Stop playback after an arbitrary amount of time, and move to the next track

Which of my two methods seem the most practical for this project? Is there a better--or perhaps less feature-intensive--alternative to FFmpeg that you would suggest.

This is for a Windows application written in C#.

Edit: One of the reasons that I started with FFmpeg is that it can handle many file types, notably MP3, AAC, Flac.

Edit2: If the use of libavcode.dll is the best option, it would also be helpful to get some info on implementing that in C#.

+1  A: 

The BASS audio library has C# bindings and works very well with common audio formats (e.g. MP3) with plug-ins for other formats (e.g. AAC).

However, for commercial development, you require a license to use BASS.

strager
Thanks! BASS is very well documented, integrates easily with C#, and has a ton of functionality!
Matt