There are a few flac players on OS X now, but none (at least none that i know of) seem to use Core Audio. So they all freak out if i try to play a 24/96 file. I was recently poking around with the Tiger X Code tools and there's a simple core audio player in there /Developer/Examples/CoreAudio/Services/AudioFileTools/ called afplay. how hard would it be to get this thing playing flac files? I've very new to CoreAudio, but I know there was some discussion about it regarding flac back in July... Scott
On Sat, Nov 12, 2005 at 10:29:15AM -0500, Scott C. Brown 02 wrote:> There are a few flac players on OS X now, but none (at least none that i know > of) seem to use Core Audio. So they all freak out if i try to play a 24/96 > file.Without even worrying about your 24/96 issue, which OSX flac player have you been using? Here's what I've tried, and why it doesn't work well for me: - the old MacAmp player - very crashy - xmms - works, even with coreaudio output (xmms-coreaudio plugin, make sure to apply the patch that tells OS X that it's a realtime thread). however, i have a second sound card (usb griffin iMic) that's hooked to the stereo, i'd like music to go there and system audio to continue to go to the main sound out. the coreaudio plugin actually has options for this but there is some sort of config file parsing bug so it isn't saveable across sessions. And you have to *delete* the config files to be able to reconfigure it by hand. plus of course it's an x11 app and the UI isn't great as X11 apps go in the first place. - VLC - i think this does use coreaudio, although maybe not. It does allow you to select the sound output device. However, flac playback is broken. the audio output level goes up and down on a regular level SO it SOUNDS like THE volume CONTROL is BEING fiddled WITH. wav & mp3 output is fine. I ended up writing a perl wrapper script for vlc that first runs the command line flac decoder and then tells vlc to play the wav file(s). On the off chance this is useful to someone else, it's at: http://people.internet2.edu/~danno/macos_flac_vlc_wrapper/ note that it will leave lots of wav files lying around in /tmp/vlcflac that you'll have to clean up manually. Also note that if you have a bad wav file it won't retry decoding it, you'll have to delete it. danno -- dan pritts Herbert Hoover was a shitty president, but danno@umich.edu even he never conceded an entire metropolis to 734-929-9770 rising water and snakes.
On Nov 12, 2005, at 7:59 PM, Dan Pritts wrote:> On Sat, Nov 12, 2005 at 10:29:15AM -0500, Scott C. Brown 02 wrote: >> There are a few flac players on OS X now, but none (at least none >> that i know >> of) seem to use Core Audio. So they all freak out if i try to >> play a 24/96 >> file. > > Without even worrying about your 24/96 issue, which OSX flac > player have you been using?I'm using cog: <http://www.macupdate.com/info.php/id/18340> Works beautifully. Daniel
Scott C. Brown 02 wrote:> There are a few flac players on OS X now, but none (at least none that i know > of) seem to use Core Audio.SInce 1.0.12 libsndfile has supported FLAC and the sndfile-play program uses Core Audio. Erik -- +-----------------------------------------------------------+ Erik de Castro Lopo +-----------------------------------------------------------+ "Unix and C are the ultimate computer viruses." -- Richard P Gabriel
Scott, It is not difficult to combine the FLAC library with CoreAudio. I have written software with object-based audio classes in Objective-C supporting AIFF, WAVE, and FLAC. I found the FLAC library to be highly compatible with CoreAudio. It took almost no time to get it working. CoreAudio is primarily C, with some samples in C++, so you might prefer to use the C version of the FLAC libraries. I believe that AudioFileTools is designed around Apple's file translation plugin architecture. Thus, modifying the AudioFileTools example to support FLAC would probably require writing a file format translation plugin. Otherwise, you'd be vastly changing the app design to directly support FLAC. I'm not sure of the above, because I have not looked at that sample in detail, but my hunch is that you might have an easier time modifying another sample which is more direct in the design of its file format access. In my case, I already had developed my own file format framework, and had the CoreAudio player working. Adding support for FLAC was easy because I designed the file format framework, and did not have to learn anything new except the FLAC API. P.S. If you do end up writing a FLAC file format translation plug (I'm not sure what the official terminology is) for AudioFileTools, then this would be a highly sought after plug for Mac OS X. I think it would be a significant step towards supporting FLAC in many places throughout Mac OS X. Perhaps that's the incentive you need to take on the slightly more difficult path! Brian Willoughby Sound Consultin Begin forwarded message: From: Scott.C.Brown.02@Alum.Dartmouth.ORG (Scott C. Brown 02) There are a few flac players on OS X now, but none (at least none that i know of) seem to use Core Audio. So they all freak out if i try to play a 24/96 file. I was recently poking around with the Tiger X Code tools and there's a simple core audio player in there /Developer/Examples/CoreAudio/Services/AudioFileTools/ called afplay. how hard would it be to get this thing playing flac files? I've very new to CoreAudio, but I know there was some discussion about it regarding flac back in July... Scott