View Full Version : How do I play flac files in C?
April 6th, 2010, 02:42 PM
I'm making a simple program that writes the lyrics of "still alive" in a terminal in sync with the song, and so far it's a HUGE SUCCESS..... it's pretty hard to overstate my satisfaction...... anyway, how can I play flac files in C? What headers do I have to import, and how do I signal it to play?
April 6th, 2010, 04:06 PM
looks like you'll need to import FLAC/stream_decoder.h (and who knows what else). To play the stream once its decoded, just find the user's audio device (maybe /dev/dsp?) and write to it. Maybe look at MPD's code for ideas?
April 6th, 2010, 04:26 PM
I suggest to use gstreamer framework. Makes it a whole lot easier.
April 6th, 2010, 04:31 PM
First result in google search for "flac c library":
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.