1 #include "sndfile_content.h"
7 using boost::shared_ptr;
9 SndfileContent::SndfileContent (boost::filesystem::path f)
16 SndfileContent::SndfileContent (shared_ptr<const cxml::Node> node)
25 SndfileContent::summary () const
27 return String::compose (_("Sound file: %1"), file().filename ());
31 SndfileContent::audio_channels () const
38 SndfileContent::audio_length () const
45 SndfileContent::audio_frame_rate () const
52 SndfileContent::audio_channel_layout () const
60 SndfileContent::valid_file (boost::filesystem::path f)
62 /* XXX: more extensions */
63 string ext = f.extension().string();
64 transform (ext.begin(), ext.end(), ext.begin(), ::tolower);
65 return (ext == ".wav" || ext == ".aif" || ext == ".aiff");