#include "i18n.h"
-using namespace std;
+using std::string;
+using boost::shared_ptr;
+
+SndfileContent::SndfileContent (boost::filesystem::path f)
+ : Content (f)
+ , AudioContent (f)
+{
+
+}
+
+SndfileContent::SndfileContent (shared_ptr<const cxml::Node> node)
+ : Content (node)
+ , AudioContent (node)
+
+{
+
+}
string
SndfileContent::summary () const
return String::compose (_("Sound file: %1"), file().filename ());
}
+string
+SndfileContent::information () const
+{
+ return "";
+}
+
int
SndfileContent::audio_channels () const
{
return 0;
}
+
+bool
+SndfileContent::valid_file (boost::filesystem::path f)
+{
+ /* XXX: more extensions */
+ string ext = f.extension().string();
+ transform (ext.begin(), ext.end(), ext.begin(), ::tolower);
+ return (ext == ".wav" || ext == ".aif" || ext == ".aiff");
+}
+
+shared_ptr<Content>
+SndfileContent::clone () const
+{
+ return shared_ptr<Content> (new SndfileContent (*this));
+}