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::information () const
37 SndfileContent::audio_channels () const
44 SndfileContent::audio_length () const
51 SndfileContent::audio_frame_rate () const
58 SndfileContent::audio_channel_layout () const
66 SndfileContent::valid_file (boost::filesystem::path f)
68 /* XXX: more extensions */
69 string ext = f.extension().string();
70 transform (ext.begin(), ext.end(), ext.begin(), ::tolower);
71 return (ext == ".wav" || ext == ".aif" || ext == ".aiff");
75 SndfileContent::clone () const
77 return shared_ptr<Content> (new SndfileContent (*this));